Skip to main content

SmartWallet CLI - finance tracker

Project description

SmartWallet

A terminal-based personal finance tracker with a tree-structured budget system.

App Screenshot

Python Textual JSON

uv pytest ruff

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
  • Cyberpunk TUI — custom dark theme with color-coded income/expenses
  • Keyboard-driven — modal dialogs for add, 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

Local Setup

  1. Clone the repository:
    git clone https://github.com/alwoodm/smartwallet.git
    cd smartwallet
    
  2. Install dependencies (requires uv):
    uv sync
    
  3. Run the application:
    uv run smartwallet
    

Keybindings

Key Action
a Add subcategory
t Add transaction
d Delete selected
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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smartwallet-1.0.0.tar.gz (470.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartwallet-1.0.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file smartwallet-1.0.0.tar.gz.

File metadata

  • Download URL: smartwallet-1.0.0.tar.gz
  • Upload date:
  • Size: 470.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for smartwallet-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6ae782a541a451d6bb979f108191d8197d31be6f7b56630f3e0044571f60f9cd
MD5 1f8a0b948fb7d510032f484d0b043cf2
BLAKE2b-256 e380510ab5857d125660483f174359ddfea1a2bef70de4a3c3ee945e665aaca9

See more details on using hashes here.

Provenance

The following attestation bundles were made for smartwallet-1.0.0.tar.gz:

Publisher: ci.yml on alwoodm/smartwallet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file smartwallet-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: smartwallet-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for smartwallet-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f7651c5eda7a150a622b5ce7c0c801716ac37a3a25b09e40ce70c27ae8086fc
MD5 0510034c5ab1f1f70f9364a7dd529922
BLAKE2b-256 099cd13342d0ccb1e58bf92b94f6d73b39f4a95e650e9968155189ad78600e8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for smartwallet-1.0.0-py3-none-any.whl:

Publisher: ci.yml on alwoodm/smartwallet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page