How abhishek-tm-123/smart-exp-v2-backend works
This is a personal-finance application exposing authentication, transaction tracking, spending summaries, budgets, and AI chat through a FastAPI service, with a CLI also present. The main user workflow is to authenticate, manage transactions, and request summaries or budget status; chat is a separate capability. The source index supports the route, service, model, and configuration relationships shown. The README is empty, and the CLI’s connections are unclear from the indexed references, so it is included without inferred links.
Main entry points: finance.py Finance service · main.py FastAPI app · auth.py Auth routes · expenses.py Expense routes
Components 23
API and Interfaces
- FastAPI app
app/main.py - Auth routes
app/api/routes/auth.py - Expense routes
app/api/routes/expenses.py - Budget routes
app/api/routes/budgets.py - Chat route
app/api/routes/chat.py - CLI interface
app/cli.py - Auth schemas
app/schemas/auth.py - Transaction schemas
app/schemas/transactions.py - Budget schemas
app/schemas/budgets.py - Summary schemas
app/schemas/summary.py
Finance Services
- Transaction service
app/services/transactions.py - Finance service
app/services/finance.py - AI service
app/services/ai.py
Identity and Configuration
- Auth service
app/services/auth.py - Token security
app/core/security.py - Auth dependencies
app/api/deps.py - App settings
app/core/config.py
Data Model
- DB sessions
app/db/session.py - User records
app/models/user.py - Transactions
app/models/transaction.py - Budgets
app/models/budget.py
Other components
- Finance user
- SQL database
Connections 28
- Finance user → FastAPI app: uses
- FastAPI app → Auth routes: registers
app/main.py - FastAPI app → Expense routes: registers
app/main.py - FastAPI app → Budget routes: registers
app/main.py - FastAPI app → Chat route: registers
app/main.py - Auth routes → Auth schemas: validates and returns
app/api/routes/auth.py - Auth routes → Auth service: authenticates
app/api/routes/auth.py - Auth routes → Token security: issues token
app/api/routes/auth.py - Auth routes → Auth dependencies: requires user
app/api/routes/auth.py - Auth service → Token security: hashes and verifies
app/services/auth.py - Auth service → User records: queries and creates
app/services/auth.py - Auth dependencies → Token security: decodes token
app/api/deps.py - Auth dependencies → User records: loads user
app/api/deps.py - Token security → App settings: reads settings
app/core/security.py - Expense routes → Transaction schemas: accepts and returns
app/api/routes/expenses.py - Expense routes → Transaction service: manages transactions
app/api/routes/expenses.py - Expense routes → Finance service: requests summaries
app/api/routes/expenses.py - Expense routes → Summary schemas: returns summary
app/api/routes/expenses.py - Transaction service → Transactions: queries and updates
app/services/transactions.py - Budget routes → Budget schemas: accepts and returns
app/api/routes/budgets.py - Budget routes → Finance service: manages budget status
app/api/routes/budgets.py - Finance service → Budgets: creates and evaluates
app/services/finance.py - Finance service → Transactions: aggregates spending
app/services/finance.py - Finance service → Budget schemas: uses budget input
app/services/finance.py - Finance service → Summary schemas: builds summaries
app/services/finance.py - Chat route → AI service: handles chat
app/api/routes/chat.py - DB sessions → App settings: reads database URL
app/db/session.py - DB sessions → SQL database: opens sessions
app/db/session.py