Technology Stack
Relevant source files
The following files were used as context for generating this wiki page:
Horizon utilizes a modern, performance-oriented technology stack centered around the Rust programming language. The architecture is designed for high security, scalability, and cross-platform accessibility, employing a three-tier model that separates the presentation layer (Web and Desktop UI), business logic (API Server), and data persistence (PostgreSQL and Redis).
Sources: IMPLEMENTATION_PLAN.md:39-44, README.md:104-107
The project follows a "latest-stable" version policy, specifically requiring Rust version 1.94.0-nightly or later to leverage the latest language features and performance improvements.
Sources: IMPLEMENTATION_PLAN.md:46-48, README.md:123-125
Backend Architecture
The backend is built as a Rust workspace containing specialized crates for the API server, command-line interface, logging, and error handling.
Core Frameworks and Libraries
Horizon relies on the Tokio async runtime and the Axum web framework for high-concurrency request handling. Database interactions are managed through Sea-ORM and sqlx, providing type-safe entity management and migrations.
Sources: Cargo.toml:19-25, IMPLEMENTATION_PLAN.md:50-55
| Category | Component | Description |
|---|---|---|
| Language | Rust | Minimum version 1.94.0-nightly. |
| Async Runtime | Tokio | Full feature set for asynchronous I/O and task management. |
| Web Framework | Axum | Router and handler system for the REST API. |
| Database ORM | Sea-ORM | Entity-based management with PostgreSQL support. |
| Caching | Redis | Used for session management and rate limiting. |
Sources: Cargo.toml:19-33, IMPLEMENTATION_PLAN.md:50-55
Data Persistence Layer
The system uses a dual-database approach for storage and performance:
- PostgreSQL: The primary relational data store for asset inventory, user management, and audit logs.
- Redis: High-speed caching, session storage, and rate limiting infrastructure.
Sources: docker-compose.yml:7-78, IMPLEMENTATION_PLAN.md:112-114
The diagram above illustrates the interaction between client interfaces and the backend service layers.
Sources: IMPLEMENTATION_PLAN.md:41-44, docker-compose.yml:7-111
Security and Cryptography Stack
Horizon implements a defense-in-depth security model using the RustCrypto ecosystem. It prioritizes modern, constant-time algorithms to ensure data integrity and confidentiality.
Sources: README.md:209-216, IMPLEMENTATION_PLAN.md:144-150
Cryptographic Algorithms
| Operation | Crate | Algorithm |
|---|---|---|
| Password Hashing | argon2 | Argon2id (GPU/ASIC resistant) |
| Symmetric Encryption | chacha20poly1305 | XChaCha20-Poly1305 |
| Hashing | blake3 | BLAKE3 (High-performance hashing) |
| Digital Signatures | ed25519 | Ed25519 |
| Key Exchange | x25519 | X25519 (ECDH) |
| Memory Clearing | zeroize | Secure clearing of sensitive data |
Sources: Cargo.toml:50-75, IMPLEMENTATION_PLAN.md:65-76
Frontend and Desktop Stack
The user interface is delivered through two primary channels: a web-based dashboard and a cross-platform desktop application.
Web Technologies
The frontend is built with React 19 and TypeScript, managed by the Vite build tool. Styling is handled via Tailwind CSS and the shadcn/ui component library for a consistent design system.
Sources: crates/ui/package.json:14-29, IMPLEMENTATION_PLAN.md:155-159
Desktop Framework (Tauri)
The desktop application uses Tauri 2, which allows the React frontend to run within a lightweight native container. This approach minimizes memory consumption (targeting <50MB) compared to Electron-based solutions.
Sources: crates/ui/src-tauri/Cargo.toml:19-20, crates/ui/src-tauri/tauri.conf.json:1-38, IMPLEMENTATION_PLAN.md:116-117
AI Inference Stack
Horizon utilizes an "Inference-First" strategy, integrating with multiple AI providers to provide pattern recognition and security analysis without requiring local heavy-weight models.
Sources: IMPLEMENTATION_PLAN.md:213-217, README.md:112-113
Integrated Providers
- Remote APIs: OpenAI (via
async-openai), Anthropic, and GitHub Copilot. - CLI Tools: Subprocess integration for
opencodeandcopilot-cli. - Local Models: Strictly limited to ONNX runtime when local inference is required.
Sources: Cargo.toml:84-86, IMPLEMENTATION_PLAN.md:78-86
Infrastructure and Deployment
Deployment is standardized through containerization and automation scripts.
Docker Environment
The project provides a docker-compose.yml for rapid development setup, including pre-configured PostgreSQL 18-alpine and Redis 8-alpine instances. Production deployment supports both standard Docker containers and Kubernetes (Helm).
Sources: docker-compose.yml:7-80, IMPLEMENTATION_PLAN.md:121-123
Quality Assurance Tools
Horizon maintains strict code quality through a suite of integrated tools:
- Linting: Custom Clippy rules with
denylevel on common pitfalls (e.g.,panic,todo,arithmetic_side_effects). - Coverage: Verified using
grcov, targeting 90%+ test coverage. - CI/CD: GitHub Actions for testing, linting, and automated builds.
Sources: Cargo.toml:132-602, scripts/run_coverage.sh:11-53, AGENTS.md:139-145
Horizon's technology stack ensures a balance between high-performance systems programming (Rust), modern frontend ergonomics (React/TypeScript), and cutting-edge security standards (RustCrypto). This selection supports the project's vision of a self-hostable, enterprise-grade CMDB.