-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: monorepo package structure #5944
base: main
Are you sure you want to change the base?
Conversation
Oooh. Thanks for taking the first stab at this! We can start with something like this.
References |
I like the idea of using Turbo & I can see the benefit of creating smaller packages to improve its ability to cache. One reservation I have is that if we nest |
Just for inspiration, two other projects with a Go backend and SPA frontend are:
|
This PR proposes migrating our shared code structure to follow a more traditional monorepo organization. This essentially follows the guidelines from Turborepo, though this PR does not go so far as to actually use it. See Orval for a codebase that uses Turbo.
Namely, there is a new top level
packages
folder that houses isolated modules of shared/reusable code. Each of these will have their own dependencies, scripts, versions, test suites and will import from each other as you would import from any other package. This PR begins this process by migrating someweb-common
code to three packages:utils
,events
andactions
.I think there are number of benefits to this structure (and Turbo), though I would be lying if I said I wasn't mostly motivated by shortening our exceedingly long import paths. 🤷
A follow up PR would move our
web-local
,web-admin
andweb-auth
apps into anapps
folder, at which point I think we should rename them todeveloper
,cloud
andauth
.This is an open discussion, but I anticipate creating the following additional packages based on our existing code:
ui
,state
,formatting
,query
,icons
,time
,features
,metrics
and other packages for shared configuration.This PR also upgrades eslint to v9.