Project Structure

Project Structure

Generated projects separate responsibilities. Skins define page appearance; the core provides view contracts, plan data, and shared runtime rules. In full mode, product modules use external capabilities through service interfaces. Demo mode replaces the business backend with sample data held in browser memory.

Core directories

src/
├── app/                       # Page routes, layouts, and full-mode APIs
├── core/
│   ├── modules/               # Module contracts and validation
│   ├── plans/                 # Plan data shared by full and demo modes
│   ├── services/              # Payment, mail, storage, AI, jobs, and rate-limit contracts
│   └── skin/demo/             # Demo only: sample data, validation, state, and local actions
├── modules/
│   ├── registry.ts             # Modules retained by this generated project
│   ├── app-runtime.tsx         # Mode-specific application runtime entry
│   ├── skin-views.ts           # Combined views for the selected skin
│   ├── view-pages.tsx          # Stable entry for workspace pages
│   └── demo-skin-views.ts      # Demo only: client skin-view entry
├── skin/
│   ├── tokens.css              # Appearance variables such as colors, fonts, and radii
│   ├── ui/                     # Base components replaced by the skin
│   ├── layouts/                # Marketing, auth, and workspace shells
│   └── views/                  # Page views grouped by product module
├── features/                   # Business pages and logic grouped by module
├── adapters/                   # Provider implementations selected in full mode
├── services/                   # Shared service entry points used by product code
├── db/schema/                  # Database tables selected in full mode
├── config/                     # Site, navigation, plans, and feature settings
└── content/                    # Blog, legal, and other content

core/skin/demo/ and modules/demo-skin-views.ts appear only in demo output. Full mode removes demo data and local-state implementations; both modes share the plan catalog and skin-view contracts. The generated selection and actual directory tree determine which business source remains.

Generated record and configuration

PathPurpose
nextdevtpl.generated.jsonEffective mode, modules, adapters, skin, palette, and deployment target
src/modules/registry.tsModules visible to this project's runtime
src/modules/skin-views.tsComplete view set provided by the selected skin
.env.exampleVariables retained by a full-mode selection; demo needs no business variables
wrangler.jsoncWorker and binding configuration for a full Cloudflare project

The template repository also contains recipes/catalog.json, templates/base/manifest.json, packages/create-nextdevtpl, and tests/compatibility. These generator-maintenance files are not copied into a normal generated project.

Pages and routes

src/app/
├── [locale]/
│   ├── (marketing)/     # Home, pricing, blog, legal pages, and PSEO
│   ├── (auth)/          # Sign in, sign up, and password reset
│   ├── (dashboard)/     # Workspace, credits, settings, and support tickets
│   ├── (admin)/          # Admin pages retained by a full-mode selection
│   └── docs/             # Fumadocs pages retained by a full-mode selection
└── api/                  # Full-mode auth, payment, upload, jobs, and health APIs

Full mode removes pages and endpoints for unselected modules. Demo mode keeps a fixed set of 17 user-facing routes and 20 views, but has no admin area, docs site, or business APIs. Workspace pages use local sample data and do not require sign-in.

Where changes belong

ChangeLocation
Page appearance and skin componentssrc/skin/views, src/skin/layouts, src/skin/ui
Skin colors, radii, and fontssrc/skin/tokens.css, src/skin/fonts.ts
Full-mode business flowsrc/features/<module> and its src/app route
Demo data and local actionssrc/core/skin/demo
Plan prices and entitlementssrc/core/plans
Provider callssrc/adapters/<service> and src/services/<service>.ts
Database tablessrc/db/schema/<group>.ts
UI copymessages/en.json, messages/zh.json
In-app docssrc/content/docs/en, src/content/docs/zh
Deploymentdeploy/, Dockerfile, compose.yaml, vercel.json, wrangler.jsonc

Product modules use external services through core contracts and src/services. Skins control appearance and receive view data; they do not access the database, adapters, or server modules.

On this page