Codebase
Project Structure
Every folder in Creator and what it contains.
Root directory
├── app/ → Next.js App Router pages and API routes
├── components/ → React components
│ ├── ui/ → shadcn/ui primitives (Button, Card, Dialog, etc.)
│ └── shared/ → App-level components (Logo, Footer, Analytics, etc.)
├── config/ → Centralized configuration files
├── drizzle/ → Generated SQL migration files
├── hooks/ → Custom React hooks
├── lib/ → Core business logic
│ ├── auth/ → Authentication config, guards, adapter
│ ├── db/ → Database schema, client, queries
│ ├── schemas/ → Zod validation schemas
│ └── services/ → External service integrations
├── public/ → Static assets (favicon, images, fonts)
├── proxy.ts → Next.js middleware (auth, route protection)
├── drizzle.config.ts → Drizzle Kit configuration
├── next.config.ts → Next.js configuration (Sentry wrapper)
├── package.json → Dependencies and scripts
└── tsconfig.json → TypeScript configurationApp directory
app/
├── layout.tsx → Root layout (ThemeProvider, AuthProvider, Toaster, Analytics)
├── globals.css → Global styles, Tailwind v4 theme, OKLCH colors
├── (public)/ → Public marketing routes
│ ├── layout.tsx → Navbar + Footer wrapper
│ └── page.tsx → Landing page (Hero, Features, Pricing, FAQ, etc.)
├── (protected)/ → Authenticated routes
│ ├── layout.tsx → Sidebar + auth check (redirects if not logged in)
│ ├── dashboard/page.tsx → User dashboard
│ ├── account/ → Profile, subscription, notifications pages
│ ├── pricing/page.tsx → Pricing page (also accessible authenticated)
│ └── admin/ → Admin-only routes
│ ├── dashboard/ → Admin dashboard with stats and charts
│ ├── users/ → User management (list + detail)
│ └── configuration/ → Site configuration display
├── auth/ → Authentication pages
│ ├── layout.tsx → Centered card layout with Logo
│ ├── login/ → Login form
│ ├── signup/ → Signup form (redirects if registration disabled)
│ ├── otp/ → OTP verification
│ ├── forgot-password/ → Password reset request
│ ├── reset-password/ → Password reset form
│ └── verify-email-change/ → Email change verification
├── api/ → API routes
│ ├── auth/ → Register, OTP, password reset, redirect
│ ├── user/ → Profile, avatar, email, password, notifications
│ ├── admin/ → Users list, user detail, stats
│ ├── stripe/ → Checkout, portal, webhook, plans, status, invoices
│ ├── lemonsqueezy/ → Checkout, webhook
│ ├── contact/ → Contact form submission
│ ├── download/ → Signed file download
│ └── resend/webhook/ → Inbound email forwardingConfig directory
config/
├── app.config.ts → App name, signup toggle, theme, analytics settings
├── billing.config.ts → Plans, prices, Stripe/LS IDs, feature gating helpers
├── routes.config.ts → Base URL, auth/admin prefixes, redirect paths
├── public-routes.config.ts → Public route paths (/, /terms, /privacy, etc.)
├── auth-routes.config.ts → Auth-only routes (login, signup, otp, etc.)
└── menu.config.ts → Navbar, sidebar, admin, footer menu definitionsLib directory
Core business logic lives in lib/. It's organized into sub-directories for auth, database, schemas, and external service integrations. Explore the files directly to see how each module is structured.
Files safe to edit
These are the files you'll modify most often:
config/*.ts— App settings, billing plans, menus, routeslib/db/schema.ts— Add new tables or columnslib/db/queries/*.ts— Add new database querieslib/services/email-service.ts— Add new email templatesapp/(public)/page.tsx— Customize the landing pageapp/globals.css— Change colors and themecomponents/shared/*— Customize shared components
Files you should not edit
lib/auth/drizzle-adapter.ts— NextAuth adapter, changes can break authlib/auth/config.ts— Only modify if adding new providers or changing callbackscomponents/ui/*— Generated by shadcn/ui CLI, prefer adding new components over modifying existing ones