Technical Development Guide โ
This guide is for developers contributing to the Altis Engine or running it locally for testing.
๐ฆ Getting Started โ
Prerequisites โ
- Docker: For running the ecosystem (Postgres, Redis, Kafka).
- Rust (1.84+): For compiling and running the engine.
- sqlx-cli: For database migrations.
Environment Setup โ
- Copy the example environment file:
cp .env.example .env - Update
.envwith your local configurations.
Running with Docker (Recommended) โ
bash
docker-compose up --buildManual Development โ
- Start infrastructure:
docker-compose up -d postgres redis kafka zookeeper - Run migrations:
cargo sqlx migrate run - Start the API:
cargo run -p altis-api
๐งช Testing โ
Run the workspace test suite:
bash
cargo test --workspace๐๏ธ Workspace Structure โ
altis-core: Domain models and IATA traits.altis-api: Axum-based REST and NDC/ONE Order endpoints.altis-offer: Merchandising and AI ranking logic.altis-order: Lifecycle management and fulfillment.altis-store: Persistence layer (SQL/Redis/Kafka).
๐ก๏ธ Security Architecture โ
Authentication Implementation โ
- JWT: Stateless session management using HMAC-SHA256.
- Guest Tokens: Temporary authorization for search and offer exploration.
- Validation: Strict audience and expiration checks on every request.
Privacy & Data Protection โ
- PII Encryption: Any stored personal data is hashed or encrypted.
- One Identity: Uses the
OneIdResolvertrait to verify traveler credentials via W3C standards. - Logging: Sensitive data (tokens, PII) is automatically filtered from system logs.
Resiliency (DoS Protection) โ
- Circuit Breakers: Protects against slow-loris or cascading failures via the
resiliencymiddleware. - Metrics: Real-time monitoring of 4xx/5xx rates for anomaly detection.