Thank you for your interest in contributing to sim-gui! This guide will help you set up your development environment and understand the development workflow.
- Go 1.22.5 or later
- Node.js 22.x
- Docker (for containerized builds)
Build both the UI and the Go binary:
make buildThis will:
- Install UI dependencies
- Build the UI assets
- Copy built assets to
pkg/server/static/ - Build the Go binary for multiple platforms (linux-amd64, linux-arm64, darwin-arm64)
- Output binaries to
bin/directory
Build UI only:
cd ui
npm install
npm run buildBuild Go binary only:
go build -o bin/sim-gui main.goRun the server without serving static UI files (for frontend development):
go run main.go server --devOptions:
--addr: Server address (default::8080)--data-dir: Directory to store data (default:./data)--dev: Enable dev mode (do not serve static files)
Start the Vite dev server for hot-reload development:
cd ui
npm run devThe UI will be available at http://localhost:5173 and will proxy API requests to http://localhost:8080.
Make sure the backend is running in dev mode:
go run main.go server --dev-
Terminal 1: Start backend in dev mode
go run main.go server --dev
-
Terminal 2: Start frontend dev server
cd ui npm run dev -
Access the application at
http://localhost:5173
GET /api/workspaces- List all workspacesPOST /api/workspaces- Create a new workspaceGET /api/workspaces/{name}- Get workspace detailsDELETE /api/workspaces/{name}- Delete a workspacePUT /api/workspaces/{name}- Rename a workspaceGET /api/workspaces/{name}/kubeconfig- Export merged kubeconfig for all running versionsPOST /api/workspaces/{name}/clean-all- Clean all workspace imagesPOST /api/workspaces/{name}/resource-history- Get resource historyGET /api/workspaces/{name}/namespaces- List namespacesGET /api/workspaces/{name}/resource-types- List resource typesGET /api/workspaces/{name}/resources- Get resources
POST /api/workspaces/{name}/versions- Upload a new versionPOST /api/workspaces/{name}/versions/{versionID}/start- Start simulatorPOST /api/workspaces/{name}/versions/{versionID}/stop- Stop simulatorGET /api/workspaces/{name}/versions/{versionID}/status- Get simulator statusGET /api/workspaces/{name}/versions/{versionID}/kubeconfig- Get kubeconfigDELETE /api/workspaces/{name}/versions/{versionID}- Delete a versionPOST /api/workspaces/{name}/versions/{versionID}/clean-image- Clean version imagePOST /api/workspaces/{name}/versions/{versionID}/code-server- Start code server
POST /api/clean-all- Clean all images
.
├── pkg/
│ ├── server/ # HTTP server and API handlers
│ │ ├── api/ # API routes and handlers
│ │ ├── model/ # Data models
│ │ ├── store/ # Data storage layer
│ │ └── static/ # Embedded UI assets (generated)
│ ├── docker/ # Docker client utilities
│ └── kubeconfig/ # Kubeconfig utilities
├── ui/ # React frontend application
│ ├── src/
│ │ ├── api/ # API client
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ └── types/ # TypeScript types
│ └── dist/ # Built UI assets (generated)
└── scripts/ # Build and CI scripts