Skip to content

About

Since there wasn't a good ad-free fuel tracker, I built one.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

11 Commits

Folders and files

Repository files navigation

Fuel Tracker

A high-performance vehicle fuel telemetry, efficiency, and maintenance lifecycle web application engineered with authentic Previous Fill-Up combustion physics and an automotive Dual-Threshold Engine Oil Telemetry Engine (Distance & Time Duration).

Live Web App GitHub Repository React 19 Vite 8 License: Apache 2.0

Note

Platform Support Notice: Support for the legacy native Android and iOS mobile applications has concluded. FuelTracker is now exclusively maintained as a cloud-synchronized, responsive Universal Web Application accessible across all modern desktop, tablet, and mobile browsers.


🌐 Launch Web Application

You can use the live web app directly in any desktop, tablet, or mobile browser without installation:

πŸ‘‰ https://k-692.github.io/FuelTracker/

  • Google Authenticated: Sign in with Google for real-time cloud synchronization backed by Google Cloud Firestore.
  • Universal Browser Layout: Responsive minimalist UI with Obsidian Dark and Crisp Slate Light theme modes.
  • Automated GitHub Deployment: Continuously built and deployed via GitHub Actions (.github/workflows/deploy.yml).

πŸš€ Key Modules & Capabilities

1. Dual-Threshold Engine Oil Telemetry (Distance & Time Duration)

Engine oil degrades through two independent physical vectors: mechanical shear/particulate contamination proportional to distance driven, and chemical oxidation/acidification/condensation over calendar time. Following automotive best practices, FuelTracker monitors both simultaneously:

  • Dual Configurable Thresholds:
    • Distance Interval: Default 5,000 km (user-configurable in Settings).
    • Time Duration Interval: Default 6 Months (user-configurable in Settings).
  • "Whichever Comes First" Automotive Rule: Telemetry evaluates distance driven and elapsed time from your most recent recorded engine oil change. Service alert triggers when either limit is reached.
  • Top Navigation Bar Status Chip: Real-time alert chip in the header displaying both remaining distance and time countdown:
    • πŸ›’οΈ Good: Green chip with remaining kilometers and months/days countdown.
    • ⚠️ Warning: Yellow badge when within 500 km or 30 days of service due.
    • 🚨 Overdue: Pulsing danger red alert indicating whether distance, time duration, or both have been exceeded.
  • Maintenance Hub Dual Progress Gauges: In the Services hub, inspect two dedicated progress bars:
    1. Distance Progress Track: Shows kilometers driven since last change, remaining distance, and percentage completion against the target odometer.
    2. Duration Progress Track: Shows elapsed days and months, days remaining, and target due date (DD/Apr/YYYY).
  • Account Safety & Zero-Mutation Guard: Adding or updating interval thresholds strictly preserves all existing user records, fuel refill entries, vehicle profiles, and service history without overwriting user account data.

2. 60-Component Vehicle Servicing & Maintenance Engine

A granular vehicle-specific maintenance ledger:

  • 60 Vehicle Components: Classified across Engine & Lubrication, Cooling, Ignition & Fuel, Transmission & Drivetrain, Brakes & Wheels, Suspension & Steering, Electrical & ECU, Body & Cabin, and Exhaust & Emissions.
  • Intelligent Vehicle Type Filtering: Automatically filters components based on vehicle category (Cars vs Two-Wheelers / Motorcycles / Scooters) while retaining full manual toggle override.
  • Granular Checklist & Component Charges: Defaults to No; toggle Yes for components serviced and input individual component charges.
  • Custom Final Invoice Total: User directly enters the final overall bill amount with optional auto-sum assistance.
  • Universal Editability: All past service records can be inspected, updated, or deleted with real-time recalculation.

3. Visual Analytics & Component Trends

  • Component Servicing Frequency & Count Plot: High-contrast horizontal bar chart ranking parts and systems by how often they have been serviced.
  • Component Price Analysis Over Time: Interactive SVG time-series chart tracking price evolution, inflation, minimum, maximum, and average charges for any selected component.
  • Fuel Mileage Trajectory: Precision efficiency curves based on physical previous fill-up consumption.
  • Expenditure Trends: Refill expenses and pump price trajectory charts.

