feat: backend MVP (auth/rbac, catalog, orders, fulfillment, invoices) + specs + scaffolds

This commit is contained in:
Chengdong Zhang
2026-09-17 12:43:22 +08:00
commit dc9fd31c5e
96 changed files with 17550 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
pub mod auth;
pub mod cart;
pub mod config;
pub mod error;
pub mod models;
pub mod money;
pub mod pagination;
pub mod routes;
pub mod seed;
pub mod state;
use axum::{routing::get, Router};
use tower_http::{cors::CorsLayer, trace::TraceLayer};
use crate::state::AppState;
pub fn build_router(state: AppState) -> Router {
Router::new()
.route("/api/health", get(routes::health::health))
.nest("/api", routes::api_router(state.clone()))
.layer(TraceLayer::new_for_http())
.layer(CorsLayer::permissive())
.with_state(state)
}