The application requires PostgreSQL to be running at localhost:5432, but it's currently not available.
- Download PostgreSQL installer from: https://www.postgresql.org/download/windows/
- Run the installer and follow these steps:
- Set password for postgres user (use:
postgresto match our config) - Keep default port:
5432 - Install PostgreSQL service
- Set password for postgres user (use:
- After installation, PostgreSQL should start automatically
- Create the database:
psql -U postgres -c "CREATE DATABASE \"codebase-underway\";"
If you have Docker installed:
docker run --name postgres-dev -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=codebase-underway -p 5432:5432 -d postgres:15-
Sign up for a free PostgreSQL database at:
- Supabase: https://supabase.com (free tier available)
- Neon: https://neon.tech (free tier available)
- Railway: https://railway.app (free tier available)
-
After creating a database, replace the DATABASE_URL in
.env.localwith the provided connection string.
Example Supabase URL:
DATABASE_URL="postgresql://postgres:[YOUR-PASSWORD]@db.[PROJECT-REF].supabase.co:5432/postgres"
For testing the UI without a real database, we can modify the actions to use in-memory data:
- The code already has auth bypass enabled
- We can add a mock data layer
Once PostgreSQL is running, run these commands:
# Generate Prisma client
pnpm prisma generate
# Push the schema to create tables
pnpm prisma db push
# (Optional) Seed with test data
pnpm prisma db seed- Auth Bypass: Already enabled (using test user ID:
cmfo808py0000ix1ke1o3uzsv) - Console Logging: Extensive logging added to track operations
- Lead Import: Functionality ready, just needs database connection
After setting up the database:
- Navigate to: http://localhost:3004/en/test-import
- Click "Create Test Lead" to verify database connection
- Use the import features at http://localhost:3004/en/leads
If you see the error:
Can't reach database server at localhost:5432
Check:
- Is PostgreSQL service running? (Windows: Check Services app)
- Is port 5432 available? (Check with
netstat -an | findstr :5432) - Are credentials correct in
.env.local? - Try connecting manually:
psql -U postgres -h localhost -p 5432