4. Accurate Previous Fill-Up Mileage Formulation

Unlike ordinary trackers that divide trip distance by fuel poured in the current fill, FuelTracker uses the Previous Fill-Up method:

  • Formula: $$\text{Mileage (km/L)} = \frac{\text{Current Odometer} - \text{Previous Odometer}}{\text{Previous Fuel Quantity}}$$
  • Physical Rationale: Fuel pumped in the current refill powers your future travel. The distance covered between refills was combusted strictly from fuel loaded in the previous refill.
  • Initial Fill Baseline: The first entry establishes the vehicle's baseline odometer and tank volume.

5. Multi-Vehicle Fleet Garage

  • Track motorcycles (🏍️), scooters (πŸ›΅), passenger cars (πŸš—), and commercial vehicles (πŸš™).
  • Independent odometer timelines, fuel logs, service history, and lifetime statistics.

6. Universal JSON Portability

  • Export and import complete fleet profiles, fuel refill logs, maintenance records, and customized dual oil intervals via FuelTracker_AutoBackup.json.
  • Two-stage staged import workflow with validation preview before database population.

πŸ›οΈ System Architecture & Workflow

       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚                   Universal Web App                    β”‚
       β”‚                 (React 19 + Vite 8)                    β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                  β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚               Domain Mathematical Engines               β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
       β”‚   FuelCalculator.js     β”‚     serviceCalculator.js     β”‚
       β”‚   - Prev Fill-Up Physicsβ”‚     - Dual-Threshold Engine  β”‚
       β”‚   - Distance Deltas     β”‚       (5000 km / 6 Months)   β”‚
       β”‚   - Operational Costs   β”‚     - Whichever First Rule   β”‚
       β”‚                         β”‚     - Price Trajectories     β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                  β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚             Unified Data Repository (storage.js)       β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
       β”‚   Cloud Firestore Sync   β”‚    IndexedDB / Local Cache  β”‚
       β”‚   users/{uid}/vehicles   β”‚    Backup Export & Import   β”‚
       β”‚   users/{uid}/services   β”‚    Zero Mutation Safety     β”‚
       β”‚   users/{uid}/entries    β”‚                             β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’» Web App Local Development

Prerequisites

  • Node.js (version 18 or higher recommended)
  • npm (included with Node.js)

Installation & Setup

# Clone the repository
git clone https://github.com/K-692/FuelTracker.git
cd FuelTracker/web_app

# Install dependencies
npm install

# Run local development server
npm run dev

# Run code linter
npm run lint

# Build production bundle
npm run build

Visit http://localhost:5173/ in your browser.


πŸ› οΈ Project Structure

FuelTracker/
β”œβ”€β”€ .github/workflows/
β”‚   └── deploy.yml              # GitHub Actions Pages deployment
β”œβ”€β”€ App_icon/
β”‚   └── icon.png                # Brand icon
β”œβ”€β”€ web_app/                    # Universal React + Vite Web application
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ icon.png            # App logo & favicon
β”‚   β”‚   └── favicon.png
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/         # Navbar, Services, ServiceModal, Dashboard, Analytics, Settings, etc.
β”‚   β”‚   β”œβ”€β”€ domain/             # FuelCalculator, serviceComponents (60 items), serviceCalculator
β”‚   β”‚   β”œβ”€β”€ services/           # Firebase Auth, Cloud Firestore & unified storage repository
β”‚   β”‚   └── utils/              # DD/Apr/YYYY date formatter
β”‚   └── vite.config.js          # Vite configuration
β”œβ”€β”€ flow.md                     # Complete architecture and implementation flow log
└── README.md                   # Project overview & documentation

🀝 Contributing to FuelTracker

Contributions, issues, and feature requests are welcome!

  1. Fork the Repository on GitHub.
  2. Create a Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your Changes (git commit -m 'Add AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

Please ensure that npm run lint and npm run build succeed without errors before submitting pull requests.


πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Built with ❀️ for Vehicle Owners & Enthusiasts.

About

Since there wasn't a good ad-free fuel tracker, I built one.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages