Skip to content

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:

ToolMinimum VersionPurpose
Go1.26+Compiling backend services and CLI binaries
Node.js24+ (LTS recommended)Building and running the React 19 web interface
npm10+Managing frontend package dependencies
Docker & Docker ComposeLatestRunning Testcontainers E2E tests and mock RTSP sources
Git2.40+Source control and Git hooks

1. Clone the Repository ​

Clone the repository and navigate to the project root:

bash
git clone https://github.com/RUSEGAL/ruseon-core.git
cd ruseon-core

2. Backend Setup & Build ​

RUSEON Core builds with pure standard Go tooling. CGO is not required for standard builds (CGO_ENABLED=0).

Download Go Modules ​

bash
go mod download
go mod verify

Build Binaries ​

To build both the standalone streaming server and the administrative CLI:

bash
# 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.go

On Windows, you can compile native executable files:

powershell
go build -o bin/ruseon.exe cmd/server/main.go
go build -o bin/ruseon-cli.exe cmd/ruseon-cli/main.go

3. Frontend Setup & Build ​

The frontend is located in the web/ directory and utilizes React 19, Vite, and TypeScript.

Install Node Dependencies ​

bash
cd web
npm install

Build Embedded Production Assets ​

The Go server embeds the built React application at compile time via go:embed. Generate the static distribution bundle:

bash
npm run build

This 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:

bash
npm run dev

By 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:

bash
cp config.example.yaml config.yaml

Start the backend server:

bash
./bin/ruseon -config config.yaml

The 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:

bash
curl -i http://localhost:8080/livez

Expected response: HTTP/1.1 200 OK with JSON status.

Common Development Workflows ​

bash
# 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

Released under the MIT License.