mirror of
https://github.com/EdiFarcas/Car-Fuel-Tracking-App.git
synced 2026-06-22 07:00:55 +03:00
Readme update
This commit is contained in:
@@ -1,14 +1,17 @@
|
|||||||
# Car Fuel Tracking App
|
# Car Fuel & EV Charging Tracking App
|
||||||
|
|
||||||
A modern web application to track your car's fuel fill-ups, mileage, and fuel statistics. Built with Next.js, React, Prisma, and PostgreSQL, it provides a beautiful dashboard for managing your vehicles and analyzing fuel efficiency over time.
|
A modern web application to track your car's fuel fill-ups, electric vehicle (EV) charging sessions, mileage, and fuel/energy statistics. Built with Next.js, React, Prisma, and PostgreSQL, it provides a beautiful dashboard for managing your vehicles and analyzing efficiency over time—whether you drive gas, diesel, or electric.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- 🚗 **Multi-car support**: Track multiple vehicles, each with its own stats and history.
|
- 🚗 **Multi-car support**: Track multiple vehicles (gas, diesel, or electric), each with its own stats and history.
|
||||||
- ⛽ **Fill-up logging**: Record every fuel fill-up with mileage, liters, cost, and currency.
|
- ⛽ **Fill-up & charging logging**: Record every fuel fill-up (liters/gallons) or EV charge (kWh), with mileage, cost, and currency.
|
||||||
- 🛣️ **Mileage tracking**: Log odometer readings to monitor your driving habits.
|
- 🛣️ **Mileage tracking**: Log odometer readings to monitor your driving habits and efficiency.
|
||||||
- 📊 **Statistics dashboard**: View total distance, fuel used, cost, average consumption, and more.
|
- 📊 **Statistics dashboard**: View total distance, fuel/energy used, cost, average consumption (L/100km, MPG, or kWh/100km), and more.
|
||||||
- 🔒 **Authentication**: Secure login and registration with hashed passwords.
|
- 🔄 **Unit-aware UI**: Metric/imperial toggle for combustion vehicles; automatic metric units for electric cars (kWh, kWh/100km).
|
||||||
|
- 📈 **Interactive charts**: Visualize fuel/energy consumption trends over time.
|
||||||
|
- ⬇️ **CSV export**: Download your stats for further analysis.
|
||||||
|
- 🔒 **Authentication**: Secure login and registration with hashed passwords (NextAuth.js).
|
||||||
- 🌗 **Responsive & modern UI**: Clean, mobile-friendly design with dark mode support.
|
- 🌗 **Responsive & modern UI**: Clean, mobile-friendly design with dark mode support.
|
||||||
|
|
||||||
## Tech Stack
|
## Tech Stack
|
||||||
@@ -63,8 +66,8 @@ Open [http://localhost:3000](http://localhost:3000) in your browser.
|
|||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
- `src/app/` — Next.js app directory (routes, pages, API)
|
- `src/app/` — Next.js app directory (routes, pages, API)
|
||||||
- `src/components/` — Reusable UI components
|
- `src/components/` — Reusable UI components (cards, charts, toggles, etc.)
|
||||||
- `prisma/schema.prisma` — Database schema
|
- `prisma/schema.prisma` — Database schema (User, Car, FillUp, MileageEntry, enums for FuelType and Currency)
|
||||||
- `src/lib/` — Auth and Prisma helpers
|
- `src/lib/` — Auth and Prisma helpers
|
||||||
- `public/` — Static assets
|
- `public/` — Static assets
|
||||||
|
|
||||||
@@ -75,8 +78,20 @@ Open [http://localhost:3000](http://localhost:3000) in your browser.
|
|||||||
- `npm run lint` — Lint code
|
- `npm run lint` — Lint code
|
||||||
|
|
||||||
## Database Schema
|
## Database Schema
|
||||||
See [`prisma/schema.prisma`](prisma/schema.prisma) for models: `User`, `Car`, `FillUp`, `MileageEntry`, enums for `FuelType` and `Currency`.
|
See [`prisma/schema.prisma`](prisma/schema.prisma) for models:
|
||||||
|
- `User`: Authentication and user management
|
||||||
|
- `Car`: Vehicle details (make, model, year, fuel type)
|
||||||
|
- `FillUp`: Fuel or charging session records
|
||||||
|
- `MileageEntry`: Odometer readings
|
||||||
|
- Enums: `FuelType` (GASOLINE, DIESEL, ELECTRIC), `Currency`
|
||||||
|
|
||||||
|
## Notable Implementation Details
|
||||||
|
|
||||||
|
- **EV support**: The UI and logic automatically switch to kWh and kWh/100km for electric cars, disabling imperial units and MPG where not applicable.
|
||||||
|
- **API endpoints**: RESTful endpoints for cars, fill-ups, mileage, and authentication.
|
||||||
|
- **Type safety**: End-to-end TypeScript, including API routes and Prisma models.
|
||||||
|
- **Modern UX**: Loading skeletons, tooltips, and accessibility best practices.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
> Built with passion using Next.js, Prisma, and Tailwind CSS.
|
> Built with passion using Next.js, Prisma, and Tailwind CSS. Contributions welcome!
|
||||||
|
|||||||
Reference in New Issue
Block a user