Skip to content

Quickstart

  • Node.js 18+ (recommended 20+)
  • pnpm
  • PostgreSQL running locally (or reachable test instance)
  • Google OAuth credentials (optional if you will not test OAuth)
  • SMTP credentials (required for email verification flow)
Terminal window
# from repository root
cd backend
pnpm install
cd ../frontend
pnpm install

Create env files for backend and frontend:

backend/.env.development
PORT=5000
NODE_ENV=development
DATABASE_URL=postgresql://user:password@localhost:5432/korta
TEST_DATABASE_URL=postgresql://user:password@localhost:5432/korta_test
SHADOW_DATABASE_URL=postgresql://user:password@localhost:5432/korta_shadow
JWT_SECRET=change-me-strong-secret
FRONTEND_URL=http://localhost:5173
CORS_ORIGINS=http://localhost:5173
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_CALLBACK_URL=http://localhost:5000/api/v1/auth/google/callback
SMTP_HOST=smtp.resend.com
SMTP_PORT=587
SMTP_USER=resend
SMTP_PASS=your-resend-api-key
EMAIL_FROM=onboarding@resend.dev
# frontend/.env
VITE_API_URL=http://localhost:5000/api/v1
VITE_GOOGLE_AUTH_URL=http://localhost:5000/api/v1/auth/google
VITE_BASE_URL=http://localhost:5173

Open two terminals:

Terminal window
# terminal 1: backend
cd backend
pnpm prisma:generate:local
pnpm dev:local
Terminal window
# terminal 2: frontend
cd frontend
pnpm dev

Optional local test flow:

Terminal window
cd backend
pnpm prisma:migrate:deploy:test:local
pnpm test:local

Current backend E2E status: 46/46 passing.

  • Open http://localhost:5173 and create an anonymous short URL from landing page.
  • Open http://localhost:5000/api/v1/health and confirm response is:
{"status":"OK"}
  • (Optional) Register a user and verify email flow if SMTP is configured.

Review Environment Variables.