Project structure
How a generated Simulacrum app is laid out, where adapters live, and how templates specialize folders.
Top-level layout
Generated apps follow a predictable Next.js App Router structure:
src/app— routes, layouts, route groups for marketing vs authenticated areassrc/components— UI primitives, marketing blocks, template-specific modulessrc/lib— adapters (database, storage, mail, analytics, tasks), auth helpers, validatorscontent— MDX for blog or docs templates when enabledsimulacrum.config.ts— feature and provider toggles
Adapter boundaries
Database and external service access live behind small interfaces in src/lib so you can swap providers without rewriting pages. Template dashboards call into those modules rather than importing ORM clients directly in route files.
Template overlays
Each template adds vertical folders (for example commerce product and checkout modules, SaaS billing surfaces, corporate careers). Shared shells (header, footer, auth layout) stay consistent so upgrades and docs apply across templates.
Prefer extending generated lib modules over forking route files when you add features; it keeps migrations and tests easier to port forward.