1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Axum router construction.
//!
//! Extracted from `main.rs` so integration tests can build the same router
//! the binary uses without duplicating route definitions. The router is
//! pure data — no I/O happens here; `AppState` carries the configuration
//! and all I/O is deferred into the handler layer.
use ;
use crate;
use crateAppState;
/// Build the application router with all endpoints wired up.
///
/// Caller supplies a fully-constructed [`AppState`]. The returned router
/// is ready to be handed to `axum::serve` in the binary, or to
/// `tower::ServiceExt::oneshot` in tests.
// ---------------------------------------------------------------------------
// Tests
// ---------------------------------------------------------------------------
//
// The router itself is a thin composition layer; meaningful coverage of its
// behavior lives in the end-to-end integration tests (milestone 8 Unit D),
// which exercise actual HTTP requests against a real temporary database.
// A compile-time smoke test here guards against basic regressions in the
// wiring without duplicating the integration test surface.