| Layer | Stack | Status |
|---|---|---|
| Auth | Supabase Auth, magic link/OTP, signup + login pages, useOtpFlow hook |
Ready |
| Database | Supabase Postgres, Drizzle ORM, empty schema | Ready |
| Background Jobs | pg-boss worker scaffold | Ready |
| Error Monitoring | Sentry client/server/edge, session replay, /monitoring tunnel |
Ready |
| Analytics | Vercel Analytics + Speed Insights | Ready |
| Design System | Tailwind v4 + shadcn/ui, zinc + indigo tokens | Ready |
| Tooling | ESLint, Prettier, Husky, lint-staged, madge | Ready |
| E2E Tests | Playwright auth flows against real local Supabase | Ready |
βββββββββββββββββββ ββββββββββββββββββββββββ
β Vercel β β Railway (optional) β
β Next.js App β β Worker (pg-boss) β
β β β Background jobs β
β Dashboard (CSR) β β β
β API Routes β ββββββββββββ¬βββββββββββββ
ββββββββββ¬ββββββββββ β
β β
ββββββββββββ¬ββββββββββββββββ
β
ββββββββββββΌβββββββββββββ
β Supabase Cloud β
β - Postgres (Drizzle) β
β - Auth (magic link) β
β - Storage (media) β
βββββββββββββββββββββββββ
Prerequisites: Node.js 24 LTS (.nvmrc included), Docker Desktop
git clone https://github.com/josheche/monolith-industries.git
cd monolith-industries
npm install
cp .env.example .env.local
npx supabase start # start local Postgres, Auth, Storage, Mailpit
npx supabase status # copy URLs + keys into .env.local
npm run dev # http://localhost:3000
npm run worker # optional: background job worker| Service | URL |
|---|---|
| App | http://localhost:3000 |
| Supabase Studio | http://127.0.0.1:54323 |
| Mailpit (emails) | http://127.0.0.1:54324 |
| Supabase API | http://127.0.0.1:54321 |
Core (.env.local for dev, Vercel for production):
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
DATABASE_URL=Sentry (Vercel only):
NEXT_PUBLIC_SENTRY_DSN=
SENTRY_ORG=
SENTRY_PROJECT=
SENTRY_AUTH_TOKEN=npm run dev # Next.js dev server (Turbopack)
npm run worker # pg-boss background worker
npm run build # production build
npm run lint # ESLint
npm run format # Prettier
npm test # Vitest
npm run check:circular # madge circular dep check
npx playwright test # E2E auth flow testsSchema starts empty at src/db/schema.ts. Add your tables:
npx drizzle-kit generate # create migration
npx drizzle-kit migrate # apply migrationcp .env.test.example .env.test # fill from `npx supabase status`
npx playwright test # requires local Supabase + dev serverEvery commit runs through:
git commit β Husky pre-commit
βββ lint-staged (eslint --fix + prettier --write)
βββ madge --circular
Prettier: no semi, single quotes, trailing commas, 100 char width
ESLint: flat config, Next.js Core Web Vitals + TypeScript
TypeScript: strict mode, @/* path alias
- Brand β replace "Monolith Industries" in
page.tsx, auth pages, dashboard layout - Accent color β swap indigo values in
globals.css(:rootand.dark) - Fonts β change in
layout.tsxvianext/font - Domain tables β add to
src/db/schema.ts, generate + migrate - API routes β add under
src/app/api/ - Background jobs β add in
src/worker/jobs/, register insrc/worker/index.ts
Vercel β auto-deploys on push to main
Railway (worker, optional) β start command: npm run worker
Supabase β create cloud project, run migrations, configure SMTP (Resend)
