How nnanna-1/budget-app works
Budget App is a personal-finance tracker. Users register or log in, set a budget profile during onboarding, then view goals and transaction activity on the dashboard; they can add and delete transactions. The React client calls a FastAPI API that authenticates users and persists profiles and transactions in PostgreSQL. The README also lists subscription tracking and what-if planning, but their implementation is not visible in the sampled source, so those capabilities are shown without asserted runtime connections. Connections between frontend requests and backend routes are not directly evidenced in the excerpts.
Main entry points: App.jsx Route application · Dashboard.jsx Dashboard · database.py Database session · api.js API client
Components 23
Web client
- Route application
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx - API client
frontend/src/api.js - Login
frontend/src/pages/Login.jsx - Registration
frontend/src/pages/Register.jsx - Onboarding
frontend/src/pages/Onboarding.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Add transaction
frontend/src/components/AddTransaction.jsx - Goal progress
frontend/src/components/GoalProgress.jsx - Spending chart
frontend/src/components/SpendingChart.jsx
API and identity
- FastAPI entry
backend/app/main.py - Authentication routes
backend/app/routers/auth.py - JWT verification
backend/app/oauth2.py
Finance domain
- Subscription tracker
frontend/src - Scenario planner
frontend/src - Profile routes
backend/app/routers/budget_profile.py - Transaction routes
backend/app/routers/transaction.py
Persistence
- User model
backend/app/models/user.py - Budget profile model
backend/app/models/budget_profile.py - Transaction model
backend/app/models/transaction.py - Database session
backend/app/database.py - PostgreSQL
Other components
- Budget user
Connections 32
- Budget user → Route application: uses
frontend/src/App.jsx - Route application → Auth context: reads auth
frontend/src/App.jsx - Route application → Login: routes to
frontend/src/App.jsx - Route application → Registration: routes to
frontend/src/App.jsx - Route application → Onboarding: routes to
frontend/src/App.jsx - Route application → Dashboard: routes to
frontend/src/App.jsx - Login → Auth context: updates session
frontend/src/pages/Login.jsx - Login → API client: requests auth
frontend/src/pages/Login.jsx - Registration → API client: submits details
frontend/src/pages/Register.jsx - Onboarding → API client: submits profile
frontend/src/pages/Onboarding.jsx - Dashboard → API client: loads data
frontend/src/pages/Dashboard.jsx - Dashboard → Add transaction: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Goal progress: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Spending chart: renders
frontend/src/pages/Dashboard.jsx - Add transaction → API client: submits transaction
frontend/src/components/AddTransaction.jsx - FastAPI entry → Authentication routes: mounts routes
backend/app/main.py - FastAPI entry → Profile routes: mounts routes
backend/app/main.py - FastAPI entry → Transaction routes: mounts routes
backend/app/main.py - Authentication routes → JWT verification: uses identity
backend/app/routers/auth.py - JWT verification → User model: looks up user
backend/app/oauth2.py - Authentication routes → User model: queries and creates
backend/app/routers/auth.py - Profile routes → JWT verification: requires identity
backend/app/routers/budget_profile.py - Profile routes → Budget profile model: reads and writes
backend/app/routers/budget_profile.py - Transaction routes → Transaction model: reads and writes
backend/app/routers/transaction.py - Transaction routes → JWT verification: requires identity
backend/app/routers/transaction.py - User model → Database session: uses ORM base
backend/app/models/user.py - Budget profile model → Database session: uses ORM base
backend/app/models/budget_profile.py - Transaction model → Database session: uses ORM base
backend/app/models/transaction.py - FastAPI entry → Database session: creates tables
backend/app/main.py - Database session → PostgreSQL: connects
backend/app/database.py - Budget user → Subscription tracker: tracks subscriptions
README.md - Budget user → Scenario planner: models scenarios
README.md