You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NestJS (Prisma) + Go (sqlc) + PostgreSQL, runnable with Docker Compose.
Stack
Service
Tech
Role
api
NestJS + Prisma
REST API, auth, CRUD
vpn
Go + sqlc
VPN logic, config, high concurrency
postgres
PostgreSQL 16
Shared database
Quick start
# From repo root (backend/)
cp .env.example .env
docker compose up -d
# API: http://localhost:3000# VPN: http://localhost:8080# Health: GET /health on each
docker compose up -d postgres
# DATABASE_URL=postgresql://vpn:vpn_secret@localhost:5432/vpn_db
API (NestJS)
cd services/api
cp ../../.env.example .env # or set DATABASE_URL
npm install
npx prisma migrate dev
npm run start:dev
VPN (Go)
cd services/vpn
# Install sqlc: go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
sqlc generate # after changing db/queries or db/schema
go run ./cmd/server
sqlc (Go) needs matching SQL: keep services/vpn/db/schema/*.sql in sync with Prisma (or export from DB with pg_dump --schema-only and point sqlc at that).