Monorepos
Use --monorepo when a product has one AdonisJS API and more than one frontend, or shared packages.
new-project acme --monorepoThis makes an npm workspace.
- acme/
- package.jsonWorkspaces, and the scripts for the checks
- apps/
- api/The AdonisJS API
- flow.lock
- api/The AdonisJS API
- packages/
- CLAUDE.md
- buildspec.yml
- .flow/
- .claude/skills/
Flow supports one AdonisJS app in a repository. A second AdonisJS app needs a second repository.
#Run agents from the root
The skills, the docs of Flow and CLAUDE.md are at the root of the repository. So agents run from the root. flow.lock is in apps/api, and its installRoot points back to the root.
npx flow install rewrites the globs of each review lens for the folder of the app, for example apps/api/app/**.
#The checks
npm run lint, npm run typecheck and npm test at the root run the same script in each workspace that has it. CI runs them. When you add an app, give it these scripts, and CI checks it.
#Add a frontend app
Add it as a task, so it goes through the gates. Press New, and paste your version of this:
Add a frontend app in apps/field. TanStack Start in SPA mode, with its own lint, typecheck and test scripts. It calls the API in apps/api. Do not change the API.#Turborepo
new-project does not add Turborepo. Add it as a task when the checks get slow.