mirror of
https://github.com/EdiFarcas/Car-Fuel-Tracking-App.git
synced 2026-06-22 05:00:53 +03:00
1ca2ae879834cd2623ae1351a182ff6816e8f32b
Car Fuel 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.
Features
- 🚗 Multi-car support: Track multiple vehicles, each with its own stats and history.
- ⛽ Fill-up logging: Record every fuel fill-up with mileage, liters, cost, and currency.
- 🛣️ Mileage tracking: Log odometer readings to monitor your driving habits.
- 📊 Statistics dashboard: View total distance, fuel used, cost, average consumption, and more.
- 🔒 Authentication: Secure login and registration with hashed passwords.
- 🌗 Responsive & modern UI: Clean, mobile-friendly design with dark mode support.
Tech Stack
- Next.js (App Router)
- React
- Prisma ORM
- PostgreSQL
- NextAuth.js (Credentials provider)
- Tailwind CSS
- TypeScript
Getting Started
Prerequisites
- Node.js 18+
- PostgreSQL database
1. Clone the repository
git clone <your-repo-url>
cd Car-Fuel-Tracking-App
2. Install dependencies
npm install
3. Configure environment variables
Create a .env file in the root with the following:
DATABASE_URL=postgresql://<user>:<password>@<host>:<port>/<db>
NEXTAUTH_SECRET=your_secret_key
4. Set up the database
Run Prisma migrations to set up the schema:
npx prisma migrate deploy
# or for development
npx prisma migrate dev
5. Start the development server
npm run dev
Open http://localhost:3000 in your browser.
Project Structure
src/app/— Next.js app directory (routes, pages, API)src/components/— Reusable UI componentsprisma/schema.prisma— Database schemasrc/lib/— Auth and Prisma helperspublic/— Static assets
Scripts
npm run dev— Start development servernpm run build— Build for productionnpm start— Start production servernpm run lint— Lint code
Database Schema
See prisma/schema.prisma for models: User, Car, FillUp, MileageEntry, enums for FuelType and Currency.
Built with passion using Next.js, Prisma, and Tailwind CSS.
Description
Car Fuel Tracker is a modern web app for tracking your car’s fuel fill-ups, EV charging, mileage, and costs. It supports multiple vehicles (gas, diesel, LPG, hybrid, or electric), provides interactive stats and charts, and features a responsive, user-friendly dashboard built with Next.js, React, Prisma, and PostgreSQL.
Languages
TypeScript
98.2%
CSS
1.4%
JavaScript
0.4%