Overview
Activity tracking and reporting system for two teenage daughters — tracking Study, Workout, and Rest. The system captures tamper-proof timestamps directly from a Notion app on each kid’s phone, syncs completed sessions into PostgreSQL every night, and delivers automated daily and weekly reports by SMS and email.
How It Works
- On the phone (Notion app) — each kid opens their own timer database, taps “New” (Created time auto-stamps), picks a Subject, studies, then checks “Done” when finished (Finished time auto-stamps). Total effort: 3 taps to start, 1 tap to finish.
- Nightly sync (n8n, midnight) — an n8n workflow SSHes into a Raspberry Pi, runs a Dockerized sync script that reads Notion for completed-but-unsynced sessions, writes each one to PostgreSQL, and marks the Notion rows as synced.
- Daily report (10pm) — an SMS with today’s totals per category, compared against a 7-day rolling average with trend arrows.
- Weekly report (Saturday 9pm) — an SMS plus an HTML email with weekly totals, a 4-week rolling average, and a full breakdown table per subject and per day.
Why Tamper-Proof Timestamps
The key design decision: Notion’s created_time and last_edited_time fields are system fields that cannot be manually edited. That means Created = when the kid actually tapped “New” and Finished = when they actually checked “Done” — the duration is real elapsed time, impossible to fake by entering an arbitrary time.
