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).
Note
Two apps, one account. FuelTracker runs as a responsive web app (any browser) and a native Android app (APK). Both sign in with Google and use the same Firebase database, so a refill or service logged on your phone appears on the web instantly β and vice versa.
Average mileage (Previous Fill-Up method), total distance, fuel spend and running cost per km for the active vehicle, plus the latest refill and recent activity.
Mileage trend across every refill (with the lifetime average line), best mileage, operating cost and average fuel price β filterable by All time / 1Y / 90D / 30D.
| Refill history (per-fill mileage, cost/km, price/L) | Multi-vehicle garage |
|---|---|
| Dashboard | Log a refill (live mileage) | Refill history | Analytics |
|---|---|---|---|
Screenshots use sample demo data.
Download and install β no build tools needed:
π Download FuelTracker.apk (latest release) Β· All releases
Install steps
- Open the download link on your Android phone (Android 8.1 or newer).
- Open the downloaded
FuelTracker.apk. If asked, allow your browser/files app to install unknown apps (Settings β Apps β Special access β Install unknown apps). - Tap Install, open FuelTracker and tap Sign in with Google using the same Google account you use on the web app.
What the Android app includes
- Google sign-in and live sync with the web app (same Firebase project and Firestore documents).
- Track dashboard: average mileage, distance, fuel spend and running cost per vehicle.
- Refills: log, edit and delete with the Previous Fill-Up mileage method.
- Garage: add, edit, delete and switch vehicles.
- Services: log services using your own service items, add new ones from the Add Item pop-up (name + price), manage your item list, and see the engine-oil reminder (distance or months, whichever comes first).
- Item-name suggestions while typing, based on your earlier service entries.
- Works offline β changes sync automatically when you're back online.
Tip
Updating? Install the newer APK over the existing app β your data lives in your cloud account and is kept.
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.
- Mobile-First Responsive UI: Designed for phones first, scaling up cleanly to tablets and desktops, with Obsidian Dark and Crisp Slate Light themes.
- Installable: Add it to your phone's home screen ("Add to Home Screen" / "Install app") for a full-screen, app-like experience.
- Automated GitHub Deployment: Continuously built and deployed via GitHub Actions (
.github/workflows/deploy.yml).
The interface is built mobile-first and tested from small 320 px phones up to wide desktop monitors.
| Screen | Navigation | Layout highlights |
|---|---|---|
| Phones (β€ 768 px) | Fixed bottom tab bar with large touch targets | 2-column metric tiles, refill tables become stacked cards, forms open as swipe-style bottom sheets, full-width segmented controls |
| Tablets (769β900 px) | Bottom tab bar | Wider cards and multi-column grids |
| Desktops (β₯ 901 px) | Top navigation tabs | Centered content, data tables, hover effects; compact header that never overlaps at any width |
Mobile & browser robustness
- Safe-area aware (iPhone notch / home indicator) using
viewport-fit=coverandenv(safe-area-inset-*). - 44 px touch targets on touch screens; hover effects only on devices that truly hover (no "sticky hover" on phones).
- Form fields use a 16 px font on touch devices so iOS Safari never auto-zooms when typing.
- Dynamic viewport units (
dvh) withvhfallbacks, so mobile browser toolbars don't cut off content. - Background scroll is locked while a dialog is open;
Esccloses dialogs on desktop. - Charts measure their container and redraw at the real pixel width, keeping labels readable on phones; tap a point/bar to see its value.
- Graceful fallbacks for older engines (
backdrop-filter,:has(),overflow: clip), plusprefers-reduced-motion, visible keyboard focus rings, and ARIA roles on navigation, dialogs and notifications. - Production build targets Chrome/Edge 87+, Safari 14+ (iOS & macOS) and Firefox 78+, with Firebase, React and icons split into separately cached chunks.
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).
- Distance Interval: Default
- "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:
- Distance Progress Track: Shows kilometers driven since last change, remaining distance, and percentage completion against the target odometer.
- 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.
Servicing items are not pre-defined β you build your own list, and it is shared by every vehicle on both web and Android:
- Add Item pop-up: while logging a service, tap Add Item β a pop-up asks for the item name and its price. On Add, the item is marked as serviced with that price and you're back on the service form. Items can also be managed in Services β My Items. New items are saved for future services and sync instantly to the other app.
- Smart suggestions: as you type an item name, FuelTracker suggests names you've used in earlier service entries (most-used first), so the same part is always recorded under the same name. Picking an existing item reuses it instead of creating a duplicate.
- Edit or remove items: rename, group (optional) or remove an item at any time. Removing an item never changes past service records β they keep the item's name and charge.
- Automatic engine-oil reminder: an item named Engine oil is detected automatically and drives the oil-change reminder β no tick box needed.
- Per-item charges: mark
Yesfor each item done, enter its charge, and optionally copy the items' total into the final bill. - Existing data is kept: records created with the old built-in checklist are preserved exactly; the items they used are added to your list automatically (nothing is deleted or rewritten).
| Manage your items (desktop) |
|---|
| Add Item pop-up with suggestions (phone) | Item added and marked serviced (phone) |
|---|---|
- Item Servicing Frequency: Horizontal bar chart ranking your service items by how often they have been serviced.
- Item Price Analysis Over Time: Interactive SVG time-series chart tracking minimum, maximum and average charges for any of your items.
- Fuel Mileage Trajectory: Precision efficiency curves based on physical previous fill-up consumption.
- Expenditure Trends: Refill expenses and pump price trajectory charts.
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.
- Track motorcycles (ποΈ), scooters (π΅), passenger cars (π), and commercial vehicles (π).
- Independent odometer timelines, fuel logs, service history, and lifetime statistics.
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β Web App (PWA) β β Android App (APK) β
β React 19 + Vite 8 β β Kotlin + Jetpack Compose β
ββββββββββββββββ¬ββββββββββββββββ ββββββββββββββββ¬ββββββββββββββββ
ββββββββββββββββ¬ββββββββββββββββββββββ
Google sign-in (Firebase Auth)
β
β
ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
β 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 β Local / Offline Cache β
β users/{uid}/vehicles β Zero Mutation Safety β
β users/{uid}/services β β
β users/{uid}/fuel_entries β
β users/{uid}/service_items (user-defined items) β
β users/{uid}/settings/preferences (oil intervals) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Node.js (version 18 or higher recommended)
npm(included with Node.js)
# 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 buildVisit http://localhost:5173/ in your browser.
The Android app lives in app/ (Kotlin, Jetpack Compose, Hilt, Firebase Auth + Firestore, Credential Manager).
# Requires JDK 17+ and the Android SDK (platform 34)
./gradlew :app:assembleRelease # signed APK -> app/build/outputs/apk/release/FuelTracker.apk
./gradlew :app:assembleDebug # debug APK- Package name:
com.fueltracker.app. - Place your Firebase Android config at
app/google-services.json(download it from Firebase Console β Project settings β Your apps). It is git-ignored and never committed; CI receives it from theGOOGLE_SERVICES_JSON_BASE64secret. - Release signing reads
keystore.properties(git-ignored) or theFT_KEYSTORE_PATH,FT_KEYSTORE_PASSWORD,FT_KEY_ALIAS,FT_KEY_PASSWORDenvironment variables. The signing key's SHA-1 and SHA-256 must be added to the Firebase Android app, otherwise Google sign-in fails. .github/workflows/android-release.yml(run manually from the Actions tab once its secrets are added) builds the signed APK and attaches it to a GitHub Release.
FuelTracker/
βββ .github/workflows/
β βββ deploy.yml # GitHub Actions Pages deployment
βββ App_icon/
β βββ icon.png # Brand icon
βββ app/ # Android app (Kotlin + Jetpack Compose, same Firebase backend)
β βββ src/main/java/com/fueltracker/
β βββ data/cloud/ # Firestore models & repository (shared schema with web)
β βββ data/legacy/ # One-time upload of data from the old phone-only app
β βββ domain/ # Mileage stats, engine-oil reminder, service-item rules
β βββ ui/ # Compose screens: Track, Garage, Refills, Services, Settings
βββ docs/screenshots/ # README screenshots
βββ web_app/ # Universal React + Vite Web application
β βββ public/
β β βββ icon.png # App logo & favicon
β β βββ favicon.png
β β βββ manifest.webmanifest # Home-screen install metadata
β βββ src/
β β βββ components/ # Navbar, Services, ServiceModal, Dashboard, Analytics, Settings, etc.
β β βββ index.css # Mobile-first design system (themes, breakpoints, responsive tables & sheets)
β β βββ domain/ # FuelCalculator, serviceItems (user-defined 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
Contributions, issues, and feature requests are welcome!
- Fork the Repository on GitHub.
- Create a Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your Changes (
git commit -m 'Add AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Please ensure that npm run lint and npm run build succeed without errors before submitting pull requests. For UI changes, check the layout at a phone width (e.g. 375 px) as well as on desktop.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built with β€οΈ for Vehicle Owners & Enthusiasts.