Quickstart
Prerequisites
Section titled “Prerequisites”- Node.js 18+ (recommended 20+)
pnpm- PostgreSQL running locally (or reachable test instance)
- Google OAuth credentials (optional if you will not test OAuth)
- Resend API key (production only)
Installation
Section titled “Installation”# from repository rootcd backendpnpm install
cd ../frontendpnpm installConfiguration
Section titled “Configuration”Use backend defaults from .env.example and frontend local env files:
PORT=5000NODE_ENV=developmentDATABASE_URL=postgresql://user:password@localhost:5432/korta
JWT_SECRET=change-me-strong-secretGOOGLE_CLIENT_ID=your-google-client-idGOOGLE_CLIENT_SECRET=your-google-client-secretGOOGLE_CALLBACK_URL=http://localhost:5000/api/v1/auth/google/callback
FRONTEND_URL=http://localhost:5173# Optional. If unset, backend falls back to FRONTEND_URL.CORS_ORIGINS=http://localhost:5173EMAIL_FROM=noreply@korta.clickTRUST_PROXY_HOPS=0
# Optional test/toolingTEST_DATABASE_URL=postgresql://user:password@localhost:5432/korta_testSHADOW_DATABASE_URL=postgresql://user:password@localhost:5432/korta_shadow
# Production only# RESEND_API_KEY=re_your_resend_api_keyVITE_API_URL=http://localhost:5000/api/v1VITE_GOOGLE_AUTH_URL=http://localhost:5000/api/v1/auth/googleVITE_BASE_URL=http://localhost:5173Run locally
Section titled “Run locally”Open two terminals:
# terminal 1: backendcd backendpnpm prisma:generate:localpnpm dev:local# terminal 2: frontendcd frontendpnpm devOptional local test flow:
cd backendpnpm prisma:migrate:deploy:test:localpnpm test:localCurrent backend E2E status: 46/46 passing.
Verify setup
Section titled “Verify setup”- Open
http://localhost:5173and create an anonymous short URL from landing page. - Open
http://localhost:5000/api/v1/healthand confirm response is:
{"status":"OK"}- (Optional) Register/login and test OAuth flow.
Next step
Section titled “Next step”Review Environment Variables.