How luc45-pereira/api-tcc works
This is a FastAPI personal-finance API: clients authenticate with JWTs, then manage users, addresses, cards, income and expenses, or connect a bank through Pluggy and retrieve accounts and transactions. The main entry point mounts these route families; sampled CRUD routes validate tokens and use SQLAlchemy sessions to read or mutate MySQL-backed models. The README also describes balance and bill notifications, but no implementation appears in the supplied tree. User/address and some Pluggy route behavior is represented from documented scope and paths; their source was not sampled.
Main entry points: main.py FastAPI app · transactions.py Bank accounts and transactions · conn.py SQLAlchemy sessions · access_pluggy.py Pluggy access
Components 17
API routes
- FastAPI app
main.py - User routes
internal/routers/user.py - Address routes
internal/routers/endereco.py
Finance records
- Card routes
internal/routers/cartao.py - Income routes
internal/routers/entrada.py - Expense routes
internal/routers/saida.py
Auth and storage
- JWT library
- Token helper
internal/Auth/token.py - Request schemas
internal/models/pydantic.py - SQLAlchemy sessions
internal/Connection/conn.py - ORM models
internal/Database/Database.py
Bank integration
- Pluggy access
internal/routers/PluggyRouter/access_pluggy.py - Bank accounts and transactions
internal/routers/PluggyRouter/transactions.py - Pluggy schemas
internal/models/PluggyModels/models.py
Other components
- API client
- MySQL database
- Pluggy API
Connections 38
- API client → FastAPI app: sends requests
- FastAPI app → User routes: mounts routes
- FastAPI app → Address routes: mounts routes
- FastAPI app → Card routes: mounts routes
- FastAPI app → Income routes: mounts routes
- FastAPI app → Expense routes: mounts routes
- FastAPI app → Pluggy access: mounts routes
- FastAPI app → Bank accounts and transactions: mounts routes
- User routes → JWT library: validates tokens
- Address routes → JWT library: validates tokens
- Card routes → JWT library: validates tokens
- Income routes → JWT library: validates tokens
- Expense routes → JWT library: validates tokens
- Pluggy access → JWT library: validates tokens
- Bank accounts and transactions → JWT library: validates tokens
- Token helper → JWT library: encodes and decodes
- Card routes → Request schemas: uses schemas
- Income routes → Request schemas: uses schemas
- Expense routes → Request schemas: uses schemas
- Pluggy access → Request schemas: uses token schema
- Bank accounts and transactions → Pluggy access: gets API key
- Bank accounts and transactions → Pluggy schemas: validates responses
- Pluggy access → Pluggy API: requests access and connectors
- Bank accounts and transactions → Pluggy API: fetches bank data
- User routes → SQLAlchemy sessions: opens sessions
- Address routes → SQLAlchemy sessions: opens sessions
- Card routes → SQLAlchemy sessions: opens sessions
- Income routes → SQLAlchemy sessions: opens sessions
- Expense routes → SQLAlchemy sessions: opens sessions
- Pluggy access → SQLAlchemy sessions: opens sessions
- Bank accounts and transactions → SQLAlchemy sessions: opens sessions
- SQLAlchemy sessions → MySQL database: connects to
- Card routes → ORM models: queries and updates
- Income routes → ORM models: queries and updates
- Expense routes → ORM models: queries and updates
- Pluggy access → ORM models: saves account link
- Bank accounts and transactions → ORM models: reads and updates link
- ORM models → MySQL database: maps stored records