How afadhitya/wallet-app works
Wallet App is an offline-first personal-finance CLI. Users invoke wallet commands to record and organize money activity, then inspect budgets, scheduled bills, forecasts, and reports; command handlers delegate domain work to services, which use generated SQL queries against SQLite. The tree and README document the broader feature set, but excerpts only expose selected transaction and persistence behavior, so uncertain cross-service calls are omitted. Configuration, exchange-rate management, and self-update are represented as separate capabilities.
Main entry points: root.go Command handlers · service.go Service wiring · querier.go Generated queries · main.go Wallet command
Components 22
CLI interface
- Wallet command
cmd/wallet/main.go - Command handlers
internal/cli/root.go - Output formatting
internal/cli/format.go
Finance domains
- Transactions
internal/service/transaction.go - Accounts
internal/service/account.go - Categories
internal/service/category.go - Tags
internal/service/tag.go - Budgets
internal/service/budget.go - Planned payments
internal/service/planned_payment.go - Forecasting
internal/service/forecast.go - Reports
internal/service/report.go - Currency conversion
internal/service/currency.go - Service wiring
internal/service/service.go
Persistence
- SQLite setup
internal/db/db.go - Generated queries
internal/gen/querier.go - Finance records
internal/gen/models.go - SQLite database
Configuration and updates
- App configuration
pkg/config/config.go - Exchange rates
pkg/config/rates.go - Self updater
pkg/update/updater.go
Other components
- Wallet user
- Release service
Connections 27
- Wallet user → Wallet command: runs commands
- Wallet command → Command handlers: executes root
- Command handlers → Transactions: dispatches activity
- Command handlers → Accounts: dispatches account ops
- Command handlers → Categories: dispatches category ops
- Command handlers → Tags: dispatches tag ops
- Command handlers → Budgets: dispatches budget ops
- Command handlers → Planned payments: dispatches bill ops
- Command handlers → Forecasting: dispatches forecasts
- Command handlers → Reports: dispatches reports
- Command handlers → Currency conversion: dispatches rate ops
- Command handlers → Output formatting: formats responses
- Service wiring → Generated queries: creates queries
- Transactions → Service wiring: uses service wiring
- Accounts → Service wiring: uses service wiring
- Categories → Service wiring: uses service wiring
- Tags → Service wiring: uses service wiring
- Budgets → Service wiring: uses service wiring
- Planned payments → Service wiring: uses service wiring
- Forecasting → Service wiring: uses service wiring
- Reports → Service wiring: uses service wiring
- Currency conversion → Service wiring: uses service wiring
- Generated queries → SQLite database: reads and writes
- Generated queries → Finance records: maps records
- SQLite setup → SQLite database: opens and migrates
- App configuration → Exchange rates: configures rates
- Self updater → Release service: checks and downloads