Admin Capability Map
QuranFlow Admin Backend Reference
Purpose: Source of truth for the QuranFlow admin backend - what exists, what it does, and how it's structured. Audience: Product Manager, Admins, Developers Last Updated: December 2025
Quick Reference
User Types
| Type | Code | Description |
|---|---|---|
| Admin | 1 | Full backend access |
| Teaching Assistant (TA) | 2 | Instructor role, reviews submissions |
| Student | 3 | App user, consumes content |
| Failed Signup | 4 | Incomplete registration |
| Admin (View Only) | 5 | Read-only backend access |
Student Levels
| Level | Code |
|---|---|
| Level 0 (Starter) | 1 |
| Level 1 | 2 |
| Level 2 | 3 |
| Level 3 | 4 |
| Level 4 | 6 |
| Year 2 | 5 |
Key Status Values
| Status | Code | Context |
|---|---|---|
| Enrolled | 1 | Student semester status |
| Pass | 2 | Student semester status |
| Fail | 0 | Student semester status |
| Under Review | 0 | Submission status |
| Reviewed | 1 | Submission status |
Data Structure Summary
How Data Connects
┌─────────────┐
│ SEMESTER │
│ (container)│
└──────┬──────┘
│
┌──────────────────────┼──────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ CONTENT │ │ENROLLMENT │ │ GROUPS │
│ │ │(user_link_│ │ │
│• Lessons │ │level_tag) │ │• Members │
│• Assess- │ │ │ │• Appoint- │
│ ments │ │ User + │ │ ments │
│• Resources│ │ Semester +│ │ │
│• Quizzes │ │ Level │ └───────────┘
└───────────┘ └─────┬─────┘
│
┌──────────┴──────────┐
│ │
▼ ▼
┌───────────┐ ┌───────────┐
│ USER │ │SUBSCRIPTION│
│ │ │ │
│• Profile │ │• Stripe │
│• Type │ │• Status │
└───────────┘ └───────────┘
Key Tables (Plain English)
| Table | What it stores |
|---|---|
| users | All accounts (students, TAs, admins) |
| user_profile | Name, contact, gender, age |
| semester | Enrollment periods with dates |
| user_link_level_tag | Enrollment records - connects a user to a semester at a specific level |
| lessonsnew / lessonsvideos | Video lessons and their videos |
| assessment | Recording prompts students respond to |
| student_submitted_assessment | Student audio submissions |
| group_name / group_members | Student groups and their members |
| appointments | Scheduled TA sessions |
| subscriptions | Payment subscriptions |
See Appendix A for full schema details.
Navigation Structure
DASHBOARD /site/index
SEMESTERS /semester/index
PROGRAM
├── Video Lessons /lessons-new/index
├── Submissions /assessments/index
├── Resources /resources/index
├── Live Sessions /live-sessions/index
├── Recordings /recordings/index
├── Tutorials /tutorials/index
├── MCQ Questions /mcqquestion/index
└── Quizzes /quiz/index
PEOPLE
├── Students /users/index?type=3
├── Teaching Assistants /users/index?type=2
├── Admins /users/index?type=1
└── Students Management /users/student-management
REPORTS
├── Student Report /reports/index?type=3
├── TA Reports /reports/index?type=2
├── Payments /payments/index
├── Promoted Students /reports/promoted-student
├── Failed Sign Ups /reports/failed-signups
├── Referrals /reports/referrals
└── Specific Reports /reports/specific-reports
APPOINTMENTS
├── Upcoming Appointments /appointments/index
├── TA Schedules /appointments/ta-schedule
└── Holidays /appointments/public-holidays
SETTINGS
├── Notifications /site/send-notification
├── Tags Management /tags/index
├── Payment Plans /payment-plans/index
├── Coupons /coupons/index
├── Settings /settings/index
├── Operations /operations/index
├── Email Management /emails/index
├── Welcome Package /semester/index-upload-file
├── Teacher Assignment Criteria /teacher-assignment-criteria/index
└── Logs /logs/index
Screen Reference
DASHBOARD
Path: /site/index
Purpose: At-a-glance view of system health and daily operations
What you can do:
- View weekly submission chart
- Add/view daily notes
- See TA statistics
- Send live session notifications
Affects: Nothing directly - read-only overview
SEMESTERS
Path: /semester/index
Purpose: Define enrollment periods that contain all content and student progress
What you can do:
- Create new semester (auto-creates default resources and tags)
- Edit semester dates and settings
- Delete semester (blocked if students enrolled)
- Manage welcome package resources per semester
Key states:
registration_status = 1→ Registration openis_current = 1→ Active semester for content
Affects: Students, all content visibility
PROGRAM
Video Lessons
Path: /lessons-new/index
Purpose: Manage the core video curriculum students watch
What you can do:
- Create/edit/delete video lessons
- Attach multiple videos per lesson
- Auto-extract video thumbnails
- Bulk delete
Affects: What students see in app curriculum
Submissions (Assessments)
Path: /assessments/index
Purpose: Define what students submit audio recordings for
What you can do:
- Create/edit/delete assessments (recording prompts)
- Attach questions and audio files
- View assessment details
Affects: What students submit recordings for, TA review queue
Resources
Path: /resources/index
Purpose: Provide downloadable materials for each level
What you can do:
- Create/edit/delete downloadable resources (PDFs, docs)
- Assign to specific levels within a semester
Affects: What students can download
Live Sessions
Path: /live-sessions/index
Purpose: Schedule group learning sessions
What you can do:
- Create live sessions (auto-creates one per level)
- Edit session details and dates
- Delete sessions
Affects: Student calendar, notifications
Recordings
Path: /recordings/index
Purpose: Store recorded live session replays
What you can do:
- Create/edit/delete session recordings
- Filter by level and type
Affects: Recorded session library for students
Tutorials
Path: /tutorials/index
Purpose: Provide supplementary PDF-based learning materials
What you can do:
- Create/edit/delete tutorials with PDF attachments
- Assign to levels
Affects: Tutorial section in app
MCQ Questions
Path: /mcqquestion/index
Purpose: Build the question bank for quizzes
What you can do:
- Create/edit/delete multiple choice questions
- Set correct answers and options
Affects: Quiz question bank
Quizzes
Path: /quiz/index
Purpose: Create assessments from the question bank
What you can do:
- Create/edit/delete quizzes
- Link MCQ questions to quizzes
- Transfer quizzes between semesters
Affects: Student quiz experience
PEOPLE
Students
Path: /users/index?type=3
Purpose: Manage individual student accounts and progress
What you can do:
- View all students with performance stats
- Create new student
- Edit student profile, level, semester, tags
- Deactivate student
- Reset student progress (lessons, assessments)
- Revert progress reset
- Reset to Level 1
- Set/revert temporary password
- Promote student to next level
- Revert promotion
- Resend registration email
- Register Level 4 student for Year 2
Key business logic:
- Passing marks = 3.5
- Level 4 students can be promoted to Year 2
- Password is auto-generated (4 chars, lowercase)
Teaching Assistants
Path: /users/index?type=2
Purpose: Manage TA accounts and view their assignments
What you can do:
- View all TAs
- Create/edit/delete TA accounts
- View assigned students
Admins
Path: /users/index?type=1
Purpose: Manage who has backend access
What you can do:
- View all admin users
- Create/edit/delete admin accounts
- Set view-only permission
Students Management
Path: /users/student-management
Purpose: Miscellaneous admin tools (grab-bag page)
Note: Despite the name, this is NOT a student management screen. It's a collection of misc tools that don't fit elsewhere.
Contains:
| Tool | What it does | Path |
|---|---|---|
| Level 0 promotion | Promote students who didn't submit assessments | /user-link-level-tag/level-zero-not-submitted-assesment-students-promotion |
| Live Session Holidays | Link to holiday management | /live-session-holidays/index |
| Support Links Management | Manage help/FAQ links | /support-links/index |
REPORTS
Student Report
Path: /reports/index?type=3
Purpose: Track student performance metrics
What you can do:
- View student performance metrics
- Export selected students to CSV
- Export full student report
TA Reports
Path: /reports/index?type=2
Purpose: Track TA performance and their students
What you can do:
- View TA performance and their students
- Export TA data to CSV
- Weekly submissions by teacher
Payments
Path: /payments/index
Purpose: View payment transaction history
What you can do:
- View payment history
Promoted Students
Path: /reports/promoted-student
Purpose: Track level advancement
What you can do:
- View students who were promoted
- View repeat signup students
Failed Sign Ups
Path: /reports/failed-signups
Purpose: Track incomplete registrations
What you can do:
- View incomplete registrations
Referrals
Path: /reports/referrals
Purpose: Track referral program performance
What you can do:
- View referral data
Specific Reports
Path: /reports/specific-reports
Purpose: Run custom queries and edge-case reports
What you can do:
- Custom report generator
- Active students not in active semester
- Repeat students with email status
APPOINTMENTS
Upcoming Appointments
Path: /appointments/index
Purpose: View and manage scheduled 1:1 sessions
What you can do:
- View all scheduled appointments
- Create appointment for a group
- Add single student appointment
- Cancel appointments
Affects: Student-TA sessions
TA Schedules
Path: /appointments/ta-schedule
Purpose: Configure when TAs are available for booking
What you can do:
- Configure TA weekly availability
- Set timezone for TA
- Add/remove appointment slots
- Manage TA holidays
Affects: What slots students can book
Holidays
Path: /appointments/public-holidays
Purpose: Define system-wide non-working days
What you can do:
- Manage public holidays (system-wide)
- Remove holidays
Affects: Appointment availability for all TAs
SETTINGS
Notifications
Path: /site/send-notification
Purpose: Send broadcast push notifications
What you can do:
- Send push notifications to all users
Affects: All app users
Tags Management
Path: /tags/index
Purpose: Create tags for user segmentation and marketing
What you can do:
- Create/edit/delete tags
- Syncs with InfusionSoft
Affects: User segmentation, marketing automation
Payment Plans
Path: /payment-plans/index
Purpose: Define pricing options at checkout
What you can do:
- Create/edit/delete payment plans
Affects: Checkout options for new students
Coupons
Path: /coupons/index
Purpose: Manage discount codes
What you can do:
- Create/edit/delete coupons
- Syncs with Stripe
Affects: Discounts at checkout
Settings
Path: /settings/index
Purpose: General app configuration
What you can do:
- General app settings
Operations
Path: /operations/index
Purpose: Bulk data imports and one-time migrations
What you can do:
- Bulk promote Year 1 to Year 2 (CSV upload)
- Bulk user registration (CSV upload)
- Upload backend resources
- Data migration between databases
Affects: Mass user changes
Email Management
Path: /emails/index
Purpose: Configure automated email templates
What you can do:
- Create/edit/delete email templates
- Preview and test send emails
Affects: All automated emails
Welcome Package
Path: /semester/index-upload-file
Purpose: Define materials for new student onboarding
What you can do:
- Manage resources for new student welcome package
Affects: New student experience
Teacher Assignment Criteria
Path: /teacher-assignment-criteria/index
Purpose: Define rules for auto-assigning students to TAs
What you can do:
- Define rules for auto-assigning students to TAs
Affects: Student-TA matching
Logs
Path: /logs/index
Purpose: View system activity logs
What you can do:
- View system logs
Support Links
Path: /support-links/index
Access: Via Students Management page (not in main nav)
Purpose: Manage help/FAQ links shown to students
What you can do:
- Create/edit/delete help/support links
- Links appear in app for students
Affects: Help resources visible to students
Key Business Rules
Student Lifecycle
- Semester Protection: Cannot delete semester if students are enrolled
- Level Progression: Students progress 0 → 1 → 2 → 3 → 4 → Year 2
- Year 2 Enrollment: Level 4 students must explicitly sign up for Year 2
- Passing Threshold: 3.5 marks required to pass
Content & Submissions
- Submission Flow: Under Review (0) → Reviewed (1) by TA
- Content Scoping: All content is scoped to a semester
Semesters
- Registration vs Active: Can be different - registration opens before semester becomes active
- Active Semester:
is_current = 1determines which semester content is served from
Automation
- TA Assignment: Can be automated based on criteria rules
- Password Generation: Auto-generated, 4 characters, lowercase only
External Integrations
| Feature | External Service | Notes |
|---|---|---|
| Tags | InfusionSoft | Marketing automation sync |
| Coupons | Stripe | Discount codes |
| Payments | Stripe | Payment processing |
| Subscriptions | Stripe / Goodwill | Recurring billing |
Decision Guide: Where Should Feature X Go?
When deciding where a new feature belongs, ask:
- Is it content students consume? → PROGRAM section
- Is it about managing a user type? → PEOPLE section
- Is it time-based/scheduled? → APPOINTMENTS or Live Sessions
- Is it a one-time bulk action? → Operations (under Settings)
- Is it a setting that affects system behavior? → Appropriate Settings subsection
- Is it read-only data/metrics? → REPORTS section
If none fit cleanly → Document it and discuss. May indicate need for reorganization.
Appendix A: Data Schema Details
Core Tables
users
| Field | Type | Notes |
|---|---|---|
| user_id | int | Primary key |
| username | string | |
| string | ||
| user_type | int | 1=admin, 2=TA, 3=student, 4=failed signup, 5=view-only admin |
| user_activation_status | int | 0=blocked, 1=active |
| stripe_customer_id | string | Stripe integration |
| timezone | string | User's timezone |
| temp_pass | string | Temporary password |
| gcm_regid | string | Push notification token |
| device_type | int | Mobile device type |
user_profile
| Field | Type | Notes |
|---|---|---|
| user_id | int | Foreign key to users |
| first_name | string | |
| last_name | string | |
| gender | string | |
| age | int | |
| contact | string | Phone number |
| contact_dialcode | string | Country code |
| profile_picture | string | Image path |
semester
| Field | Type | Notes |
|---|---|---|
| semester_id | int | Primary key |
| name | string | e.g., "Spring 2025" |
| start_date | date | |
| end_date | date | |
| registration_status | int | 1=registration open |
| is_current | int | 1=active semester |
| content_availability_date | date | When content becomes available |
| registration_start_date | date | When registration opens |
user_link_level_tag (Enrollment Records)
| Field | Type | Notes |
|---|---|---|
| user_link_level_tag_id | int | Primary key |
| user_id | int | Foreign key to users |
| semester_id | int | Foreign key to semester |
| level_tag_id | int | Foreign key to level_tag |
| user_semester_status | int | 0=fail, 1=enrolled, 2=pass |
| elective_id | int | Year 2 elective choice |
| is_core_enrollment | int | Core vs elective enrollment |
level_tag
| Field | Type | Notes |
|---|---|---|
| level_tag_id | int | Primary key |
| name | string | "Level 0", "Level 1", etc. |
lessonsnew
| Field | Type | Notes |
|---|---|---|
| id | int | Primary key |
| status | int | 10=active, 0=inactive |
| created_at | datetime | |
| updated_at | datetime |
lessonsvideos
| Field | Type | Notes |
|---|---|---|
| id | int | Primary key |
| lesson_id | int | Foreign key to lessonsnew |
| video_url | string | Video source URL |
| thumbnail | string | Thumbnail image |
| title | string | |
| description | string |
assessment
| Field | Type | Notes |
|---|---|---|
| assessment_id | int | Primary key |
| title | string | |
| description | string |
student_submitted_assessment
| Field | Type | Notes |
|---|---|---|
| student_submitted_assessment_id | int | Primary key |
| assessment_id | int | Foreign key to assessment |
| owner_id | int | Student user_id |
| assessment_status | int | 0=under review, 1=reviewed |
| assessment_week | int | Week number |
| level_tag_id | int | Student's level at submission |
| reviewed_by | int | TA user_id |
| reviewed_date | datetime | |
| rejection_reason | string | If rejected |
| user_link_level_tag_id | int | Foreign key to enrollment |
group_name (Student Groups)
| Field | Type | Notes |
|---|---|---|
| id | int | Primary key |
| name | string | Group name |
| teacher_id | int | Assigned TA user_id |
| created_by | int | Admin user_id |
| prevent_delete | int | Protection flag |
group_members
| Field | Type | Notes |
|---|---|---|
| id | int | Primary key |
| group_id | int | Foreign key to group_name |
| user_link_level_tag_id | int | Foreign key to enrollment |
appointments
| Field | Type | Notes |
|---|---|---|
| id | int | Primary key |
| group_id | int | Foreign key to group_name |
| ta_id | int | TA user_id |
| student_id | int | Student enrollment id |
| apt_time | datetime | Appointment time |
| re_schedule | int | Reschedule flag |
| new_apt_time | datetime | If rescheduled |
subscriptions
| Field | Type | Notes |
|---|---|---|
| id | int | Primary key |
| stripeSubscriptionId | string | Stripe subscription ID |
| user_link_level_tag_id | int | Foreign key to enrollment |
| payment_plan_id | int | Foreign key to payment plan |
| coupon_id | int | Applied coupon |
| status | int | Subscription status |
| start_date | date | |
| end_date | date | |
| next_billing_date | date | |
| cycles | int | Total billing cycles |
| cycles_remaining | int | Remaining cycles |
support_links (New - Dec 2025)
| Field | Type | Notes |
|---|---|---|
| id | int | Primary key |
| title | string | Link title |
| url | string | Link URL |
| order | int | Display order |
Appendix B: Controller Reference
Backend Controllers
| Controller | Path Prefix | Primary Actions |
|---|---|---|
| SiteController | /site |
index, login, logout, send-notification, profile |
| SemesterController | /semester |
index, create, update, delete, index-upload-file |
| LessonsNewController | /lessons-new |
index, create, update, delete |
| AssessmentsController | /assessments |
index, create, update, delete, view |
| ResourcesController | /resources |
index, create, update, delete |
| LiveSessionsController | /live-sessions |
index, create, update, delete |
| RecordingsController | /recordings |
index, create, update, delete |
| TutorialsController | /tutorials |
index, create, update, delete |
| McqquestionController | /mcqquestion |
index, create, update, delete |
| QuizController | /quiz |
index, create, update, delete, transfer-all |
| UsersController | /users |
index, create, update, delete, student-management, student-subscription |
| StudentGroupController | /student-group |
index, view, create, update, add-students, transfer-student |
| ReportsController | /reports |
index, view, promoted-student, failed-signups, referrals, specific-reports |
| AppointmentsController | /appointments |
index, create, delete, ta-schedule, public-holidays |
| TagsController | /tags |
index, create, update, delete |
| PaymentPlansController | /payment-plans |
index, create, update, delete |
| CouponsController | /coupons |
index, create, update, delete |
| SettingsController | /settings |
index |
| OperationsController | /operations |
index, year-two-promotion, user-registration, data-migration |
| EmailsController | /emails |
index, create, update, delete, review |
| TeacherAssignmentCriteriaController | /teacher-assignment-criteria |
index, create, update, delete |
| LogsController | /logs |
index |
| SupportLinksController | /support-links |
index, create, update, delete |
| PaymentsController | /payments |
index |