- Enforce axum best practices across all 13 workspace crates (max 200 LOC/file, no comments, no unwrap, clean architecture) - Fix domain→infrastructure dependency inversions in imphnen-iam and imphnen-dimentorin - Extract imphnen-storage (MinIO) and imphnen-email (Lettre) as standalone crates - Centralize all config in ENV struct: CDN_URL, CORS_ALLOWED_ORIGINS - Centralize SMTP through imphnen-email; remove dead HackathonConfig - Centralize database: QR crate now shares main DB pool (single DATABASE_URL) - Rename QR users table to qr_users to avoid collision with main users table - Merge imphnen-qr into imphnen-cms/src/qr (13 crates, down from 14) - Restructure imphnen-hackathon flat modules into clean architecture - Remove all stale env vars from .env.example (SurrealDB, QR_JWT, Hackathon infra) - Fix Dockerfile to include all current workspace crates - Bump all crate versions 0.2.0 → 0.3.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.4 KiB
Rust
48 lines
1.4 KiB
Rust
pub mod admin;
|
|
pub mod certificates;
|
|
pub mod chat;
|
|
pub mod common;
|
|
pub mod invitations;
|
|
pub mod join_requests;
|
|
pub mod middleware;
|
|
pub mod storage;
|
|
pub mod submissions;
|
|
pub mod teams;
|
|
pub mod users;
|
|
pub mod winners;
|
|
|
|
pub use admin::hackathon_admin_routes;
|
|
pub use certificates::hackathon_certificates_routes;
|
|
pub use chat::build_chat_routes;
|
|
pub use invitations::build_invitation_routes;
|
|
pub use join_requests::build_join_request_routes;
|
|
pub use storage::hackathon_storage_routes;
|
|
pub use submissions::hackathon_submissions_routes;
|
|
pub use teams::build_team_routes;
|
|
pub use users::hackathon_users_routes;
|
|
pub use winners::hackathon_winners_routes;
|
|
|
|
use axum::Router;
|
|
use imphnen_storage::MinioService;
|
|
use sea_orm::DatabaseConnection;
|
|
use std::sync::Arc;
|
|
|
|
pub fn hackathon_router(
|
|
db: DatabaseConnection,
|
|
minio: Arc<MinioService>,
|
|
) -> Router {
|
|
let pool = Arc::new(db.get_postgres_connection_pool().clone());
|
|
|
|
Router::new()
|
|
.merge(hackathon_users_routes(pool.clone()))
|
|
.merge(build_team_routes(pool.clone()))
|
|
.merge(build_invitation_routes(pool.clone()))
|
|
.merge(build_join_request_routes(pool.clone()))
|
|
.merge(build_chat_routes(pool.clone()))
|
|
.merge(hackathon_submissions_routes(pool.clone()))
|
|
.merge(hackathon_storage_routes(pool.clone(), minio))
|
|
.merge(hackathon_certificates_routes(pool.clone()))
|
|
.merge(hackathon_winners_routes(pool.clone()))
|
|
.merge(hackathon_admin_routes(pool))
|
|
}
|