Local Development
Set up your development environment with all tools and services needed to run locally.
Prerequisites
Cursor IDE
AI-powered code editor
Docker Desktop
For local PostgreSQL
Node.js 18+
JavaScript runtime
Git
Version control
Install pnpm
npm install -g pnpm
Setup
1. Clone & Install
git clone https://github.com/your-username/your-repo.gitcd your-repopnpm installcp .env.example .env
2. Start Database
chmod +x start-database.sh./start-database.sh
Creates a PostgreSQL container and generates a secure password.
3. Initialize Schema
pnpm db:generatepnpm db:push
Configure Services
Auth Secret
openssl rand -base64 32
.env
AUTH_SECRET="your-generated-secret"
Google OAuth
- 1. Go to Google Cloud Console
- 2. Create OAuth credentials (Web Application)
- 3. Add origin:
http://localhost:3000 - 4. Add redirect:
http://localhost:3000/api/auth/callback/google
.env
AUTH_GOOGLE_ID="your-client-id.googleusercontent.com"AUTH_GOOGLE_SECRET="your-client-secret"
Stripe (Test Mode)
Get test keys from Stripe Dashboard. Create products and copy price IDs.
.env
STRIPE_SECRET_KEY="sk_test_..."NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."STRIPE_PRICE_PRO_MONTHLY="price_..."STRIPE_PRICE_PRO_YEARLY="price_..."STRIPE_PRICE_ULTRA_MONTHLY="price_..."STRIPE_PRICE_ULTRA_YEARLY="price_..."
Use test card 4242 4242 4242 4242 for testing.
Start Development
pnpm dev
Visit http://localhost:3000
Next: Production Deployment
Deploy to Vercel with Neon PostgreSQL