Project Structure and Organization
Understand the current monorepo layout, route tree, and key config locations.
The Next.js Drizzle SaaS Kit is organized as a pnpm + Turborepo monorepo.
Top-Level Layout
apps/ # runnable appspackages/ # shared packagestooling/ # shared tooling and MCP serverturbo/ # code generatorsdocs/ # documentationApps
apps/├── web/ # main Next.js app├── e2e/ # Playwright test app└── dev-tool/ # internal dev utilities appapps/web
Key locations:
apps/web/├── app/│ ├── [locale]/│ │ ├── (internal)/│ │ ├── (invitation)/│ │ ├── (public)/│ │ ├── admin/│ │ ├── auth/│ │ └── help/│ └── api/├── components/├── config/├── content/├── i18n/├── lib/├── public/└── styles/Notes:
- app config files live in
apps/web/config/ - internal sidebar config lives in
apps/web/app/[locale]/(internal)/_config/ - Drizzle config does not live in
apps/web; it lives inpackages/database/drizzle.config.mjs
Routing
The filesystem is organized under app/[locale]/....
Main route groups:
(public)- marketing pages(internal)- authenticated app pages(invitation)- invitation acceptance flowauth- sign-in, sign-up, password reset request, MFA verificationadmin- admin pageshelp- documentation/help pages
Localized URLs are handled by the i18n middleware and routing config. Keep filesystem path examples separate from runtime URL examples.
Naming Conventions
- page components:
page.tsx - layouts:
layout.tsx - loaders:
*-page.loader.ts - server actions:
*-server-actions.ts - schemas:
*.schema.ts - components:
kebab-case.tsx
Package Layout
Most packages expose from src/index.ts and define additional exports in package.json.
Use pnpm turbo gen package if you need a new shared package.
Next: Packages →