Skip to main content

alpe_api/
lib.rs

1//! # alpe-api
2//!
3//! Axum-based HTTP API server for the Alpe platform.
4//!
5//! This crate provides the REST API that the CLI and SDK communicate with.
6//! It handles authentication, project management, and resource lifecycle
7//! operations. Handlers are intentionally thin — they parse requests, delegate
8//! to [`alpe_core`] for business logic, and format responses.
9//!
10//! ## Architecture
11//!
12//! - **Handlers** live in route-specific modules and are thin request/response adapters
13//! - **Middleware** provides cross-cutting concerns (auth, tracing, error mapping)
14//! - **State** is injected via axum's `State` extractor (database pool, auth config)
15//! - **`OpenAPI`** spec is generated via [`utoipa`] and served at `/openapi.json`