Development Overview
RUSEON Core is an enterprise-grade video data infrastructure and AI media pipeline engine engineered in Go. The platform is designed around zero-copy memory management, low-latency transmuxing (RTSP to HLS and WebRTC/WHEP), crash-resilient fMP4 recording with Linux kernel I/O hints, and gRPC-driven AI metadata delivery.
This section provides comprehensive instructions for setting up your local development environment, running test suites, executing benchmarks, contributing code, and understanding CI/CD automation.
Technology Stack
| Layer | Technologies & Libraries | Key Responsibilities |
|---|---|---|
| Core Backend | Go 1.26+, gorilla/websocket, pion/webrtc | High-throughput transmuxing, ring buffer broadcaster, WHEP server |
| State Storage | BadgerDB v4 (dgraph-io/badger/v4) | Embedded ACID key-value state store with sync write durability |
| AI Metadata Pipeline | gRPC (google.golang.org/grpc), Protocol Buffers | Low-overhead telemetry and bounding box ingestion |
| Metrics & Probes | Prometheus (prometheus/client_golang) | Real-time observability, buffer drop tracking, /livez & /readyz |
| Frontend UI | React 19, TypeScript, Vite, Tailwind CSS, Lucide Icons | Responsive edge dashboard, live WHEP players, fMP4 timeline |
| Testing & CI | Testcontainers, k6, Go Native Fuzzing, GitHub Actions | Full-pipeline E2E validation, load stress testing, static analysis |
Repository Layout
The codebase follows idiomatic Go project standards:
text
ruseon-core/
├── api/ # Protocol Buffer (.proto) definitions and OpenAPI Swagger specs
├── cmd/
│ ├── server/ # Main HTTP/WebRTC/HLS/gRPC server entry point
│ └── ruseon-cli/ # Administrative and operational CLI tool
├── internal/
│ ├── api/ # REST HTTP handlers, middleware, and routing
│ ├── auth/ # JWT authentication and user management
│ ├── buffer/ # Zero-copy RingBuffer and lock-free broadcaster
│ ├── config/ # YAML and environment variable configuration loader
│ ├── db/ # BadgerDB v4 persistence, schema migrations, and transactions
│ ├── events/ # Webhooks engine with circuit breakers and MQTT publisher
│ ├── grpc/ # gRPC server implementation for AI metadata ingestion
│ ├── metrics/ # Prometheus metrics collectors and telemetry registry
│ ├── recorder/ # fMP4 direct I/O archiver with sliding-window sync
│ └── stream/ # RTSP client, Pion WebRTC engine, and HLS muxer
├── pkg/ # Reusable public packages and generated gRPC bindings
├── tests/ # End-to-end (E2E) integration tests with Testcontainers
└── web/ # React 19 single-page application (SPA)Core Development Principles
- Zero Allocations in the Hot Path: Frame distribution through Ring Buffer avoids heap copies and GC overhead.
- Crash Resilience: Archive recording uses direct I/O hints (
sync_file_range,FADV_DONTNEED) to protect Linux Page Cache. - High Test Coverage: Every PR must pass Go race detection (
-race), unit tests, fuzz tests, and full E2E pipeline integration. - Strict Localization & Documentation: All public features and APIs are fully documented in English and Russian.
Next Steps in This Section
- Environment Setup — Toolchain requirements, dependencies, and building the server.
- Testing Guide — Unit, integration, fuzzing, chaos, and load testing.
- CI/CD Workflows — GitHub Actions pipeline details and security scans.
- Contributing Guidelines — Git workflow, branch naming, and code style.