How matiasmazparrotefeliu/expense_management_application works
This is a personal expense-management application: users authenticate, manage multi-currency accounts, record income and expenses, and review budgets and monthly reports. The main workflow runs from the protected frontend through its API client to authenticated backend routes and domain services, which validate and persist changes. Text-based AI extraction returns an editable preview; the user confirms it through the normal operation-creation flow. The graph includes documented capabilities whose implementation was not sampled; edges are limited to relationships supported by excerpts, source-index references, or the README.
Main entry points: main.py FastAPI application · models Domain records · operation_service.py Operation service · operation_routes.py Operation routes
Components 30
Frontend experience
- Login and registration
frontend-next/src/features/auth - Auth provider
frontend-next/src/features/auth/AuthProvider.tsx - Accounts and operations UI
frontend-next/src/components/dashboard - AI extraction preview
frontend-next/src/components/dashboard/AIExtractionForm.tsx - Monthly reports UI
frontend-next/src/features/reports/MonthlyReportView.tsx - Data provider
frontend-next/src/features/data/DataProvider.tsx - HTTP client
frontend-next/src/api/client.ts - Auth API adapter
frontend-next/src/api/authApi.ts - Operations API adapter
frontend-next/src/api/operationsApi.ts - Budget API adapter
frontend-next/src/api/budgetApi.ts
Backend API
- FastAPI application
backend/main.py - User routes
backend/src/api/user_routes.py - Account routes
backend/src/api/account_routes.py - Category routes
backend/src/api/category_routes.py - Operation routes
backend/src/api/operation_routes.py - Budget routes
backend/src/api/budget_routes.py
Domain services
- User service
backend/src/services/user_service.py - Account service
backend/src/services/account_service.py - Category service
backend/src/services/category_service.py - Operation service
backend/src/services/operation_service.py - Narration extraction
backend/src/services/operation_text_service.py - Budget analytics
backend/src/services/budget_service.py
Authentication
- Request authentication
backend/src/auth/middleware.py - JWT and password security
backend/src/auth/security.py - Current-user dependency
backend/src/auth/dependencies.py
Persistence and models
- Database sessions
backend/src/db/config.py - Domain records
backend/src/models - Budget limits
backend/src/models/budget_limit.py
Other components
- User
- LLM provider
Connections 42
- User → Login and registration: signs in
README.md - User → Accounts and operations UI: manages finances
README.md - Login and registration → Auth provider: submits credentials
frontend-next/src/features/auth/AuthProvider.tsx - Auth provider → Auth API adapter: calls
frontend-next/src/features/auth/AuthProvider.tsx - Auth API adapter → HTTP client: sends requests
frontend-next/src/api/authApi.ts - Accounts and operations UI → Data provider: uses data
- Data provider → Operations API adapter: requests operations
- Data provider → Budget API adapter: requests budgets
- AI extraction preview → Operations API adapter: requests extraction
README.md - Operations API adapter → HTTP client: sends requests
- Budget API adapter → HTTP client: sends requests
- Monthly reports UI → Budget API adapter: loads summaries
- HTTP client → FastAPI application: calls REST API
README.md - FastAPI application → Request authentication: installs middleware
backend/main.py - FastAPI application → User routes: registers router
backend/main.py - FastAPI application → Account routes: registers router
backend/main.py - FastAPI application → Category routes: registers router
backend/main.py - FastAPI application → Operation routes: registers router
backend/main.py - FastAPI application → Budget routes: registers router
backend/main.py - Request authentication → JWT and password security: validates tokens
backend/src/auth/middleware.py - Request authentication → Database sessions: loads user data
backend/src/auth/middleware.py - Account routes → Current-user dependency: requires user
backend/src/api/account_routes.py - Operation routes → Current-user dependency: requires user
backend/src/api/operation_routes.py - Budget routes → Current-user dependency: requires user
backend/src/api/budget_routes.py - User routes → User service: calls
backend/src/api/user_routes.py - Account routes → Account service: calls
backend/src/api/account_routes.py - Category routes → Category service: calls
backend/src/api/category_routes.py - Operation routes → Operation service: calls
backend/src/api/operation_routes.py - Operation routes → Narration extraction: calls extraction
backend/src/api/operation_routes.py - Budget routes → Budget analytics: calls
backend/src/api/budget_routes.py - Narration extraction → Operation service: checks account
backend/src/services/operation_text_service.py - Narration extraction → LLM provider: requests extraction
backend/src/services/operation_text_service.py - User → Operation service: confirms preview
README.md - Operation service → Domain records: reads and writes
backend/src/services/operation_service.py - Account service → Domain records: reads and writes
- Category service → Domain records: reads catalog
- User service → Domain records: reads and writes
backend/src/services/user_service.py - Budget analytics → Domain records: reads and writes
backend/src/services/budget_service.py - Budget analytics → Operation service: uses operation data
backend/src/services/budget_service.py - Budget analytics → Budget limits: manages limits
backend/src/services/budget_service.py - FastAPI application → Database sessions: creates schema
backend/main.py - Database sessions → Domain records: provides sessions