Platform Setup
Login And Database Readiness Roadmap
Prepare the website for real student accounts, parent access, teacher classes, premium requests and institutional dashboards without breaking the current static platform.
Phase 4.6 Backend Readiness
Safe Next Step Before Real Accounts
This page does not claim that live login, payment or cloud syncing already exists. It defines the professional structure needed before connecting a database. The current website remains fast and static while the future backend can be added cleanly.
Implementation Order
Backend Roadmap
Step 1
Role Model Finalisation
Define student, parent, teacher and academy admin roles before any database code is connected.
- Student: practice, mocks, reports, premium requests
- Parent: weekly reports and consultation requests
- Teacher: class assignments, remedial plans, homework review
- Academy admin: class overview and premium package inquiries
Risk control: Do not add login buttons until the role permissions are clear.
Step 2
Database Schema Preparation
Prepare clean database tables that match the existing local progress, reports and lead forms.
- Map localStorage progress keys to user_progress
- Map lead forms to inquiries
- Map assignments to class_assignments
- Map reports to report_snapshots
Risk control: Keep the existing export/reset tools so migration can be tested safely.
Step 3
Authentication Pilot
Add login only to a test branch first, then test student sign-up, parent view and teacher view separately.
- Email login or OTP login
- Role-based dashboard redirects
- Privacy notice before account creation
- Manual admin approval for teacher/academy roles
Risk control: Never deploy untested auth directly to production.
Step 4
Payment/Invoice Readiness
Connect premium pack requests to invoice/payment only after content packs, pricing and refund terms are final.
- Clear pack description
- No guarantee wording
- Manual confirmation before payment
- Receipt/invoice record
Risk control: Do not show fake checkout or unavailable payment buttons.
Database Tables To Prepare
| Table | Purpose | Linked Site Area |
|---|---|---|
| users | Stores account identity, role, contact channel and consent status. | Dashboard, Parent Guide, Teacher Toolkit |
| student_progress | Stores diagnostic, daily plan, practice, mock, revision and route-task signals by student. | Dashboard, Reports Center |
| class_groups | Stores teacher classes, academy batches and assigned test routes. | Teacher Toolkit, Class Remedial Plan |
| class_assignments | Stores assigned homework, due dates, completion status and follow-up notes. | Assignments, Homework Review |
| inquiries | Stores trial-class, parent consultation, academy demo and premium-pack requests. | Book Trial Class, Contact, Premium Study Packs |
| report_snapshots | Stores printable/copyable parent and teacher reports at weekly checkpoints. | Reports Center, Parent/Teacher Reports |
Safety Checklist
Rules Before Connecting Real Users
Privacy First
Do not store children’s progress online without clear consent and access rules.
Role Permissions
Parents should see only their child; teachers should see only assigned classes.
Content Ownership
Premium material should be original, reviewed and clearly described before payment.
Migration Test
Export local progress and test import on a private branch before live accounts.
Decision
Best Technical Direction
For the next real backend phase, use Supabase or Firebase only after finalising the exact data fields, privacy wording, user roles and payment process. Until then, keep using the current static site because it is fast, low-cost and stable.