Prerequisites
Before installing the web dashboard, ensure you have:Node.js 20+
LTS version recommended for stability
pnpm or npm
Package manager (pnpm is recommended)
Supabase Project
Backend setup with database tables
Git
For cloning the repository
Installation Steps
Install Dependencies
Install the project dependencies using your preferred package manager:
The project uses pnpm by default. Check
pnpm-lock.yaml in the repository.Configure Environment Variables
Create a Get your Supabase credentials:
.env.local file in the web/ directory:.env.local
- Go to your Supabase Dashboard
- Select your project
- Navigate to Settings → API
- Copy the Project URL and anon/public key
Start Development Server
Run the Next.js development server:The dashboard will be available at
http://localhost:3000Project Structure
After installation, you’ll have this structure:Development Workflow
Hot Module Replacement
Next.js provides fast refresh for instant feedback:- Edit any file in
app/orcomponents/ - Changes appear instantly without losing state
- TypeScript errors show in the browser
TypeScript
The project uses TypeScript with strict mode:Linting
Run ESLint to check code quality:Building for Production
Test a production build locally:http://localhost:3000
Troubleshooting
Port 3000 already in use
Port 3000 already in use
Change the port with the Or set the
-p flag:PORT environment variable:Supabase connection errors
Supabase connection errors
Check your environment variables:
- Verify
.env.localexists in theweb/directory - Confirm
NEXT_PUBLIC_SUPABASE_URLis correct - Confirm
NEXT_PUBLIC_SUPABASE_ANON_KEYis the anon/public key - Restart the dev server after changing env vars
Module not found errors
Module not found errors
Clear caches and reinstall:
Authentication redirect loop
Authentication redirect loop
This happens when middleware and auth state are out of sync:
- Clear browser cookies for
localhost:3000 - Clear Next.js cache:
rm -rf .next - Verify middleware logic in
middleware.ts - Check Supabase auth settings
Tailwind styles not applying
Tailwind styles not applying
Ensure Tailwind CSS is properly configured:
- Check
tailwind.config.jsexists - Verify
@tailwinddirectives inglobals.css - Restart dev server
- Clear browser cache
Next Steps
Configuration
Configure the dashboard settings
Analytics
Explore analytics features
User Management
Manage employee accounts
Deployment
Deploy to production