A modern Node.js starter template with TypeScript, Prisma, and database integration for building scalable applications.
- Node.js 18+
- PNPM package manager
- Supabase account
# Clone and install dependencies
pnpm install
# Set up environment variables
cp .env.example .env- Create Project: Navigate to your Supabase Dashboard
- Get Connection URLs:
- Go to Project Settings → Database
- Copy the Session pooler URL as both
DATABASE_URLandDIRECT_URL
Create a .env file in your project root:
DATABASE_URL="postgresql://[user]:[password]@[host]:5432/[database]"
DIRECT_URL="postgresql://[user]:[password]@[host]:5432/[database]"Note: Replace
[YOUR-PASSWORD]with your actual database password from Supabase settings.
# Initialize Prisma (if needed)
pnpm prisma init
# Run migrations
pnpm db:migrate [migration-name]
# Generate Prisma client (after schema changes)
pnpm db:generatepnpm start| Issue | Solution |
|---|---|
| Connection Error (P1001) | Disable VPN and retry |
| Schema Error (P4002) | Create a fresh Supabase project |
| Migration Issues | Ensure DATABASE_URL and DIRECT_URL are correctly set |
| Prepared Statement Error | Use Session pooler for both DATABASE_URL and DIRECT_URL |
Built with ❤️ using TypeScript, Prisma, and Node.js