Folder Structure
Where everything lives: the App Router route groups in src/app, and where new pages, components, and content go.
ShiftFast is a single Next.js App Router project. Every route lives under
the locale-scoped [locale] segment, split into five route groups. Outside
src/, content/ holds the MDX that powers the docs, blog, and legal
pages.
Route groups
(auth)— sign-in, sign-up(checkout)— the Stripe checkout redirect flow(docs)— this documentation site (Fumadocs)(marketing)— home, pricing, blog, legal, contact(saas)— the signed-in app: sidebar, account, and organization pages. Its(gated)sub-group holds pages that need a plan, like the dashboard — put your product's pages there.
src/app/api/ sits outside [locale] and holds the one API route, the
Stripe webhook; everything else is a Server Action — see
API & Server Actions.
Where things go
| Adding… | Put it in |
|---|---|
| A page in the app | src/app/[locale]/(saas)/app/(gated)/<name>/page.tsx |
| A Server Action | src/app/[locale]/(saas)/_actions/ |
| A database table | src/db/schema/, exported from src/db/schema/index.ts |
| A marketing page | src/app/[locale]/(marketing)/<name>/page.tsx |
| A component used in one place | A _components/ folder next to the route |
| A component shared across routes | src/components/shared/ |
| Text shown to users | src/i18n/messages/en.json and fr.json |
| A doc page or blog post | content/docs/ or content/blog/ |