Fueling Station Expense Tracker

A colorful and attractive daily expense tracking application for a fueling station with three branches selling diesel and petrol.

Features

  • Track daily expenses across 3 branches
  • Separate tracking for diesel and petrol sales
  • Colorful, modern UI with gradients and animations
  • Real-time expense management
  • Daily, weekly, and monthly summaries
  • Responsive design

Project Structure

├── backend/
│   ├── database/
│   │   ├── migrations.ts    # Database schema
│   │   └── queries.ts       # Database operations
│   ├── routes/
│   │   └── expenses.ts      # Expense API routes
│   └── index.ts             # Main server entry point
├── frontend/
│   ├── components/
│   │   ├── App.tsx          # Main application component
│   │   ├── ExpenseForm.tsx  # Add expense form
│   │   ├── ExpenseList.tsx  # Display expenses
│   │   └── Dashboard.tsx    # Summary dashboard
│   ├── index.html           # Main HTML template
│   ├── index.tsx            # Frontend entry point
│   └── style.css            # Custom styles
└── shared/
    └── types.ts             # Shared TypeScript types

Tech Stack

  • Backend: Hono.js with SQLite database
  • Frontend: React with TypeScript
  • Styling: TailwindCSS with custom gradients
  • Icons: Lucide React icons

Customization

🎨 Logo Options

You can easily customize the logo by editing /frontend/components/App.tsx and changing the logoType prop:

<LogoOptions logoType="custom-svg" // Change this value size={120} // logoUrl="/frontend/your-logo.png" // For static files />

Available Logo Types:

  1. custom-svg (Default) - Beautiful animated SVG logo with gas pump design
  2. ai-generated - AI-generated logo using Val Town's image service
  3. static-file - Use your own logo file (PNG, JPG, SVG)
  4. emoji - Simple emoji-based logo (⛽🏢💰)

To use your own logo:

  1. Create your logo file in /frontend/ (e.g., /frontend/my-logo.png)
  2. Set logoType="static-file"
  3. Set logoUrl="/frontend/my-logo.png"

🎨 Color Customization

You can customize colors by editing the CSS gradients in /frontend/index.html:

  • .gradient-bg - Main background
  • .gradient-branch-a/b/c - Branch-specific colors
  • .gradient-diesel/petrol - Fuel type colors

Getting Started

The application is now ready and fully functional!

Features Implemented:

  • ✅ Colorful, modern UI with gradients and animations
  • ✅ Track expenses across 3 branches (Branch A, B, C)
  • ✅ Support for Diesel and Petrol fuel types
  • ✅ 10 expense categories including Fuel Purchase, Equipment Maintenance, Staff Wages, etc.
  • ✅ Real-time dashboard with today/week/month summaries
  • ✅ Beautiful glass-effect cards with branch-specific gradients
  • ✅ Add new expenses with form validation
  • ✅ View and filter expense list
  • ✅ Delete expenses with confirmation
  • ✅ Responsive design for mobile and desktop
  • ✅ SQLite database with proper indexing
  • ✅ RESTful API endpoints

Usage:

  1. Dashboard: View summaries, fuel type breakdown, branch totals, and recent expenses
  2. Add Expense: Fill out the colorful form to add new expenses
  3. View Expenses: Browse all expenses with filtering options

The application features a beautiful purple gradient background with colorful cards for each branch and fuel type, making it both functional and visually appealing!