TheShipStack Docs

Folder Structure

A high-level map of the repo layout and the files you'll touch most.

├── actions/          # Server actions — billing, team, workspace, projects, notifications
├── app/
│   ├── (auth)/       # Sign-in, sign-up, password reset, accept invitation
│   ├── (dashboard)/  # All protected routes (dashboard, settings, team, pricing…)
│   ├── (onboarding)/ # Post sign-up onboarding flow
│   └── api/          # Auth handler, upload handler, Stripe webhooks
├── components/
│   ├── auth/         # Auth form components
│   ├── dashboard/    # Sidebar, org switcher, notifications, pricing cards, settings tabs
│   ├── documents/    # Documents table, form, dialogs
│   ├── projects/     # Projects table, form, dialogs
│   ├── team/         # Team table, invite sheet, remove dialog
│   └── ui/           # All shadcn/ui components
├── db/
│   ├── schema/       # Drizzle table definitions — add new tables here
│   └── index.ts      # Drizzle client
├── emails/           # React Email templates (invite, verify, reset password)
├── hooks/            # TanStack Query client hooks
├── lib/              # Core utilities — auth, env, plans, permissions, stripe, notify
├── store/            # Zustand global store
├── __tests__/        # Vitest unit tests
├── e2e/              # Playwright E2E tests
├── proxy.ts          # Edge middleware (route protection + redirects)
└── docker-compose.yml  # Local services — Postgres, MinIO, Mailpit

Files you'll touch most

FileWhat it's for
lib/env.tsAll env vars — import env or clientEnv, never process.env directly
lib/plans.tsBilling plan definitions — prices, limits, Stripe Price IDs
lib/permissions.tsRBAC roles and permissions — extend to add new resources
lib/notify.tsNotification helpers — fire from any server action
constants/routes.tsAdd new protected or auth routes here
db/schema/Add new tables here, then run pnpm db:push
proxy.tsRuns before every request — add redirect or auth logic here

On this page