How ottermere21/codyssey-b2-1-budget-tracker works
A standard-library console budgeting app takes commands through a CLI, applies business rules and validation in a service layer, then streams or persists JSONL records; results include transaction views, monthly summaries, and CSV exchange. The README also documents category and budget management. The sampled excerpts show the main CLI, service, validation, and repository interactions. Some command implementations and repository methods were not fully sampled, so those documented capability links are shown at the service boundary rather than as inferred internal pipelines.
Main entry points: cli.py Command handlers · validator.py Input validation · service.py Transaction operations · repository.py Transaction repository
Components 17
Command interface
- Module entry
budget_app/__main__.py - Command handlers
budget_app/cli.py
Budget domain
- Transaction operations
budget_app/service.py - Summary and budgets
budget_app/service.py - Category management
budget_app/service.py - CSV exchange
budget_app/service.py - Domain models
budget_app/models.py
File persistence
- Transaction repository
budget_app/repository.py - Category repository
budget_app/repository.py - Budget repository
budget_app/repository.py - Transactions JSONL
- Categories JSONL
- Budgets JSONL
Shared support
- Input validation
budget_app/validator.py - CLI and timing decorators
budget_app/decorators.py - Domain exceptions
budget_app/exceptions.py
Other components
- CLI user
Connections 29
- CLI user → Module entry: runs commands
README.md - Module entry → Command handlers: calls main
budget_app/__main__.py - Command handlers → Transaction operations: dispatches requests
budget_app/cli.py - Command handlers → Summary and budgets: requests summaries
README.md - Command handlers → Category management: requests categories
README.md - Command handlers → CSV exchange: requests CSV
budget_app/cli.py - Command handlers → Input validation: validates prompts
budget_app/cli.py - Command handlers → CLI and timing decorators: wraps main
budget_app/cli.py - Transaction operations → Input validation: validates fields
budget_app/service.py - Transaction operations → Transaction repository: reads and writes
budget_app/service.py - Transaction operations → Category repository: checks categories
budget_app/service.py - Transaction operations → Domain models: creates transactions
budget_app/service.py - Summary and budgets → Input validation: validates month
budget_app/service.py - Summary and budgets → Transaction repository: streams transactions
budget_app/service.py - Summary and budgets → Budget repository: reads budgets
budget_app/service.py - Summary and budgets → Domain models: returns summary
budget_app/service.py - Category management → Input validation: validates names
budget_app/service.py - Category management → Category repository: manages categories
budget_app/service.py - CSV exchange → Input validation: validates rows
budget_app/service.py - CSV exchange → Transaction repository: streams transactions
budget_app/service.py - CSV exchange → Category repository: checks categories
budget_app/service.py - CSV exchange → Domain models: imports transactions
budget_app/service.py - Transaction repository → Transactions JSONL: reads and writes
budget_app/repository.py - Category repository → Categories JSONL: reads and writes
budget_app/repository.py - Budget repository → Budgets JSONL: reads and writes
README.md - Transaction repository → Domain models: serializes records
budget_app/repository.py - Input validation → Domain exceptions: raises errors
budget_app/validator.py - CLI and timing decorators → Domain exceptions: catches app errors
budget_app/decorators.py - Command handlers → Domain exceptions: raises CLI errors
budget_app/cli.py