chore: bootstrap housing research platform

This commit is contained in:
2026-06-23 09:43:56 +08:00
commit 479e3f16d4
34 changed files with 4339 additions and 0 deletions

22
apps/api/src/routes.rs Normal file
View File

@@ -0,0 +1,22 @@
use axum::routing::get;
use axum::Router;
use tower_http::cors::CorsLayer;
use tower_http::trace::TraceLayer;
use crate::handlers::{health, list_area_scores, market_overview, ready};
use crate::state::AppState;
pub fn build_router(state: AppState) -> Router {
Router::new()
.route("/health", get(health))
.route("/ready", get(ready))
.nest(
"/api/v1",
Router::new()
.route("/areas/scores", get(list_area_scores))
.route("/market/overview", get(market_overview)),
)
.layer(TraceLayer::new_for_http())
.layer(CorsLayer::permissive())
.with_state(state)
}