Starter structure
stormy init creates a pnpm and Turborepo workspace with two Next.js apps.
| Path | Purpose |
|---|---|
apps/site | Public site, port 3000 |
apps/admin | Page editor, layout editor, and media library, port 4000 |
packages/components/src/lib | Shared React components |
packages/components/src/index.ts | Component export map and CMS field definitions |
packages/components/src/styles.css | Shared component styles |
packages/theme/theme.css | Site theme and spacing tokens |
packages/types | Shared TypeScript declarations |
Public site
apps/site/src/app/(pages)/[...slug]/page.tsx renders pages by slug and supplies document metadata.
The root route uses an empty slug. /company/about uses company/about. Missing pages redirect to /404.
The starter caches pages in memory. Restart the site to clear cached content. Review this policy before deployment.
Admin
| Route | Purpose |
|---|---|
/login | Sign in with GitHub or Google |
/pages | Create and open pages |
/pages/[id] | Edit content, slug, and layout |
/layouts | Create and open layouts |
/layouts/[id] | Edit layout components and parent layout |
/media | Upload and manage files |
Both apps import components. Register new components through Components and schema.
Deploy
Build with pnpm build. Deploy apps/site and apps/admin as separate Next.js applications with their own environment variables.
Replace the localhost URLs in each app's .env.example with production URLs. Register the production admin callback URL in the account portal. Configure media storage if editors upload files.
Last updated: 10/20/26, 1:09 AM