Skip to main content

Documentation Index

Fetch the complete documentation index at: https://dorguai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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

cd dorgu-platform
make run
The Go server starts on port 8080 and connects to your current Kubernetes context.
2

Start the frontend

cd dorgu-platform/web
npm install
npm run dev
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

TargetDescription
make frontendBuild the React app (web/dist)
make buildBuild Go binary with embedded frontend
make runRun the Go backend in development mode
make testRun Go tests with coverage
make lintRun linters
make cleanRemove build artifacts

Production build

Build a single binary with the frontend embedded:
make build
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

Backend

DependencyVersionPurpose
k8s.io/client-gov0.29.0Kubernetes client
k8s.io/apimachineryv0.29.0Kubernetes API types
github.com/gorilla/muxv1.8.1HTTP router
github.com/gorilla/websocketv1.5.3WebSocket protocol

Frontend

DependencyVersionPurpose
reactv19.2UI framework
react-router-domv7.13Client-side routing
@tanstack/react-queryv5.91Server state management
axiosv1.13HTTP client
tailwindcssv3.4Utility-first CSS
lucide-reactv0.577Icons
vitev8.0Build tool

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

# Run Go tests
make test

# Run with race detector
go test -v -race ./...

# Run frontend type checking
cd web && npx tsc --noEmit

Architecture

How the platform is structured

Installation

Production deployment options