How metoo8803/expense_tracker works
This is a small expense-tracking web app: a user loads the frontend, then can list, create, edit, or delete expenses through HTTP endpoints. The FastAPI handlers validate and shape data with Pydantic schemas and use SQLite for persistence. The frontend’s fetch calls and the backend’s routes are shown in source; the HTML file exists in the tree but its contents were not provided, so no HTML-to-script relationship is asserted.
Main entry points: main.py FastAPI routes · database.py SQLite connection and setup · app.js Expense interface · index.html Frontend page
Components 7
Frontend
- Frontend page
static/index.html - Expense interface
static/app.js
API and validation
- FastAPI routes
main.py - Expense schemas
schemas.py
Persistence
- SQLite connection and setup
database.py - Expenses database
expenses.db
Other components
- User
Connections 6
- User → FastAPI routes: opens app
main.py - FastAPI routes → Frontend page: serves page
main.py - Expense interface → FastAPI routes: calls CRUD routes
static/app.js - FastAPI routes → Expense schemas: validates and shapes
main.py - FastAPI routes → SQLite connection and setup: gets connections
main.py - SQLite connection and setup → Expenses database: opens database
database.py