Skip to content

arunjoyt/kido

Repository files navigation

Kido — Kids Money Tracker

A mobile-friendly money tracking app for families built on Frappe. Kids earn money by completing tasks and log when they spend it; parents can manage all their kids' balances from one place.

Screenshots

Kid Home Edit Transaction Parent Home Kid Detail Quick Add

Features

  • Kid view — large balance display, transaction history with income/expense colour coding and date shown on each row, floating + button to add entries, edit ✏️ and delete 🗑️ on each row
  • Parent view — card grid of all linked kids with live balances, tap into any kid to view/add/edit/delete transactions on their behalf; floating + button on the kids grid opens a quick-add sheet with a kid picker so a parent can add the same transaction for one or more kids in one go without navigating into each kid's detail
  • Date recording — each transaction stores the date it occurred; defaults to today but can be changed to any past or future date when adding or editing
  • Single-page UI — all views load at /kido; navigation between home, kids grid, and kid detail is instant with no page reloads; bottom tab bar switches between top-level screens; neither role can reach Frappe Desk
  • Balance auto-calculationcurrent_balance on Kid Profile is recomputed automatically on every transaction submit or cancel

User Roles

Role Access
Kido Parent View and manage all linked kids' profiles and transactions
Kido Kid View and manage only their own account

Admin sets up all accounts through Frappe Desk — parents and kids only ever see the mobile UI.

Admin Setup (one-time per family)

  1. In Frappe Desk → create User accounts for each family member, set User Type = Website User
  2. Assign Kido Parent role to parents and Kido Kid role to kids
  3. Create a Kid Profile for each child — link their User account and add parent rows
New User Assign "Kido Parent" role
New User Assign Role
New Kid Profile Kid Profile created
New Kid Profile Kid Profile Created

Installation

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch develop
bench --site <your-site> install-app kido
bench --site <your-site> migrate
bench build --app kido

Test Data

To quickly populate the site with sample users and kid profiles:

bench --site <your-site> execute kido.kido.setup.create_test_data
bench --site <your-site> execute kido.kido.setup.create_test_transactions

This creates:

  • Parents: alex@kido.test and sam@kido.test (password: Test@1234)
  • Kids: mia@kido.test and jake@kido.test (password: Test@1234)
  • Sample income and expense transactions for each kid

If test runs leave residue transactions on the site, restore the seed data to its original state with:

bench --site <your-site> execute kido.kido.setup.remove_dirty_transactions

This cancels and deletes any transaction whose description contains the word "test" on the Mia and Jake profiles.

Testing

Backend (Python)

Tests run against a Frappe site. Enable tests on the site once, then run any time:

bench --site <your-site> set-config allow_tests true   # one-time
bench --site <your-site> run-tests --app kido

Integration tests cover:

Suite What's tested
test_kid_profile Balance recalculation — income, expense, mixed, no transactions
test_kid_transaction Validation, before_insert / on_submit / on_cancel lifecycle
test_api All API endpoints — access control for every role combination, CRUD balance arithmetic
test_workspace Frappe Desk Workspace exists and its DocType shortcuts resolve

Frontend Unit Tests (Vitest)

cd frontend
yarn test

UI (Playwright)

Full behavioral end-to-end tests run against a real, already-running bench site (the app needs live Frappe auth/API responses, not just static files). Build the frontend and clear the cache first:

# from apps/kido/frontend
yarn build

# from the bench root, with $SITE already running
bench --site $SITE clear-cache

Then run any time:

# back in apps/kido/frontend
yarn test:e2e              # headless (CI-friendly)
yarn test:e2e:headed       # watch it in a real browser window
yarn test:e2e:report       # open the HTML report from the last run

By default it targets http://127.0.0.1:8005/kido/; point it elsewhere with KIDO_TEST_URL=http://host:port/kido/ yarn test:e2e.

Covers authentication flows, all three views of the single-page UI, full transaction CRUD, date recording, and parent quick-add (each test cleans up after itself so the site is left unchanged). The suite logs in as alex@kido.test (parent) and mia@kido.test (kid) and saves the session to frontend/e2e/.auth/ so subsequent runs skip the login step.

Note: frontend/e2e/.auth/ and frontend/e2e/report/ are gitignored — they contain live session tokens and generated artifacts.

Contributing

This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:

cd apps/kido
pre-commit install

Pre-commit is configured to use the following tools:

  • ruff
  • eslint
  • prettier
  • pyupgrade

CI

This app can use GitHub Actions for CI. The following workflows are configured:

  • CI: Installs this app, runs backend and frontend unit tests, and builds the frontend on every push to develop branch.
  • Linters: Runs Frappe Semgrep Rules and pip-audit on every pull request.

License

MIT

About

Kids money tracker app built on Frappe

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages