How mohammadfaqeh/competition works
This is a static web application for running an annual Quran memorization competition. The main workflow is: administrators register or import participants and configure committees; the system assigns fair, non-repeating exam positions; committee chair and member assess independently; the chair compares and finalizes the score; administrators review and export results. It supports both offline, device-local operation and a shared Supabase mode with role-based access. Quran text and page imagery support the exam interface. The graph follows the README and sampled cloud/backup code; most application internals and SQL procedures were not sampled, so uncertain wiring is omitted.
Main entry points: app.js Competition Application · index.ts Scheduled Cloud Backup · cloud.js Cloud and RPC Layer · schema.sql Supabase Competition Data
Components 19
Access and State
- Mode and Login Gateway
app.js - Competition Application
app.js - Cloud and RPC Layer
cloud.js - Device Local State
- Supabase Competition Data
supabase/schema.sql
Competition Setup
- Participant Management
app.js - Participant Import
app.js - Committee Setup
app.js
Exam Workflow
- Position Draw
app.js - Quran and Line Data
data/quran-data.js - Mushaf Page Images
assets/quran-pages - Independent Assessment
app.js - Compare and Finalize
app.js
Results and Operations
- Emergency Manual Scores
app.js - Results and Export
app.js - Scheduled Cloud Backup
supabase/functions/auto-backup/index.ts
Other components
- Administrator
- Committee Chair / Member
- Email Delivery
Connections 23
- Administrator → Mode and Login Gateway: selects mode
- Committee Chair / Member → Mode and Login Gateway: signs in
- Mode and Login Gateway → Competition Application: opens
- Administrator → Participant Management: manages participants
- Participant Management → Participant Import: imports roster
- Administrator → Committee Setup: configures committees
- Participant Management → Competition Application: updates roster
- Committee Setup → Competition Application: provides assignments
- Competition Application → Cloud and RPC Layer: uses cloud mode
- Cloud and RPC Layer → Supabase Competition Data: reads and writes
- Competition Application → Device Local State: reads and writes offline
- Competition Application → Position Draw: requests position draw
- Position Draw → Quran and Line Data: uses verse layout
- Competition Application → Independent Assessment: starts exam
- Independent Assessment → Mushaf Page Images: displays pages
- Independent Assessment → Compare and Finalize: submits assessment
- Compare and Finalize → Results and Export: finalizes score
- Committee Chair / Member → Independent Assessment: records errors
- Administrator → Emergency Manual Scores: reviews requests
- Emergency Manual Scores → Results and Export: approves manual score
- Administrator → Results and Export: exports results
- Scheduled Cloud Backup → Supabase Competition Data: reads competition data
- Scheduled Cloud Backup → Email Delivery: sends backup