Skip to main content

Description of the project here

Project description

MoneyMate

MoneyMate is a Python-based data layer and application toolkit for personal finance management. It provides a thread-safe, versioned SQLite backend with entity managers for users, categories, contacts, expenses, and transactions. It includes authentication with roles (user/admin), auditing of access events, deterministic listings with pagination and filtering, balance analytics, and structured logging. This repository also provide a Tkinter GUI (with matplotlib charts) built on the same backend.

Overview

MoneyMate offers a modular, testable data layer designed to be embedded in applications or used from scripts. Its architecture centers on:

  • A process-wide, thread-safe API manager wrapping a versioned SQLite database
  • Entity-specific managers handling CRUD with strict validation and consistent semantics
  • Deterministic listings to make UI and testing predictable
  • Optional GUI features (branch: gui), integrating with the same API layer
  • Packaging and CI/release automation to distribute wheels and source archives

Features

  • Thread-safe API manager with safe database path switching
  • Authentication and roles
    • User registration, login/logout
    • Role management (user/admin)
    • Admin registration policy (academic/testing only)
  • Auditing
    • Best-effort access logs for login/logout, failed_login, password_change, password_reset
  • Deterministic listings and search
    • Expenses/Transactions: ordered by date DESC, id DESC
    • Contacts/Categories: ordered by name ASC
    • Case-insensitive expense search by title/category
  • Pagination and filtering
    • limit, offset for listings
    • date_from, date_to for time-bounded queries
  • Categories and expenses semantics
    • No hard DB foreign key on expenses.category_id
    • Ownership enforced in application logic
    • category_id preserved after category deletion (per tests/specs)
  • CRUD semantics
    • Partial updates with patch-like behavior
    • Idempotent deletes with explicit deleted counts
  • Balances and analytics
    • Net balance calculation
    • Per-contact balance summaries from sender perspective
    • Detailed breakdowns for analytics
  • Database and schema
    • Versioned schema baseline and non-destructive migration scaffold
    • Constraints and indexes for integrity/performance
    • sqlite3.Row factory, WAL + synchronous=NORMAL best-effort tuning
  • Logging and observability
    • Structured, consistent logging across modules
    • Root logging opt-in via MONEYMATE_CONFIGURE_LOGGING
  • Tests
    • pytest-based test suite

Repository Structure

Top-level:

artifact/
├─ MoneyMate/
│  ├─ __init__.py
│  ├─ data_layer/
│  │  ├─ __init__.py
│  │  ├─ database.py           # Low-level DB connection, schema, migration baseline
│  │  ├─ manager.py            # Process-wide API manager, orchestrates sub-managers
│  │  ├─ users.py              # Registration, login/logout, roles, password mgmt
│  │  ├─ categories.py         # CRUD for categories, ownership checks
│  │  ├─ contacts.py           # CRUD for contacts
│  │  ├─ expenses.py           # CRUD, search, deterministic listing, pagination
│  │  ├─ transactions.py       # CRUD, deterministic listing, pagination
│  │  ├─ balances.py           # Net balance and per-contact summaries
│  │  ├─ logging_utils.py      # Structured logging helpers (naming illustrative)
│  │  └─ utils.py              # Shared utilities, validators
│  │
│  └─ gui/                     # GUI components (present on the gui branch)
│     ├─ __init__.py
│     ├─ app.py                # GUI entry-point (naming illustrative)
│     └─ ...                   # Views, controllers, assets
│
├─ tests/                      # test subdivided by category
│  ├─ data_layer/
│  ├─ gui/                     
│  ├─ system/
│                        
├─ .github/
│  └─ workflows/
│                
├─ LICENSE
├─ README.md
├─ pyproject.toml              
├─ requirements.txt
└─ requirements-dev.txt        # Includes pytest (per CI notes)

Flow Chart (architecture)

flowchart LR
  subgraph App["Application / GUI"]
    GUI["GUI Components"]
    CLI["Scripts / Integrations"]
  end

  subgraph API["API Manager"]
    MGR["DatabaseManager"]
  end

  subgraph Managers["Entity Managers"]
    U["Users"]
    C["Categories"]
    CO["Contacts"]
    E["Expenses"]
    T["Transactions"]
    B["Balances/Analytics"]
  end

  subgraph DB["SQLite Database"]
    SCHEMA["Versioned Schema + Migrations"]
    TABLES["Tables: users, categories, contacts, expenses, transactions, access_logs, ..."]
    INDEXES["Indexes + Constraints"]
  end

  App -->|calls| MGR
  MGR --> U & C & CO & E & T & B
  U & C & CO & E & T & B -->|validated SQL ops| DB
  DB -->|sqlite3.Row| MGR
  U -->|audit| TABLES
  MGR -->|logging| LOGS["Structured Logging"]

Acknowledgements

License

MIT License. See 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

moneymate-1.1.4.tar.gz (73.3 kB view details)

Uploaded Source

Built Distribution

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

moneymate-1.1.4-py3-none-any.whl (58.4 kB view details)

Uploaded Python 3

File details

Details for the file moneymate-1.1.4.tar.gz.

File metadata

  • Download URL: moneymate-1.1.4.tar.gz
  • Upload date:
  • Size: 73.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for moneymate-1.1.4.tar.gz
Algorithm Hash digest
SHA256 9ca0ea19ab0debfda24f81ff6e68407ee6215f10449b1238da859871bf5fdff8
MD5 67f0b702825e1ba4c28438ce6cbbf537
BLAKE2b-256 a7d58e7b7af107c9d2b3dce0c36cb549c6937ff3c67910d7f8b60b08bf5dd553

See more details on using hashes here.

File details

Details for the file moneymate-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: moneymate-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 58.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for moneymate-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 acbd1096bac267e3d42a9c1ade5c1c29e5c0c89fe81d91fc89466cbaaff2a6a7
MD5 2bb47532d51adcc0a1c1af1a22b7a756
BLAKE2b-256 a7e28dfbbcd76555167d797dc6e73163b3ca29c1a4f3cead4536cf9a26ea6b9d

See more details on using hashes here.

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