How foticc/api-micro-simple works
Project type and purpose
• This is a standalone backend service written in Rust. It exposes a set of RESTful APIs for user, role, permission, department, and menu management. It uses SeaORM to map between Rust structs (“entity” layer) and a PostgreSQL database. The service is containerized with Docker.
File structure
• Top-level files:
• Cargo.toml / Cargo.lock – Rust package and dependency management
• Dockerfile, docker-compose.yml – container definition and multi-container orchestration
• .env – environment variables (DB URL, credentials)
• src/
• api/ – HTTP controllers (auth_api.rs, user_api.rs, role_api.rs, etc.)
• service/ – business logic layer corresponding to each API
• entity/ – SeaORM-generated entities and relations for database tables
• common/ – cross-cutting utilities (result handling, security/jwt, simple cache)
• main.rs – application entry point, router setup
Readme insights
• The README shows how to generate entities from the live database and how to spin up the app via Docker Compose. No separate frontend here—this is purely a backend service.
Elements
• Clear labels for each component (e.g., “Auth API”, “User Service”, “SeaORM Entities”)
– Blue rectangles for layers (API, Service, Data)
– Docker whale for containerization