Project Structure

Project Structure

Generated projects separate responsibilities. Product pages live in app and features, composition rules in core/modules, provider details in adapters, and business code calls external capabilities through services.

Core directories

src/
├── app/                 # Pages, layouts, APIs, webhooks, and health
├── core/modules/        # Module contract and validation
├── core/services/       # Payment, mail, storage, AI, jobs, and rate-limit contracts
├── modules/             # Registry for this generated project
├── adapters/            # Selected provider implementations
├── services/            # Business-facing service instances
├── features/            # Product feature modules
├── db/schema/           # Drizzle schema split by module
├── content/             # Docs, blog, and legal MDX
├── config/              # Site, navigation, pricing, and plans
└── test/                # Core logic and integration tests

Generated selection

PathPurpose
nextdevtpl.generated.jsonEffective modules, adapters, target, and catalog version
src/modules/registry.tsModules visible to runtime code
src/adapters/registry.tsSelected adapter manifests and requirements
.env.exampleVariables retained for the selected combination

The template repository also contains recipes/catalog.json, templates/base/manifest.json, packages/create-nextdevtpl, and tests/compatibility. Normal generated apps do not carry generator maintenance files.

Routes

src/app/
├── [locale]/
│   ├── (marketing)/     # Home, pricing, blog, legal, and PSEO
│   ├── (auth)/          # Sign in, sign up, password reset
│   ├── (dashboard)/     # Workspace, credits, settings, and support
│   ├── (admin)/         # Admin area
│   └── docs/            # Fumadocs documentation
└── api/
    ├── auth/            # Better Auth
    ├── webhooks/payment # Shared endpoint for the selected payment adapter
    ├── upload/          # Presigned uploads
    ├── jobs/            # Protected cron handlers
    └── health/          # Deployment health check

Routes belonging to unselected modules are removed. A 404 for one of those routes is expected.

Where changes belong

ChangeLocation
Page or product flowsrc/features/<module> and its src/app route
Provider APIsrc/adapters/<service>
Business-facing servicesrc/services/<service>.ts
New module declarationsrc/features/<module>/manifest.ts
Database tablesrc/db/schema/<group>.ts
UI copymessages/en.json, messages/zh.json
Documentationsrc/content/docs/en, src/content/docs/zh
Deploymentdeploy/, Dockerfile, compose.yaml, vercel.json, wrangler.jsonc

Product code should depend on src/services and public module exports instead of importing adapter internals across boundaries.

On this page