How prestonwanttorevenge/expense-management works
Alikaka is a Vietnamese personal income-and-expense ledger: users manage categories and VND transactions, then inspect filtered cash-flow summaries in a browser dashboard or through REST endpoints. The documented flow runs from the static UI or API client through FastAPI routers, service validation, repositories, and SQLite; results return as JSON for the UI’s ledger, charts, and CSV export. The README documents UI behavior and API capabilities beyond the excerpts. Edges below use README or indexed/import-visible evidence; unsampled details are not asserted.
Main entry points: transactions.py Transaction and summary service · main.py FastAPI runtime · deps.py Service dependencies · v1 REST routers
Components 22
Entry points
- FastAPI runtime
app/main.py - REST routers
app/api/v1 - Service dependencies
app/api/deps.py - Problem errors
app/core/exceptions.py
Ledger domain
- Category API
app/api/v1/categories.py - Transaction API
app/api/v1/transactions.py - Health and summary API
app/api/v1/summary.py - Category service
app/services/categories.py - Transaction and summary service
app/services/transactions.py - Category schemas
app/schemas/category.py - Transaction schemas
app/schemas/transaction.py - Shared API schemas
app/schemas/common.py - Summary schema
app/schemas/summary.py
Persistence
- Category repository
app/repositories/categories.py - Transaction repository
app/repositories/transactions.py - SQLite setup
app/db/sqlite.py - SQLite ledger
Presentation
- Ledger dashboard
app/static/index.html - Dashboard behavior
app/static/app.js - Dashboard styling
app/static/app.css
Other components
- Ledger user
- API client
Connections 35
- Ledger user → Ledger dashboard: uses
README.md - Ledger dashboard → Dashboard behavior: loads
README.md - Dashboard behavior → FastAPI runtime: HTTP requests
README.md - API client → FastAPI runtime: HTTP requests
README.md - FastAPI runtime → REST routers: mounts
app/main.py - FastAPI runtime → Problem errors: registers handlers
app/main.py - REST routers → Category API: routes
app/api/v1/__init__.py - REST routers → Transaction API: routes
app/api/v1/__init__.py - REST routers → Health and summary API: routes
app/api/v1/__init__.py - Category API → Service dependencies: injects service
app/api/v1/categories.py - Transaction API → Service dependencies: injects service
app/api/v1/transactions.py - Health and summary API → Service dependencies: injects service
app/api/v1/summary.py - Service dependencies → Category service: constructs
app/api/deps.py - Service dependencies → Transaction and summary service: constructs
app/api/deps.py - Category API → Category service: calls
app/api/v1/categories.py - Transaction API → Transaction and summary service: calls
app/api/v1/transactions.py - Health and summary API → Transaction and summary service: calls
app/api/v1/summary.py - Category API → Category schemas: validates output
app/api/v1/categories.py - Transaction API → Transaction schemas: validates payload
app/api/v1/transactions.py - Health and summary API → Summary schema: returns shape
app/api/v1/summary.py - Category schemas → Shared API schemas: uses helpers
app/schemas/category.py - Transaction schemas → Shared API schemas: uses metadata
app/schemas/transaction.py - Category service → Category repository: calls
app/services/categories.py - Transaction and summary service → Transaction repository: calls
app/services/transactions.py - Transaction and summary service → Category repository: checks category
app/services/transactions.py - Category service → Problem errors: raises domain errors
app/services/categories.py - Transaction and summary service → Problem errors: raises domain errors
app/services/transactions.py - Category repository → SQLite setup: uses SQL helpers
app/repositories/categories.py - Transaction repository → SQLite setup: uses SQL helpers
app/repositories/transactions.py - FastAPI runtime → SQLite setup: initializes database
app/main.py - SQLite setup → SQLite ledger: creates and configures
app/db/sqlite.py - Category repository → SQLite ledger: reads and writes
app/repositories/categories.py - Transaction repository → SQLite ledger: reads and writes
app/repositories/transactions.py - Dashboard behavior → Dashboard styling: renders styled UI
README.md - Dashboard behavior → Ledger dashboard: updates dashboard
README.md