Family Hub

Project summary · Updated May 2026 · Current build v5.9 · All modules stable · Guide live

v5.9
Current build
5,070
Lines of code
403K
File size (bytes)
474
Functions
4
Modules live
0
Open bugs
1
Modules pending
20
Sheet tabs (DB)
Overview
Modules
Build history
Roadmap
Infrastructure
Backlog & notes
What is Family Hub

A single-file web app that helps the family manage chores, trades, tokens and rewards. Built entirely in HTML, CSS and JavaScript with Google Sheets as the database. Hosted on Cloudflare Pages behind a Zero Trust access policy. No backend server — all logic runs client-side via the Google Sheets API v4.

APP URL
app.nyefome.uk
Zero Trust protected · authenticated users only
GUIDE URL
guide.nyefome.uk
Publicly accessible · no login required
TEST URL
joshamoah.github.io/Fam-Hub-Test
v5.9 deployed · test data only
SOURCE
Private GitHub repo
Single file · no build step · no npm
DATABASE
Google Sheets · 20 tabs
All data · API v4 · client-side only
DNS & SECURITY
Cloudflare
Zero Trust on app.nyefome.uk · guide.nyefome.uk public
ROLES
Super Admin · Admin · Parent · Child
SA LOGIN
jamoahadmin (Super Admin)
Module status
👤
Module 1 — Identity & family management
Profiles, PINs, roles, families, join requests, PIN resets, Super Admin, archive family
Stable
Module 2 — Chore tracker
Zones, assignments, generation, confirmations, daily bar, W1–W5 pills, frequency badges, cross-zone guard, reporting.
Stable
Module 3 — Trades & tokens
Swaps, offloads, token economy, gifting, ledger, badges. Task bonus forfeit warning on trade confirm.
Stable
🏆
Module 4 — Rewards
Schemes, catalog, evaluation engine, streak milestones, task bonuses, monthly completion, ad-hoc rewards, child detail, template library. isSchemeWindowOpen fix in v5.9.
Stable
?
Module 5 — TBD
Not yet scoped. Possible directions: family calendar/scheduling layer, goal tracking, richer reporting and analytics.
Planned
Documentation & guide
Visual user guide — guide.nyefome.uk
Single HTML file hosted on Cloudflare Pages. Visual overview with CSS phone-frame mockups + tabbed detailed reference guide. Publicly accessible, no Zero Trust. Anonymised (Taylor family). Updated for v5.9.
Live
PDF user guide — family-hub-user-guide-v5.9.pdf
8-section detailed reference guide built with ReportLab. Covers all modules, roles, permissions, step-by-step flows and troubleshooting. Suitable for printing.
Complete
In-app help link — backlog item 6
? icon in app top nav linking to guide.nyefome.uk in a new tab. One-line addition per role dashboard. Deferred.
Backlog
Module 1 — Identity & family managementStable
Profile creation with avatar colour picker
4-digit PIN (hashed) · secure login · PIN reset flow
Child requests reset → admin generates temp PIN → child sets new PIN on next login
4 roles: Super Admin, Admin, Parent, Child
Dual admin rule (min 1, max 2) · cannot change own role · last-admin guard
Family creation · join via code · multi-family support
Role change notifications · join request approval/rejection
Settings screen — change PIN, view profile info
Super Admin dashboard — manage all families, SA profiles
Rename families · Archive/Unarchive families · PIN reset approvals across families
Archive family (SA only) — v5.6
Name confirmation gate → status=archived → members notified → archived screen on next login with single CTA. Unarchive restores and re-notifies.
Admin proactive PIN reset — v5.2
handleAdminGenPin() — admin generates temp PIN for any member without a request. PIN button in Manage Members shows for all members regardless of pending request.
Module 2 — Chore trackerStable
Zone management · assign chores to zones
Monthly zone assignments · rotation at month-end · 72h override window
Auto chore generation — daily / weekly / biweekly / monthly
Daily chore 7-segment weekly progress bar
Green=done · Amber=today pending · Red=lapsed · Grey=future
Weekly & biweekly chore consolidation — W1–W5 pill view
One row per chore. Green ✓ confirmed · Red ✗ lapsed · Amber → current active · Grey future. Biweekly: strikethrough skip weeks via parity detection.
Frequency badges on all chore types — daily · weekly · biweekly · monthly
Shown on child chore view and admin/parent family overview tiles (freqCounts + freq-chips, v5.2).
REG / AD-HOC / SWAP / OFFLOAD origin badges on every chore row
Mark done · parent confirmation · 48h auto-confirm · lapse detection
Confirm & Query stay on chore tracker screen — v5.5
handleConfirmChore, submitInlineQuery, submitQueryNote all call buildOverviewPendingTasks() — no longer navigate away to dashboard.
Assign task to child — parent/admin dashboard and chore tracker
+ Assign task to child button on both surfaces. Dashboard button returns to dashboard; chore tracker button returns to chore tracker.
Ad-hoc task assignment — parent creates for child with optional reward; child self-assigns
Reward chore banner — cycle progress, streak count, coloured completion squares
Family overview · reporting · weekly summaries (generated Sundays)
Reporting charts — stat cards, bar and line · period-based rates
Month open/close · zone rotation · month status tracking
Cross-zone chore guard — v5.7
Chores assigned to any zone are greyed out in the picker for other zones, showing the zone name. Prevents double-assignment across zones.
Module 3 — Trades & tokensStable v3.5
Swap trades — both children pay 1 token each
Offload trades — initiator pays, recipient accepts/declines free
Multi-step trade initiation flow with per-step back navigation & cancel
ME-03 four-condition operational guard · recipient token check · zero token enforcement
Parent approval queue · approve/reject · notifications to both children
Token system — 2/month · carry-forward cap 4 · bonus uncapped
Spend priority: monthly → carried → bonus. Quarterly reset Jan/Apr/Jul/Oct.
Gift tokens — parent gifts bonus tokens · uncapped · spent last
Token ledger — all events logged with type, amount, source, description
Dashboard banners — purple (action required) · teal (updates) · amber (parent/admin)
Task bonus forfeit warning on trade confirm
Amber warning modal names the reward that will be forfeited if the trade proceeds.
Chore origin badges — REG / SWAP / OFFLOAD / AD-HOC
Module 4 — RewardsStable
Reward catalog — admin creates reusable reward entries (type, label, value)
Reward scheme — one active per family per month. Edit always available.
Triggers: perfect week, threshold %, streak milestones, task bonuses, monthly completion. 72h window gates new scheme creation only.
Scheme form — child tiles, frequency grouping, task bonus store — v5.5
Child selector tiles with colour highlight. Chores grouped by frequency. window._taskBonusSelections persists across child switching.
Monthly completion % bonus — v5.5
evaluateMonthlyCompletion() runs at month close. Progress bar on child rewards screen.
Active scheme tile redesign — v5.5
Header: name | month | Edit badge. Sections: Global triggers · Streak milestones · Monthly completion · Task bonuses per child.
Scheme template library — v5.6
Save, browse, rename, delete, apply. Apply blocked when active scheme exists. Apply pre-populates form including task bonuses.
Ad-hoc reward flow — parent and child — v5.5
Parent creates task with optional reward. Child self-assigns triggers parent notification. adHocRewardId (column T) on ChoreLog.
Children this cycle — tappable cards → child rewards detail screen — v5.5
Evaluation engine — 5 trigger types
perfect_week, threshold, streak_primary, task_bonus, monthly_completion. Dedup via triggerType + {weekStart}.
Issue pending rewards — Mark issued ✓ workflow (admin/parent)
isSchemeWindowOpen fix — v5.9
72h window now runs from family.createdAt for new families, not cycle start. Fixes mid-cycle onboarding where window appeared closed on day 1.
v5.9
isSchemeWindowOpen fix. 72-hour reward scheme setup window now anchored to family.createdAt for new families, not the current cycle start. Fixes mid-cycle onboarding where the window appeared already closed on day 1 for a newly created family. No schema changes.
Bug fix
v5.8
Bug fixes. New family timing bypass: families created mid-cycle no longer inherit the existing cycle start as their effective window open time. Join request notification destination fix: notifications now route to the correct Admin in multi-family setups.
Bug fix
v5.7
Cross-zone chore guard. Chore picker now tracks chores assigned across all zones in the family. Chores assigned elsewhere appear greyed out with the zone name as label. Prevents the same chore being assigned to two zones. renderPickerList() builds assignedHere and assignedElsewhere sets.
Feature
v5.6
Tier 4 completion. Archive family (SA only): name-confirmation modal, status=archived, member notification, s-archived-family gate on login. Scheme template library: New scheme choice modal, s-scheme-templates screen, blocked banner when active scheme exists, rename, delete (soft), apply pre-populates form including task bonus selections. SH.FAM and SH.RS shorthand aliases.
Tier 4
v5.5
Passes 1–4 — Tier 4 main build. ChoreLog adHocRewardId column T. Trade forfeit warning. Ad-hoc notifications. evaluateMonthlyCompletion. Scheme form child tiles + frequency grouping + monthly completion + ad-hoc inline editing + scheme tile redesign + save as template. Child-created tasks section. Assign reward modal with returnTo routing. Monthly completion progress bar. Children this cycle tappable → child rewards detail screen.
v5.4
Dashboard tile avatar spacing (space-evenly), single Manage button, merged Members+JoinRequests into Manage screen.
v5.3
Trade controls (getLockedChoreIds, picker guards, resolution guards, handleMarkDone collapse+refund), "In active trade with [name]" badge, Rename family (Admin+SA), Family Management screen merged.
v5.2
Admin PIN reset proactive, frequency chips on overview, Mark Issued redesign, PIN modal, Gift tokens stepper, parent rewards earned section, trade notification dismiss fix.
v5.0–5.1
URL auto-detection (Fam-Hub-Test vs Fam-Hub), ENV-aware SHEET_ID + SYSTEM_KEY, test banner. Q0 label fix, colour scheme fixes (amber primary #C47F17/#FAEEDA/#633806).
v4.9
Bug fix release. I5-04 notification dismiss. BF-03/04 task bonus dropdowns pre-populated on edit. P3-03b threshold triggerDetail. P3-05b streak milestone rewardIds. Reporting chart enhancements.
M4 resolved
v4.8
Chore pill colour scheme locked. getMonthWeekStarts(ym) calendar-derived W1–W5. Biweekly parity detection. Frequency badges. Signed off.
v4.7
Weekly/biweekly chore consolidation (Option B). buildConsolidatedChoreRow() — one row per chore with W1–W5 pills. Active scheme card: scheme name replaces cycle date heading.
v4.3–4.6
Module 4 build. Scheme name field. Task bonus per-child avatar cards. Reward notification section. Streak milestone dynamic row builder. Evaluation engine stable: 4 trigger types. 5-sheet reward schema locked.
v3.8
Dashboard redesign signed off. Test environment deployed. Module 4 planning session.
v3.5
Module 3 sign-off. Amber trade banner restored. updateChoreLogProfile refactored. Self-badge guard added.
v3.0–3.4
Module 3 — swap and offload flows, token economy, ledger, notifications, gift tokens, parent approval queue, ME-03 guard, dashboard banners, chore origin badges. v3.4 critical fix: afterPinVerified discarding 9 of 15 sheet reads.
v2.x
Module 2 — chore tracker, zones, assignments, weekly summaries, monthly reporting, ad-hoc tasks, daily progress bar.
v1.x
Module 1 — profiles, families, PIN auth, 4 roles, join requests, PIN resets, multi-family support.

Completed — all tiers

isSchemeWindowOpen fix — new family timing
72h window anchored to family.createdAt for new families. Mid-cycle onboarding now works correctly.
v5.9
Join request notification routing fix
Notifications now route to the correct Admin in multi-family setups.
v5.8
Cross-zone chore guard
Chores assigned to Zone A are greyed in Zone B's picker with the zone name. Same chore cannot be double-assigned.
v5.7
Archive family (SA only) & scheme template library
Name confirmation gate, archived screen, unarchive. Template save, browse, rename, delete, apply.
v5.6
Tier 4 main build — rewards module complete
All 5 trigger types, scheme form redesign, monthly completion, ad-hoc flows, child rewards detail screen.
v5.5

Next — Module 5 scoping

1
Module 5 — TBD
Not yet scoped. Possible directions: family calendar/scheduling layer, goal tracking, richer reporting and analytics.

Previously resolved backlog items

Frequency badges — admin/parent family overview
freqCounts + freq-chips added to admin/parent overview tiles. Matches child view.
v5.2
Admin proactive PIN reset UI
handleAdminGenPin() — admin generates temp PIN for any member without a request. PIN button visible for all members in Manage Members.
v5.2
AE-02 App colour scheme review
Amber primary #C47F17/#FAEEDA/#633806, gold/carried/purple distinct. Locked and signed off.
v5.0/5.1
Q0 quarterly chart label fix
Q0 2026 now correctly reads Q4 2025. Fix applied to getHistoricalRates.
v5.6

Open backlog

1
Module 5 — TBD
Not yet scoped. Possible directions: family calendar/scheduling layer, goal tracking, richer reporting and analytics.
Planned
6
In-app help link — ? icon in top nav
Add ? icon to top nav bar across all role dashboards. Opens guide.nyefome.uk in a new tab. One-line addition per screen.
Backlog

Hosting & deployment

App — app.nyefome.uk
Hosted on Cloudflare Pages. Protected by Cloudflare Zero Trust Access. Authenticated users only. Domain managed via Cloudflare DNS (CNAME to Pages project). SSL auto-provisioned.
Live
Guide — guide.nyefome.uk
Separate Cloudflare Pages project (family-hub-guide). Single HTML file upload. Publicly accessible — explicitly excluded from Zero Trust policy (Access application scoped to app.nyefome.uk only, not wildcard). CNAME auto-created by Cloudflare on custom domain setup.
Live
Test environment — joshamoah.github.io/Fam-Hub-Test
GitHub Pages. Public. Test data only — not live. Test banner shown on all screens. v5.9 deployed.
Test

Security

Cloudflare Zero Trust
Access application scoped to app.nyefome.uk exactly. Wildcard not used. guide.nyefome.uk is intentionally public and outside the policy. Zero Trust sits in front of the Cloudflare Pages project for the app.
PIN authentication (in-app)
4-digit PIN hashed before storage. Temp PINs generated by Admin for resets. Child sets permanent PIN on first login with temp PIN. No email or password required.
Source code
Private GitHub repository. Single HTML file. No build pipeline — deploy by uploading file to Cloudflare Pages.

Updating the guide

How to update guide.nyefome.uk
1. Download updated index.html from Claude · 2. Go to Cloudflare dash → Workers & Pages → family-hub-guide · 3. Deployments → Upload assets · 4. Drop new index.html → Deploy. Live in seconds, same URL.
Future: connect to Git repo for auto-deploy
Currently manual upload. Can be switched to Git-connected deployment so a push to a branch auto-deploys the guide. Not needed while updates are infrequent.

Database

Google Sheets · 20 tabs
All app data. Read/write via Google Sheets API v4. Client-side only — no backend server.
ChoreLog — 20 columns A:T
Column T (r[19]) = adHocRewardId. Values: '' unreviewed · 'none' reviewed/no reward · [rewardId] assigned.
RewardSchemes — status values
'draft' · 'active' · 'template' · 'deleted'. r[5]=status · r[7]=globalRules JSON · r[8]=taskBonuses JSON.
Families — status values
'active' · 'archived'. r[3]=status.

Key data model notes

ChoreLog — 20 columns A:T
Column T (r[19]) = adHocRewardId. Values: '' unreviewed · 'none' reviewed/no reward · [rewardId] assigned.
RewardSchemes — status values
'draft' · 'active' · 'template' · 'deleted'. r[5]=status · r[7]=globalRules JSON · r[8]=taskBonuses JSON.
Families — status values
'active' · 'archived'. r[3]=status.
window state — scheme form
_taskBonusSelections (keyed choreId|profileId) · _taskBonusChildIdx · _rewardSchemeReturnTarget · _rewardDetailProfileId/Name/Colour · _adhocModalReturnTo ('scheme-form' | 'child-detail' | 'rewards').
isSchemeWindowOpen — v5.9 revised
For new families: window opens from family.createdAt (not cycle start). For existing families: window opens from zone rotation date. 72h in both cases.

No outstanding bugs

All known bugs resolved as of v5.9
isSchemeWindowOpen fix (v5.9) · join request routing fix (v5.8) · cross-zone guard (v5.7) · Q0 chart label (v5.6) · AE-02 colour scheme (v5.0/5.1) · admin proactive PIN reset (v5.2) · frequency badges (v5.2).

Resolved backlog items

2. Chore tile frequency badges — admin/parent family overview
freqCounts + freq-chips added to admin/parent overview tiles. Resolved v5.2.
v5.2
3. Admin proactive PIN reset UI
handleAdminGenPin() added. Admin can generate temp PIN for any member without a request. Resolved v5.2.
v5.2
4. AE-02 App colour scheme review
Amber #C47F17/#FAEEDA/#633806, gold/carried/purple distinct. Locked and signed off. Resolved v5.0/5.1.
v5.0/5.1
5. Q0 quarterly chart label fix
Q0 2026 now correctly reads Q4 2025. 1-line fix to getHistoricalRates. Resolved v5.6.
v5.6

Open backlog — deferred features

1. Module 5 — TBD (scoping session next)
6. In-app help link — ? icon in top nav linking to guide.nyefome.uk

Reference files

family-hub-v5.9.html — current build
isSchemeWindowOpen fix for new family mid-cycle onboarding. All backlog resolved.
family-hub-guide.html — guide.nyefome.uk source
Combined visual + tabbed detailed guide. Anonymised (Taylor family). Hosted on Cloudflare Pages.
family-hub-user-guide-v5.9.pdf — PDF reference guide
8-section detailed reference. Built with ReportLab. Covers all modules, roles, flows, troubleshooting.
family-hub-v5.7.html — previous build
family-hub-project-summary_5.9.html — this document