Overview
SmartWallet is an offline-first TUI application for managing personal finances. It organizes income and expenses in a hierarchical tree structure — categories can nest infinitely (e.g., Home -> Bills -> Electricity), and each leaf holds a signed transaction. The entire budget persists locally as a JSON file with schema versioning.
Built as a university project demonstrating the Composite and Factory Method design patterns with a clean MVC architecture separating business logic from the Textual-powered terminal UI.
Features
- Tree-structured budget — infinite category nesting with recursive balance calculation
- Modern TUI — custom dark theme with color-coded income/expenses
- Keyboard-driven — modal dialogs for add, edit, delete, and navigation
- Offline-first — all data stored locally in
~/.smartwallet/budget.json - Schema versioning — safe data migrations for future releases
- 27 unit tests — full coverage of model, factory, and persistence layers
Installation
Requires uv (recommended) or pipx.
Install as a standalone CLI tool (isolated environment, added to PATH):
uv tool install smartwallet
Or with pipx:
pipx install smartwallet
Then run:
smartwallet
To upgrade or uninstall:
uv tool upgrade smartwallet # or: pipx upgrade smartwallet
uv tool uninstall smartwallet # or: pipx uninstall smartwallet
Local Setup (development)
- Clone the repository:
git clone https://github.com/alwoodm/smartwallet.git cd smartwallet
- Install dependencies (requires uv):
uv sync - Run the application:
uv run smartwallet
Keybindings
| Key | Action |
|---|---|
a |
Add subcategory |
t |
Add transaction |
e |
Edit selected |
d |
Delete selected |
Tab |
Next tree node |
Shift+Tab |
Previous tree node |
q |
Quit |
Development
uv run ruff check . # Lint
uv run ruff format --check . # Format check
uv run pytest # Run tests
uv run pytest --cov # Tests with coverage
uv build # Build package
Architecture
The project follows an MVC architecture with four independent modules:
| Module | Location | Responsibility |
|---|---|---|
| Model | src/smartwallet/model/ |
Data structures, balance calculation |
| Factory | src/smartwallet/factory/ |
Validated object creation |
| Persistence | src/smartwallet/persistence.py |
JSON serialization/deserialization |
| UI | src/smartwallet/ui/ |
Textual TUI (screens, widgets, modals) |
For detailed documentation including design pattern analysis, see docs/architecture.md.
License
This project is licensed under the MIT license.
Metadata
Release files for smartwallet 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smartwallet-1.0.1.tar.gz | 469.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smartwallet-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 489.4 kB
Release files / smartwallet-1.0.1.tar.gz
| Download URL | smartwallet-1.0.1.tar.gz |
|---|---|
| Size | 469.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2afb76fff1b1710bfd479585462be6aa50ccb0daf54e970aadf1202f0e4b924
|
|
BLAKE2b-256 checksum How to use checksums |
6594c548bb145d395b37f7e19eaad7706dae75c63353ad88d719d865ed3f59a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / smartwallet-1.0.1-py3-none-any.whl
| Download URL | smartwallet-1.0.1-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05108b0cae58d263d3469591d77b8fb89b2a1b77fe19c9f651e464cff3ff0aa4
|
|
BLAKE2b-256 checksum How to use checksums |
78d2fc2bb2758783e335586cd13c46c00d14c653ad81f804a01e8754c1678c49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency log