How gholsona171/policy-prep works
Policy Prep is an offline-capable promotion-exam study app. The learner loads policy material, studies and answers questions one policy at a time, and advances only after meeting the coverage, score, and repeat-miss gate. The app also provides reading, progress views, and optional online features. Source excerpts show policy content mirrored from Supabase as well as stored locally, while the README describes owner-loaded local packs and says there is no backend; the excerpts do not establish how local pack import works, so that link is omitted. Major UI behavior is consolidated under app.js because its source is partial.
Main entry points: app.js Study app · supa.js Supabase client · engine.js Session and gate engine · content-store.js Content cache
Components 15
Study workflow
- Study app
app.js - Session and gate engine
engine.js - Policy reading
app.js - PDF and narration
app.js - Progress and review
app.js
On-device data
- App state
app.js - Content cache
content-store.js
Online services
- Content and progress sync
sync.js - Supabase client
supa.js - Suggestions and account tools
app.js
Offline app shell
- Offline app shell
sw.js
Other components
- Learner
- Browser storage
- Supabase service
- Web browser
Connections 18
- Learner → Study app: uses
- Study app → Session and gate engine: builds sessions; checks gates
- Session and gate engine → Study app: returns session and gate results
- Study app → Policy reading: shows reading
- Study app → PDF and narration: opens documents; fetches audio
- Study app → Progress and review: renders progress and review
- Study app → App state: updates
- Study app → Content cache: reads and writes content
- Content cache → Browser storage: stores content in IndexedDB
- App state → Browser storage: persists app state
- Study app → Content and progress sync: starts sync
- Content and progress sync → Supabase client: reads and writes through
- Study app → Supabase client: calls account and document APIs
- Supabase client → Supabase service: authenticates; accesses data
- Study app → Suggestions and account tools: submits and reads suggestions
- Suggestions and account tools → Supabase client: uses database APIs
- Web browser → Offline app shell: runs
- Offline app shell → Web browser: caches app shell