Fuel Track is a secure backend platform for real-time fuel allocation, distribution, consumption tracking, and reporting within military or logistics units. It is designed for tactical-level operations where accuracy, accountability, and traceability are critical.
Fuel Track enables units to manage and monitor:
- Fuel allocations
- Tanker operations
- Distribution events
- Worksheets and usage records
- Invoice records
- Audit-safe operational history
The system enforces strict role-based rules and ownership checks.
- Fine-grained access by user role
- Entity ownership validation
- Protection against cross-unit data access
- Create/manage invoice records
- Allocate fuel to tankers
- Track leftover fuel automatically
- Prevent double distributions and usage
- Register tankers and assign them to aggregates
- Track allocations with source, destination, and fuel volume
- Ensure domain invariants for tanker operations
- Daily operational usage tracking
- Automatic leftover recalculations
- Controller → Service → Adapter → Storage layers
- Domain-driven business rules
- Persistent storage with SeaORM and PostgreSQL
- in progress
# Start server at :8080 (Migrations will be applied automatically)
JWT_SECRET=secret DATABASE_URL=postgres://postgres:password@127.0.0.1 cargo run# Start frontend at :9090 (default port for development)
cd frontend/
trunk serve --port 9090Status: frozen
- Date-to-date reporting require snapshots and can not be solved with current architercture (which can be only done like in real life via worksheets)
- Achitecture lessons extracted for future projects (hexagonal architecture, reach domain, DDD, repository pattern, unit of work, RBAC)
- Learn more about Rust in particular about axum, leptos, sea-orm
sequenceDiagram
actor User
User->>Controller(REST): DTO / Filter Query
Controller(REST)->>Service: DTO / Filter
Service->>Adapter: Domain Object
Adapter->>Storage: Entity / ActiveModel
Storage->>Adapter: Entity
Adapter->>Service: Transfer Object
Service->>Controller(REST): DTO
Controller(REST)->>User: JSON Response