Development

Guide for contributors and developers working on Sentinel and its ecosystem.

Quick Start

# Clone and build
git clone https://github.com/raskell-io/sentinel.git
cd sentinel
cargo build --release

# Run tests
cargo test

# Check formatting and lints
cargo fmt --check
cargo clippy

Section Overview

GuideDescription
Building from SourceCompile Sentinel and agents from source
Development SetupIDE configuration, recommended tools
Code StyleFormatting, naming conventions, best practices
TestingTesting strategy and philosophy
Unit TestsWriting and running unit tests
Integration TestsEnd-to-end testing with real connections
Load TestingPerformance and stress testing
ContributingHow to contribute to the project
Pull Request ProcessSubmitting and reviewing PRs
Release ProcessVersioning and release workflow

Repository Structure

sentinel/
├── src/
│   ├── main.rs              # Entry point
│   ├── config/              # KDL configuration parsing
│   ├── server/              # HTTP server, listeners
│   ├── routing/             # Route matching, upstream selection
│   ├── proxy/               # Request/response proxying
│   ├── agents/              # Agent client, protocol handling
│   ├── health/              # Health checks
│   └── observability/       # Metrics, logging, tracing
├── tests/
│   ├── unit/                # Unit tests
│   └── integration/         # Integration tests
├── benches/                 # Benchmarks
└── examples/                # Example configurations

Agent Repositories

Each agent is maintained in its own repository:

AgentRepository
WAFsentinel-agent-waf
ModSecuritysentinel-agent-modsec
Authsentinel-agent-auth
Rate Limitsentinel-agent-ratelimit
JavaScriptsentinel-agent-js
AI Gatewaysentinel-agent-ai-gateway
WebSocket Inspectorsentinel-agent-websocket-inspector

Agent Protocol

All agents use the shared protocol library:

[dependencies]
sentinel-agent-protocol = "0.1"

See Agent Development for creating custom agents.