How cot-rs/cot works
Project type and purpose
• From the README and file tree, this is a batteries-included Rust web framework (“Cot”), modeled after Django, built on top of axum.
• It ships as:
• A CLI tool (cot-cli) that scaffolds new projects and generates migrations,
• A codegen crate (cot-codegen) and a set of procedural macros (cot-macros) for compile-time code generation,
• The core runtime library (cot/) which implements HTTP routing, ORM, template rendering, admin panel, middleware, etc.
File structure
• Top-level workspace with four main members:
• cot-cli/ – CLI app and project templates
• cot-codegen/ – code-generation utilities (model, symbol resolution, AST)
• cot-macros/ – procedural macros for deriving models, queries, handlers, admin, form, main_fn
• cot/ – core web framework (HTTP, router, middleware, ORM, templates, admin UI)
• There are shared config files (Cargo.toml, CI, lint, compose.yml), example apps under examples/, and tests everywhere.
• The core runtime (cot/src) subdivides into modules: router, request, response, db (drivers, migrations, queries), auth, form, openapi, middleware, error_page, static_files, session, templates, etc.
README for additional insights
• Built on axum (so HTTP server uses tokio + hyper under the hood).
• ORM is integrated with automatic migrations.
• Admin panel, templates, static file serving all included by default.