Install dependencies
Configure environment variables
Copy the example env file and fill in your Supabase credentials:Then edit Find your credentials in the Supabase dashboard under Project Settings → API.
.env:Run database migrations
The schema lives in
supabase/migrations/. Execute the SQL files against your Supabase project in order.- Supabase CLI
- Supabase Dashboard
There are 52 migration files. The earliest files (
001_, 002_, 003_) establish the core schema. Later files add features incrementally. Always run them in filename order.Start the development server
Access the admin panel
Navigate to http://localhost:5173/admin.The Replace
AdminGuard component checks the admin_users table in Supabase. To grant admin access, insert a row:your-auth-user-uuid with the UUID from auth.users for the account you want to elevate.Available Scripts
| Script | Command | Description |
|---|---|---|
| Dev server | npm run dev | Starts Vite dev server at localhost:5173 |
| Production build | npm run build | Runs tsc && vite build && generate-sitemap |
| Preview build | npm run preview | Serves the production build locally |
| Type check | npm run typecheck | Runs tsc --noEmit — no output means no errors |
| Lint | npm run lint | ESLint over src/ |
| Lint (auto-fix) | npm run lint:fix | ESLint with --fix |
| Generate sitemap | npm run generate-sitemap | Outputs sitemap.xml to dist/ |
Verify your setup
After starting the dev server, confirm:- The homepage loads at
http://localhost:5173/without a red error screen npm run typecheckexits with no errors- Navigating to
/admineither shows the dashboard (if you have an admin row) or redirects to login
