Skip to main content

Local Development Setup

1. Clone the Repository

git clone https://github.com/balasivapindra/TuroDashboard.git
cd TuroDashboard

2. Install Dependencies

npm install

3. Configure Environment Variables

cp .env.example .env.local
Edit .env.local with your Supabase credentials (see Environment Variables for the full reference):
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key

4. Set Up the Database

Follow the Supabase Setup guide to create your project and run migrations.

5. Start the Development Server

npm run dev
Open http://localhost:3000. You should see the login page.

6. Create a User Account

  1. Click “Sign Up” on the login page
  2. Enter your email and password
  3. Check your email for the confirmation link (or disable email confirmation in Supabase Auth settings for local dev)

Common Commands

CommandPurpose
npm run devStart dev server (port 3000)
npm run buildProduction build
npm run lintRun ESLint
npx tsc --noEmitType check without emitting
npm run testRun unit tests (Vitest)
npm run test -- --runRun tests once (no watch)
npx playwright testRun E2E tests

Troubleshooting

Kill the process using port 3000:
lsof -ti:3000 | xargs kill -9
Or start on a different port:
npm run dev -- -p 3001
  1. Verify your .env.local values match Supabase Dashboard > Settings > API
  2. Ensure your Supabase project is active (free tier pauses after inactivity)
  3. Check that migrations have been run
rm -rf node_modules .next
npm install
npm run dev