An app for tracking your fuel consumption. https://fuelstats.filiprojek.cz
Go to file
Filip Rojek 7517bcb78f
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 14s
Updated: Improved vehicle and refuel data handling on dashboard
Updated:
- DashboardController now fetches latest refuel record only for the default vehicle
- VehicleController - first created vehicle is now set as default automatically
- Refuel model - latest_one() now accepts vehicle_id instead of user_id
- Dashboard view - improved handling when no vehicles or refuel records exist
- CSS styles - adjusted dashboard layout and global action padding
2025-02-01 18:38:49 +01:00
.docker Added: Dockerfile and docker support 2024-12-27 02:29:07 +01:00
.gitea/workflows Added: Gitea Workflow 2025-01-03 00:45:54 +01:00
.screenshots Updated: README.md added diagrams 2025-01-26 23:16:00 +01:00
app Updated: Improved vehicle and refuel data handling on dashboard 2025-02-01 18:38:49 +01:00
config Edited: App is rebranded to Fuel Stats 2024-12-31 11:34:39 +01:00
core Added: mileage, average fuel consumption 2025-01-27 01:57:31 +01:00
public Updated: Improved vehicle and refuel data handling on dashboard 2025-02-01 18:38:49 +01:00
storage/logs Added: MVC structure, Router, Views and Controllers for home page and login/signup 2024-12-25 23:02:09 +01:00
.dockerignore Added: Dockerfile and docker support 2024-12-27 02:29:07 +01:00
.gitignore Added: .gitignore 2024-12-27 02:35:40 +01:00
docker-compose.yaml Updated: docker-compose.yml networking for proper DB access 2025-02-01 17:35:22 +01:00
Dockerfile Added: Dockerfile and docker support 2024-12-27 02:29:07 +01:00
LICENSE Edited: App is rebranded to Fuel Stats 2024-12-31 11:34:39 +01:00
README.md Updated: README.md added diagrams 2025-01-26 23:16:00 +01:00
TODO.md Updated: TODO.md 2025-01-30 14:39:21 +01:00

Fuel Stats

An app for tracking your fuel consumption and optimizing your driving efficiency.

Used Technologies

  • Frontend: HTML, CSS, JavaScript
  • Backend: PHP (OOP)
  • Database: MariaDB

How to Build

Build Using Docker

Run the container using docker-compose:

docker-compose --profile <dev|prod> up -d

The app should be available at http://localhost:8000.

PhpMyAdmin should be available at http://localhost:8080.

Build Manually

  1. Clone the repository:
   git clone https://git.filiprojek.cz/fr/fuel-stats.git
  1. Create config/environment.php:
  • It should have the following structure:
<?php

define('DB_HOST', 'your db host');
define('DB_USER', 'your db username'); 
define('DB_PASS', 'your db password');
define('DB_NAME', 'your db name'); 
  • For the database, you can use the included docker-compose.yaml which includes both MariaDB and PhpMyAdmin.
  1. Start a local web server:
  • You can use PHP's integrated server by running this:
php -S localhost:8000 -t ./public
  • You can use any host and any port you prefer.

Usage

  1. Register and log in to the app.
  2. Add your vehicles with their details (fuel type, registration, etc.).
  3. Record each refueling:
    • Select your vehicle.
    • Input the number of liters, price per liter, and total cost.
  4. Track your fuel consumption and spending through the dashboard.
  5. View detailed stats and graphs to analyze your driving habits.

Use case diagram

Data logical model

Class diagram

License

This project is licensed under GPL3.0 and later. More information is available in the LICENSE file.