A simple single-page dashboard for managing kids' points, including earned points, deductions, and reward redemptions.
Records are stored in a lightweight local database at data/points.sqlite. Deletes use soft deletion by writing deletedAt; deleted items remain in the database and are automatically excluded from totals.
npm install
npm run devnpm run dev starts both services:
- The Vite frontend development server
- The local SQLite API for reading and writing
data/points.sqlite
The child name in the page title is configurable with VITE_CHILD_NAME:
VITE_CHILD_NAME="Alex" npm run devWithout this setting, the title defaults to Vincent's Points Dashboard.
Debug mode shows a Permanently Delete button in Deleted Items. It only allows permanent deletion of records that have already been soft-deleted:
npm run dev:debugIf you want to sync data across machines, commit the SQLite database file:
git add data/points.sqlite
git commit -m "Update points data"- React + TypeScript + Vite project setup
- Tailwind CSS base styling
- Local SQLite persistence:
data/points.sqlite - Dashboard, fitness points, gaming deductions, rewards, and rules sections
- Add earned or deducted point records
- Add reward redemption records
- Mark records as deleted and view deleted items
- Permanently delete soft-deleted items in debug mode
- Weekly net points chart
The app has migrated from a single JSON file to data/points.sqlite:
- Faster writes: adding or deleting updates only the related rows instead of rewriting the full JSON file.
- Better querying: dates, categories, deletion state, indexes, and pagination can be added later.
- Safer data: SQLite transactions reduce the risk of file corruption during interrupted writes.
When the API starts for the first time, it automatically imports legacy data/points.json if that file exists and the database is empty. This repository now uses data/points.sqlite as the source of truth.