CarBudget is a desktop application designed to help users track car purchase costs, running expenses, and calculate profit or loss when selling vehicles. The software provides comprehensive tools for managing vehicle-related finances efficiently.
Key Features:
Expense Logging: Users can log all car-related expenses, including fuel, maintenance, repairs, and insurance, with the ability to attach photos of receipts.
Plate Lookup: Automatically fetch detailed information about a vehicle using its license plate (currently supported in Sweden and Norway).
Economy Dashboard: Offers fleet-wide totals and per-vehicle breakdowns, allowing users to filter by date range for better financial insights.
Mobile-Accessible Web UI: The application features a responsive web interface that can be accessed from mobile devices, ensuring seamless management on the go.
Audience & Benefit:
Ideal for car owners, fleet managers, or anyone looking to track and optimize vehicle-related expenses. CarBudget empowers users to make informed financial decisions by providing clear insights into costs and profits. Its user-friendly design ensures that managing finances is efficient and stress-free.
The application can be installed via winget for easy setup on Windows systems.
README
๐ Car Budget Tracker
A car budget tracking application built with .NET and React. Available as a Windows desktop app and a self-hosted Docker container.
The app will be available at http://localhost:2233
API at http://localhost:2233/api
Swagger docs at http://localhost:2233/swagger
To stop the containers:
docker compose down
Customizing the Port
Edit webui_port in docker-compose.yml:
environment:
- webui_port=2233 # change this to your desired port
The port mapping updates automatically to match.
Choosing Region
Set region in docker-compose.yml to control currency, distance unit, and number formatting. Defaults to sweden if omitted.
Region
Value
Currency
Distance
Sweden
sweden
SEK
km
Norway
norway
NOK
km
Europe
europe
EUR
km
America
america
USD
km
USA
usa
USD
miles
Great Britain
gb
GBP
miles
Worldwide
worldwide
configurable
configurable
Worldwide region lets you choose currency and distance unit freely:
environment:
region: worldwide
currency: CHF # any supported currency code
unit: km # km or miles
You can also override the currency independently for the other regions with the currency env var:
environment:
region: europe
currency: CHF # override to Swiss Franc
If you change region later, restart the container:
docker compose restart app
Persisting the Database
By default the database is stored inside the container at /app/data/carbudget.db.
To persist it on the host, set the volume in docker-compose.yml:
volumes:
- /your/host/path:/app/data
Running Locally (Without Docker)
Running the Backend API
Open a terminal in the project root directory
Run the API:
$env:region='europe' # sweden | norway | europe | america | usa | gb | worldwide
$env:currency='CHF' # optional currency override
$env:unit='km' # km or miles (worldwide region only)
cd src/CarBudget.Api
dotnet run
The API will start at http://localhost:5000
Swagger documentation available at http://localhost:5000/swagger
Running the Frontend
Open a new terminal in the project root directory
Navigate to frontend and start the development server:
cd frontend
npm start
The app will open in your browser at http://localhost:3000
Usage
Add a Vehicle
Click "Add New Vehicle" on the dashboard
Fill in vehicle details (make, model, year, purchase price, etc.)
Click "Add Vehicle"
Add Expenses
Click on a vehicle card to view details
Click "Add Expense"
Select expense type and fill in details
Click "Add Expense"
View Statistics
Dashboard shows total expenses and costs for each vehicle
Vehicle details page shows complete expense history
API Endpoints
Vehicles
GET /api/vehicles - Get all vehicles
GET /api/vehicles/{id} - Get vehicle by ID
POST /api/vehicles - Create a new vehicle
PUT /api/vehicles/{id} - Update a vehicle
DELETE /api/vehicles/{id} - Delete a vehicle
Expenses
GET /api/expenses - Get all expenses
GET /api/expenses/vehicle/{vehicleId} - Get expenses by vehicle
GET /api/expenses/{id} - Get expense by ID
POST /api/expenses - Create a new expense
PUT /api/expenses/{id} - Update an expense
DELETE /api/expenses/{id} - Delete an expense
Database
The application uses SQLite, which creates a carbudget.db file automatically when you first run the API. No database setup required!