Environment Setup
This guide walks you through setting up a complete local development environment for building, debugging, and running RUSEON Core.
Prerequisites
Ensure your system has the following dependencies installed:
| Tool | Minimum Version | Purpose |
|---|---|---|
| Go | 1.26+ | Compiling backend services and CLI binaries |
| Node.js | 24+ (LTS recommended) | Building and running the React 19 web interface |
| npm | 10+ | Managing frontend package dependencies |
| Docker & Docker Compose | Latest | Running Testcontainers E2E tests and mock RTSP sources |
| Git | 2.40+ | Source control and Git hooks |
1. Clone the Repository
Clone the repository and navigate to the project root:
git clone https://github.com/RUSEGAL/ruseon-core.git
cd ruseon-core2. Backend Setup & Build
RUSEON Core builds with pure standard Go tooling. CGO is not required for standard builds (CGO_ENABLED=0).
Download Go Modules
go mod download
go mod verifyBuild Binaries
To build both the standalone streaming server and the administrative CLI:
# Build the core server binary
CGO_ENABLED=0 go build -o bin/ruseon cmd/server/main.go
# Build the CLI utility
CGO_ENABLED=0 go build -o bin/ruseon-cli cmd/ruseon-cli/main.goOn Windows, you can compile native executable files:
go build -o bin/ruseon.exe cmd/server/main.go
go build -o bin/ruseon-cli.exe cmd/ruseon-cli/main.go3. Frontend Setup & Build
The frontend is located in the web/ directory and utilizes React 19, Vite, and TypeScript.
Install Node Dependencies
cd web
npm installBuild Embedded Production Assets
The Go server embeds the built React application at compile time via go:embed. Generate the static distribution bundle:
npm run buildThis compiles the SPA into web/dist/, which is embedded into the Go binary.
Development Mode with Hot Module Replacement (HMR)
For active UI development, run Vite dev server with proxy support:
npm run devBy default, Vite runs at http://localhost:5173 and proxies API requests (/api/*, /live/*, /webrtc/*) to the backend server running on http://localhost:8080.
4. Running the Development Server
Create a local configuration file from the template:
cp config.example.yaml config.yamlStart the backend server:
./bin/ruseon -config config.yamlThe server initializes the BadgerDB database in ./data/db, binds the HTTP server to port 8080, and prepares RTSP ingestion channels.
Verify the server is running by querying the health probe:
curl -i http://localhost:8080/livezExpected response: HTTP/1.1 200 OK with JSON status.
Common Development Workflows
# Run all backend unit tests with race detection
go test -race ./...
# Format and lint backend code
golangci-lint run
# Format and lint frontend code
cd web && npm run lint