Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

zelds/fuel-track

Repository files navigation

Fuel Track — Tactical Fuel Monitoring & Reporting

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.


Overview

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.


Features

🔐 Role-Based Access Control

  • Fine-grained access by user role
  • Entity ownership validation
  • Protection against cross-unit data access

🛢️ Invoices & Fuel Allocation Lifecycle

  • Create/manage invoice records
  • Allocate fuel to tankers
  • Track leftover fuel automatically
  • Prevent double distributions and usage

🚛 Tanker & Distribution Tracking

  • Register tankers and assign them to aggregates
  • Track allocations with source, destination, and fuel volume
  • Ensure domain invariants for tanker operations

📄 Worksheets & Usage Records

  • Daily operational usage tracking
  • Automatic leftover recalculations

🧱 Clean Architecture + DDD

  • Controller → Service → Adapter → Storage layers
  • Domain-driven business rules
  • Persistent storage with SeaORM and PostgreSQL

🧾 Reporting

  • in progress

Quickstart

# 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 9090

Roadmap

Status: frozen

N.B

  • 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

Architecture

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
Loading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors