This page gives an overview of the project's folders and files, the routes defined in app/, and
where each kind of code belongs.
| Folder | Purpose |
|---|
app | App Router: pages, layouts, route handlers and metadata files. |
components | Shared, feature-agnostic React components (UI kit, layouts, sidebar). |
features | Feature modules: the components and hooks for one domain (billing, admin…). |
lib | Server and shared logic: auth, env, server actions, email, storage, config. |
hooks | Generic React hooks (use-mobile, use-copy-to-clipboard, use-is-client). |
drizzle | Database schema, client, SQL migrations and resource specs. |
emails | React Email templates. |
content | MDX content for the in-app docs (content/docs) and blog (content/blog). |
scripts | tsx scripts run by package.json (seeds, Stripe, generator, reset). |
public | Static assets: favicons, icons, logo and marketing images. |
types | Shared TypeScript types, such as PageParams and LayoutParams. |
.github | The CI workflow. |
| File | Purpose |
|---|
package.json | Dependencies, scripts, Git hooks and commitizen config. |
next.config.mjs | Next.js config, wrapped with Fumadocs MDX. |
proxy.ts | Next.js proxy (formerly middleware): the "always open the app" redirect. |
drizzle.config.ts | drizzle-kit config: schema path, migrations folder and database URL. |
components.json | shadcn/ui config and extra component registries. |
vercel.json | Vercel build command (pnpm build:deploy). |
.vercelignore | Files excluded from Vercel uploads. |
.env.example | Template for your .env file. |
tsconfig.json | TypeScript config, with the @/* path alias pointing to the root. |
eslint.config.mjs | ESLint config. |
.prettierrc | Prettier config, with the Tailwind CSS plugin. |
knip.json | Knip config for unused files, exports and dependencies. |
commitlint.config.js | Conventional commit rules. |
.release-it.json | release-it config: changelog, Git tag and GitHub release. |
pnpm-workspace.yaml | pnpm settings, including which packages may run build scripts. |
AGENTS.md | Instructions for AI coding agents. |
CHANGELOG.md | Release notes written by release-it. |
Launch Now uses route groups (folders in parentheses) to share layouts without changing the URL.
| Route | Folder | Description |
|---|
/ | app/page.tsx | Marketing homepage. |
/pricing | app/pricing | Plans and comparison table. |
/blog, /blog/... | app/blog | Blog, from content/blog. |
/docs/... | app/docs | Product docs, from content/docs. |
/changelog | app/changelog | Release notes, plus /changelog/rss.xml. |
/status | app/status | Public status page (mock data). |
/legal, /legal/[document] | app/legal | Legal documents index and pages. |
| Route | Folder | Description |
|---|
/auth/signin | app/auth/signin | Sign in with a code or OAuth. |
/auth/signup | app/auth/signup | Create an account. |
/auth/onboarding | app/auth/onboarding | First-run questions for new users. |
/accept-invitation/[invitationId] | app/accept-invitation | Accept or decline an organization invitation. |
Everything under app/(app) requires a session: app/(app)/layout.tsx redirects signed-out
visitors to /auth/signin and renders the sidebar shell.
| Route | Folder | Description |
|---|
/dashboard | (app)/(dash)/dashboard | Main dashboard. |
/demo | (app)/(dash)/demo | Demo page (removed by reset-project). |
/account, /account/... | (app)/account | Profile, security, API keys, notifications, billing, danger zone. |
/notifications | (app)/notifications | Notification inbox. |
/orgs | (app)/orgs/page.tsx | List of your organizations. |
/orgs/[orgSlug] | (app)/orgs/[orgSlug] | Organization overview. |
/orgs/[orgSlug]/settings/... | (app)/orgs/[orgSlug]/settings | General, members, billing, security, danger zone. |
/orgs/[orgSlug]/org-projects | (app)/orgs/[orgSlug]/org-projects | Example organization-scoped CRUD. |
/projects, /categories | (app)/projects, (app)/categories | Example user-scoped CRUD. |
/admin/... | (app)/admin | Platform admin: users, organizations, feedback, notifications, newsletter. |
The (dash) group only groups the dashboard pages; it does not appear in the URL. The admin layout
(app/(app)/admin/layout.tsx) redirects anyone whose role is not admin to /dashboard.
| Route | Purpose |
|---|
/api/auth/[...all] | Better Auth handler (sign-in, OAuth callbacks, organizations…). |
/api/webhook/stripe | Stripe webhook, handled by the Better Auth Stripe plugin. |
/api/upload/avatar | Avatar upload to S3. |
/api/files/[...key] | Redirects to a short-lived signed URL for avatars and logos. |
/api/newsletter/confirm | Newsletter double opt-in confirmation link. |
/api/search | Search index for the docs. |
app/ also holds the root layout.tsx, globals.css (Tailwind CSS and theme tokens),
not-found.tsx, forbidden.tsx, unauthorized.tsx, global-error.tsx, and the metadata routes
sitemap.ts, robots.ts, manifest.ts and opengraph-image.tsx.
Pages in app/ stay thin: they load data and compose components from features/. Each folder in
features/ groups the UI and client logic for one domain.
| Folder | Contents |
|---|
account | Profile form, security settings, sessions, 2FA setup, api-keys/. |
admin | Admin tables, user and organization details, impersonation banner. |
auth | Sign-in and sign-up forms, social buttons, demo sign-in, callback URL. |
billing | Billing actions, invoice list, past-due banner. |
organization | Organization list, overview, settings panels, slug input. |
onboarding | Onboarding form, setup progress card. |
notifications | Bell, inbox, preferences, admin broadcast composer. |
newsletter | Signup form, composer, history, preference card. |
pricing | Pricing cards, comparison table, subscribe button. |
marketing | Homepage sections (hero, features, FAQ…), nav and footer. |
legal | Legal document definitions in documents/. |
changelog | Changelog entries (changelog-data.ts) and components. |
status | Status page data and sections. |
cookie-consent | Cookie consent banner. |
dialog-manager | A global store and renderer to open dialogs from anywhere. |
resource-kit | Generic table, form sheet and detail view used by generated resources. |
projects, categories, org-projects | Example CRUD features. |
Files that only run on the server use the .server.ts suffix, like
features/newsletter/newsletter.server.ts. Server actions live in lib/, not in features/.
| File or folder | Purpose |
|---|
auth.ts | Better Auth server config: providers, plugins and hooks. |
auth-client.ts | Better Auth client for React components. |
auth-server.ts | getSession and getUser, cached per request. |
env.ts | Validated environment variables. |
safe-action.ts | action, authAction and nonDemoAction clients, ActionError. |
*-actions.ts | Server actions per domain (account, admin, organization, notification, newsletter, feedback, onboarding…). |
organization-server.ts | Server helpers for organization pages and membership checks. |
plans.ts | Plan queries and price formatting. |
stripe.ts | The Stripe client. |
email.ts | Resend client and sendEmail. |
storage.ts | S3 upload, download, delete and signed URLs. |
notifications/ | Notification event types and the notify function. |
onboarding.ts | Setup status used by the dashboard progress card. |
config/site-config.ts | Product name, URL, links and other identity settings. |
config/legal.ts | Company and legal details used by the legal pages. |
seo/ | createSeoHead metadata helper and JSON-LD. |
resource-kit/ | Manifest and helpers for generated resources. |
source.ts, blog.ts | Fumadocs loaders for content/docs and content/blog. |
providers.tsx, query.tsx | Client providers: theme, tooltips, TanStack Query, toasts, dialog manager, cookie consent. |
fonts/ | Font definitions with next/font (Geist, Geist Mono, Instrument Serif). |
utils.ts, utils/ | cn, slug helpers, user agent formatting, validation errors. |
| Folder | Contents |
|---|
ui | shadcn/ui components plus a few custom ones (submit-button, settings-card, stat…). |
layouts | Page layout, legal page layout, sidebar and navigation configs. |
layouts/sidebar | App sidebar, organization switcher, search command, plan selector. |
layouts/nav-configs | Sidebar navigation for the dashboard, account, organization and admin contexts. |
data-table | Faceted filter for TanStack tables. |
evilcharts, shadcn-space, spectrumui | Components installed from third-party shadcn registries. |
motion | Animated components, such as a rolling number. |
svgs | Inline SVG icons. |
Top-level files in components/ hold shared widgets used across features: the avatar uploader,
breadcrumb, feedback dialog, MDX components, theme provider and toggle, and the user dropdown.
| Path | Purpose |
|---|
auth-schema.ts | The whole database schema (auth, organizations, billing, app tables). |
db.ts | The Drizzle client, on a pg connection pool. |
migrate.ts | Applies migrations; run by pnpm db:migrate. |
0000_*.sql… | Generated SQL migrations, applied in order. |
meta/ | drizzle-kit snapshots and the migration journal. |
resources/ | JSON specs for the resource generator. |
| Script | Run with |
|---|
seed-plans.ts | pnpm db:seed:plans |
seed-demo.ts | pnpm db:seed:demo |
stripe-create-products.ts | pnpm stripe:products |
stripe-update-features.ts | pnpm stripe:update-features |
generate-resource.ts | pnpm resource:generate |
reset-project.ts | pnpm reset-project |
legal-check.ts | pnpm legal:check |
db-baseline.ts | pnpm db:baseline |
scripts/templates/ holds the code templates used by the resource generator, and
scripts/reset/templates/ the clean files that reset-project writes in place of demo ones.
.next/ and .source/ are generated by Next.js and Fumadocs. Do not edit them.
.claude/skills/legal-docs is a Claude Code skill that fills lib/config/legal.ts.
examples/ appears after you run pnpm reset-project. It holds the moved demo code and is
excluded from the build.