- Introduction
- Pitch
- Hogwarts
- Live Demo
- MVP
- Roadmap
- Launch Sprint
- PRD
- Get Started
- Localhost
- Architecture
- Structure
- Pattern
- Page
- Layout
- Content
- Types
- Config
- Actions
- Queries
- Authorization
- Validation
- Form
- Table
- Detail
- Card
- Util
- Hooks
- List Params
- Views
- README.md
- ISSUE.md
- Technology Stack
- Database
- File
- CDN Assets
- Entry Points
- Dashboard
- Authentication
- Credentials
- OAuth
- Flow Diagrams
- Multi-Tenancy
- Offline
- Onboarding
- Onboarding Videos
- Add Values
- Admission
- Application
- Attendance
- Compliance
- Profile
- Exams
- Exam Wizard
- Timetable
- Classrooms
- Notifications
- Conference
- LMS (Lumos)
- Finance
- Fee Management
- Invoice
- Wallet
- Salary
- Payroll
- Timesheet
- Expenses
- Budget
- Receipt
- Accounts
- Banking
- Reports
- Dashboard
- Permissions
- Messages
- Integration Flow
- Provision
- AI Document Processing
- Document Intelligence
- Internationalization
- Translation
- Translation Guide
- Icons
- Docs Factory
- Inspiration
- Listings
- Teachers
- Students
- Catalog
- Library
- Contributing
- Code of conduct
- GitHub Workflow
- Database Seeds
- Database Safety
- Test Accounts
- Playwright
- Prettier
- Block Rebound
The seed creates 8 named test accounts plus ~3,100 bulk accounts in Demo Academy (subdomain demo). All accounts use password 1234. Named accounts are mapped to Harry Potter characters with Arabic names.
Named accounts
| Role | Arabic / English | Personal | School | |
|---|---|---|---|---|
dev@balqalam.com | DEVELOPER | سيفيروس سنيب / Severus Snape | severus-snape@hotmail.com | Platform (no schoolId) |
user@balqalam.com | USER | نيفيل لونغبوتوم / Neville Longbottom | — | None (onboarding) |
admin@balqalam.com | ADMIN | ألباس دمبلدور / Albus Dumbledore | albus-dumbledore@hotmail.com | Demo |
teacher@balqalam.com | TEACHER | مينيرفا ماكغونغال / Minerva McGonagall | minerva-mcgonagall@hotmail.com | Demo |
student@balqalam.com | STUDENT | هاري بوتر / Harry Potter | harry-potter@gmail.com | Demo |
parent@balqalam.com | GUARDIAN | جيمس بوتر / James Potter (father) | james-potter@gmail.com | Demo |
parent1@balqalam.com | GUARDIAN | ليلي بوتر / Lily Potter (mother) | lily-potter@gmail.com | Demo |
accountant@balqalam.com | ACCOUNTANT | فيليوس فليتويك / Filius Flitwick | filius-flitwick@hotmail.com | Demo |
staff@balqalam.com | STAFF | روبياس هاغريد / Rubeus Hagrid | rubeus-hagrid@hotmail.com | Demo |
Platform accounts
dev@balqalam.com — only DEVELOPER can access the SaaS dashboard at ed.databayt.org/en/dashboard (or localhost:3000/en/dashboard). Capabilities: view all schools, platform analytics, system config.
user@balqalam.com — fresh user for onboarding tests. Reset with pnpm db:reset-test-user.
Demo school accounts
Demo Academy: demo.databayt.org (production) or demo.localhost:3000 (local).
| Account | Notable data |
|---|---|
admin@ | Full school dashboard — manages teachers, students, classes, exams, finance, settings |
teacher@ | EMP0001, Languages dept (Arabic), qualifications + multi-level classes |
student@ | GR0001, Grade 10, 16 subjects, 2 guardians, ~60 attendance days, midterm + final + 2 quizzes per subject |
parent@ | Father, primary guardian for student@ |
parent1@ | Mother, secondary guardian for student@ |
accountant@ | Finance dashboard — fees, payments, invoices, reports |
staff@ | STAFF001, Keeper of Keys and Grounds — admin operations, non-teaching |
Harry's 16 Grade 10 subjects
Arabic, English, French, Mathematics, Physics, Chemistry, Biology, Computer Science, History, Geography, Civics, Islamic Studies, Quran, ICT, Art, PE.
Email pattern
Every account has two emails:
| Field | Example | Use |
|---|---|---|
| Login email | teacher@balqalam.com | Authentication |
| Personal email | firstname-lastname@domain.com | Profile and membership table |
Bulk accounts use generatePersonalEmail() → firstname-lastname{index}@{gmail|yahoo|hotmail|outlook}.com.
Access matrix
| Account | URL pattern | Behavior |
|---|---|---|
dev@ | localhost:3000/en/dashboard | SaaS platform dashboard |
user@ | localhost:3000 | Onboarding (Get Started) |
admin@ | demo.localhost:3000/en/s/demo | Full school dashboard |
teacher@ | demo.localhost:3000/en/s/demo | Teacher view (classes, students) |
student@ | demo.localhost:3000/en/s/demo | Student view (16 classes) |
parent@ | demo.localhost:3000/en/s/demo | Guardian view |
accountant@ | demo.localhost:3000/en/s/demo | Finance dashboard |
staff@ | demo.localhost:3000/en/s/demo | Staff operations |
Bulk accounts
Teachers (100)
teacher1@ … teacher99@balqalam.com. Distributed across 6 departments: Languages, Sciences, Mathematics, Social Studies, Islamic Studies, Technology. Each has qualifications, experience, and subject assignments.
Students (1,000)
student1@ … student999@balqalam.com, distributed across K-12.
| Section | Levels | Per level | Total |
|---|---|---|---|
| Kindergarten | KG1, KG2 | 50 | 100 |
| Elementary | Grades 1-6 | 80 | 480 |
| Middle | Grades 7-9 | 70 | 210 |
| High | Grades 10-12 | 60 | 180 |
Note: student@balqalam.com (Harry) is reassigned to Grade 10 after distribution (KG1 ends at 49, Grade 10 at 61).
Guardians (2,000)
parent1@ … parent1999@balqalam.com. Two guardians per student (father + mother), linked by index.
Simulation flows
| Flow | Steps |
|---|---|
| Student | Login student@ → 16 classes, exams, attendance, fee status |
| Parent | Login parent@ → child profile (Harry), grades, attendance, fee/payment |
| Teacher | Login teacher@ → assigned Arabic classes, roster, marks, attendance |
| Admin | Login admin@ → full dashboard, finance overview, school settings |
| Accountant | Login accountant@ → fees, payments, invoices, reports |
| Developer | Login dev@ on main domain → /en/dashboard platform analytics |
| Onboarding | Login user@ → Get Started → wizard → new school. Reset via pnpm db:reset-test-user |
Role protection
dev@balqalam.com has an immutable DEVELOPER role. Enforced at multiple layers:
| Layer | Mechanism | File |
|---|---|---|
| Seed scripts | PROTECTED_EMAILS exclusion in bulk updateMany | prisma/seeds/reset-test-user.ts |
| OAuth adapter | Returns role field to prevent JWT loss | src/lib/multi-tenant-prisma-adapter.ts |
| Claude rule | Path-scoped warning when touching auth/seed code | .claude/rules/accounts.md |
| PostToolUse hook | Detects unguarded bulk role changes | .claude/hooks/check-roles.sh |
const PROTECTED_EMAILS = ["dev@balqalam.com", "dev@databayt.org"]
await prisma.user.updateMany({
where: {
schoolId: { in: schoolIds },
email: { notIn: PROTECTED_EMAILS },
},
data: { role: "USER" },
})Resettable: user@balqalam.com (pnpm db:reset-test-user) and applicant@balqalam.com (pnpm db:reset-test-applicant).
Reset
pnpm db:reset-test-user # Fresh state for user@balqalam.com
pnpm db:seed # Full re-seed (idempotent, ~45-120 min)
pnpm prisma migrate reset && pnpm db:seed # Nuclear (manual only)
pnpm db:seed:single <name> # Single module — much fasterSeeds use upsert and are idempotent.
Known gaps
- No second school for cross-tenant testing.
- No OAuth test accounts (Google/Facebook).
- No suspended/inactive user.
- No multi-school user —
User.schoolIdis single-valued by design.