Current behaviour
Learning path progress is currently stored in localStorage as an array of completed node IDs:
localStorage['progress_discord-python'] = ["login", "creating-the-bot", ...]
The locked/available/complete graph states work correctly, and "Mark as Complete" saves instantly to the browser with no login required.
Why this needs to change
- Progress is per-browser only — clearing browser data or switching devices loses all progress
- No way to see club-wide progress or completion rates
- No identity tied to progress, so there's nothing to show on a leaderboard or profile
Proposed solution
Replace localStorage with Firebase Auth (Google Sign-In) + Firestore:
UserProgress Firestore collection — doc ID {uid}_{pathId}, fields: uid, displayName, email, pathId, completedNodes[], lastActivityDate
- Sign-in button on the Learn page
- Progress persists across devices and browsers
Files to update
js/base/auth.js — already stubbed, just needs the Google Sign-In implementation
js/pages/learn.js — replace getLocalProgress() with Firestore fetch + add auth UI
js/pages/learn-path.js — replace getLocalProgress() with Firestore fetch
js/pages/learn-node.js — replace saveLocalProgress() with Firestore write
Firebase Console setup required
- Authentication → Sign-in method → enable Google
- Authentication → Settings → Authorized domains → add
cca-coding-club.github.io
- Add
firebase-auth-compat.js CDN script to the three learn HTML pages
Current behaviour
Learning path progress is currently stored in
localStorageas an array of completed node IDs:The locked/available/complete graph states work correctly, and "Mark as Complete" saves instantly to the browser with no login required.
Why this needs to change
Proposed solution
Replace
localStoragewith Firebase Auth (Google Sign-In) + Firestore:UserProgressFirestore collection — doc ID{uid}_{pathId}, fields:uid,displayName,email,pathId,completedNodes[],lastActivityDateFiles to update
js/base/auth.js— already stubbed, just needs the Google Sign-In implementationjs/pages/learn.js— replacegetLocalProgress()with Firestore fetch + add auth UIjs/pages/learn-path.js— replacegetLocalProgress()with Firestore fetchjs/pages/learn-node.js— replacesaveLocalProgress()with Firestore writeFirebase Console setup required
cca-coding-club.github.iofirebase-auth-compat.jsCDN script to the three learn HTML pages