Internal CRM for Momentum Labz — built with Next.js 14 (App Router), TypeScript, Tailwind CSS, and Supabase.
For the complete feature, architecture, database, security, setup, testing, and development-history reference, see OVERVIEW.md.
npm install
cp .env.local.example .env.local
Open .env.local and fill in your Supabase project credentials:
NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here
Find these in your Supabase project → Project Settings → API.
supabase/schema.sqlsupabase/seed.sql (inserts the 9 default pipeline stages)In your Supabase dashboard:
http://localhost:3000 for local developmenthttp://localhost:3000/auth/callback to your Redirect URLs allowlistnpm run dev
Open http://localhost:3000 — you’ll be redirected to /login.
src/
├── app/
│ ├── (auth)/ # Auth routes (no sidebar/topbar)
│ │ ├── layout.tsx # Centered layout for login page
│ │ └── login/page.tsx # Email/password + magic link login
│ ├── (app)/ # Protected app routes (with sidebar/topbar)
│ │ ├── layout.tsx # App shell: sidebar + topbar + main
│ │ ├── page.tsx # / → Dashboard
│ │ ├── leads/page.tsx # /leads → Leads
│ │ ├── tasks/page.tsx # /tasks → Tasks & Follow-ups
│ │ ├── proposals/page.tsx
│ │ ├── contacts/page.tsx
│ │ ├── clients/page.tsx
│ │ ├── analytics/page.tsx
│ │ └── settings/page.tsx
│ ├── auth/callback/route.ts # Magic link / OAuth callback
│ ├── layout.tsx # Root layout (Inter font, globals.css)
│ └── globals.css # Design system CSS tokens + base styles
├── components/
│ ├── shell/
│ │ ├── Sidebar.tsx # 240px sidebar with nav groups
│ │ └── Topbar.tsx # 64px topbar with search + notifications
│ └── ui/
│ └── EmptyState.tsx # Reusable empty state component
├── lib/supabase/
│ ├── client.ts # Browser-side Supabase client
│ └── server.ts # Server-side Supabase client (cookies)
├── middleware.ts # Auth session refresh + route protection
└── types/
└── supabase.ts # TypeScript types matching DB schema
supabase/
├── schema.sql # Full DDL — run once in SQL Editor
└── seed.sql # Default pipeline stages — run after schema
public/
└── logo.png # Momentum Labz logo (transparent bg)
All styling follows momentumlabzz_CRM_Design_System_v1.0 exactly:
globals.css and tailwind.config.tsdisplay (32px) to micro (11px uppercase), tabular numerals on all numeric contentnpm run dev # Start development server
npm run build # Production build (TypeScript check included)
npm run lint # ESLint
| Phase | Content |
|---|---|
| Phase 0 done | Project setup, design tokens, schema, auth, app shell |
| Phase 1 | Lead list/Kanban, add/edit form, detail drawer, CSV import |
| Phase 2 | Tasks/follow-ups, full dashboard (KPI cards, charts) |
| Phase 3 | Proposals, tags, settings pages |
| Phase 4 | Analytics and reports |
| Phase 5 | Client portal bridge |
| Phase 6 | Command palette, mobile pass, notifications |