Skip to content

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 ​

LayerTechnologies & LibrariesKey Responsibilities
Core BackendGo 1.26+, gorilla/websocket, pion/webrtcHigh-throughput transmuxing, ring buffer broadcaster, WHEP server
State StorageBadgerDB v4 (dgraph-io/badger/v4)Embedded ACID key-value state store with sync write durability
AI Metadata PipelinegRPC (google.golang.org/grpc), Protocol BuffersLow-overhead telemetry and bounding box ingestion
Metrics & ProbesPrometheus (prometheus/client_golang)Real-time observability, buffer drop tracking, /livez & /readyz
Frontend UIReact 19, TypeScript, Vite, Tailwind CSS, Lucide IconsResponsive edge dashboard, live WHEP players, fMP4 timeline
Testing & CITestcontainers, k6, Go Native Fuzzing, GitHub ActionsFull-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 ​

  1. Zero Allocations in the Hot Path: Frame distribution through Ring Buffer avoids heap copies and GC overhead.
  2. Crash Resilience: Archive recording uses direct I/O hints (sync_file_range, FADV_DONTNEED) to protect Linux Page Cache.
  3. High Test Coverage: Every PR must pass Go race detection (-race), unit tests, fuzz tests, and full E2E pipeline integration.
  4. Strict Localization & Documentation: All public features and APIs are fully documented in English and Russian.

Next Steps in This Section ​

Released under the MIT License.