Skip to main content
For faster iteration, you can run the Go backend and Next.js frontend locally while using Docker only for infrastructure services.

Start Infrastructure

Run TimescaleDB and Redis via Docker:
docker compose up timescaledb redis -d
Or use locally installed instances if you prefer.

Backend

1

Install Go dependencies

go mod download
2

Set environment variables

cp .env.example .env
# Edit .env with your configuration
3

Run the server

go run ./cmd/server
The backend starts on http://localhost:8080.For hot reload during development, use air:
# Install air
go install github.com/air-verse/air@latest

# Run with hot reload
air
Air configuration is in .air.toml.

Frontend

1

Install dependencies

cd apps/web
pnpm install
2

Configure backend URL

The frontend needs to know where the backend is. Set in your environment or .env.local:
BACKEND_BASE_URL=http://localhost:8080    # Server-side requests
BACKEND_PUBLIC_URL=http://localhost:8080   # Client-side requests
3

Start dev server

pnpm dev
The frontend starts on http://localhost:3000 with Turbopack hot module replacement.

Useful Commands

CommandDescription
go run ./cmd/serverStart backend
cd apps/web && pnpm devStart frontend
go test ./...Run backend tests
make checkFast quality gate (fmt, vet, lint, test)
make lintRun staticcheck
make coverageGenerate coverage report

Database Migrations

Migrations run automatically on server startup. The server reads all .sql files from the migrations/ directory and applies them in order. To verify migrations against a real database:
make db-check