Skip to main content
This guide covers running the platform in development mode, building for production, and the available Makefile targets.

Development mode

Run the backend and frontend in separate terminals for hot reload on both:
1

Start the backend

The Go server starts on port 8080 and connects to your current Kubernetes context.
2

Start the frontend

Vite starts on port 5173 with hot module reloading. API calls (/api/*) and WebSocket (/ws) are proxied to the backend on port 8080.
3

Open in browser

Open http://localhost:5173 for the development server with hot reload.
In development mode, use port 5173 (Vite) for the frontend. Port 8080 (Go) serves the API but won’t have the latest frontend changes unless you rebuild.

Makefile targets

Production build

Build a single binary with the frontend embedded:
This runs three steps:
  1. Builds the React app to web/dist
  2. Copies web/dist to pkg/server/static
  3. Compiles the Go binary with //go:embed static
The resulting binary at ./bin/server contains everything — no external files needed.

Project dependencies

The versions below are upstream library versions — they are not Dorgu release versions.

Backend

Frontend

Adding a new API endpoint

  1. Add the handler function in pkg/api/clusters.go (or create a new file)
  2. Register the route in pkg/server/server.go in setupRoutes()
  3. Add tests in pkg/api/*_test.go
  4. Run make test

Adding a new frontend component

  1. Create the component in web/src/components/
  2. Create a React Query hook in web/src/hooks/ if data fetching is needed
  3. Add the TypeScript interface in web/src/lib/api.ts
  4. Import and use in the relevant page
  5. Test in dev mode: npm run dev

Testing

Architecture

How the platform is structured

Installation

Production deployment options