Nexus Class
An in-development subscription platform giving each teacher or center its own workspace for students, sessions and payments, with a Windows staff app and a mobile teacher app
- Role
- Full-stack engineering & UI design
- Timeline
- 2026
- Platforms
- Windows · Android · iOS · Web · Server
- Multi-Tenant
- isolated tenant workspaces
- Web + App
- Web, mobile & Windows apps
- باقات اشتراك
- plans, attendance & billing
- TEMM Nexus
- backend migration control
Overview
Business problem & context
Teachers and learning centres piece together disconnected tools for attendance, assessments and billing. Scaling to a multi-tenant SaaS introduces the risk of cross-tenant data leakage across students and financials
System Architecture
System layers & components
A multi-tenant SaaS platform: a Laravel 12 API with PostgreSQL and Redis, paired with a Flutter Windows staff desktop app and a Flutter teacher mobile app sharing seven internal Dart packages, deployed via Docker and Caddy
Client Apps · Flutter Workspace
Windows staff desktop app + teacher mobile app
- apps/staff_windows (Desktop)
- apps/teacher_mobile (Android/iOS)
- 7 Shared Dart Packages
Shared Dart Packages Layer
Shared domain, networking, offline cache & design system
- api_client
- auth
- domain_models
- local_cache
- realtime
- design_system
- shared_ui
SaaS Backend · Laravel 12 + PostgreSQL
Tenant isolation, billing, attendance & assessments
- Laravel 12 API (48 Migrations)
- Tenant Security Middleware
- PostgreSQL + Bootstrap Roles
- Redis Queues + Caddy Reverse Proxy
Data Model
Database schema & core tables
48 migrations covering tenants, commercial billing, student cohorts, attendance logs, assessments and staff RBAC
| Table | Role in the system |
|---|---|
tenants / subscriptions | Tenant record, commercial plan and quota limits |
students / cohorts | Tenant-scoped student rosters and study groups |
attendance_sessions / records | Attendance sessions and per-student check-in records |
assessments / grades | Assessments, grading sheets and progress reports |
Implementation
Key technical decisions
Seven shared Dart packages across Windows & mobile
Extracted networking, auth, domain models, local caching, realtime streams and UI tokens into seven modular Dart packages consumed by both the Windows staff app and the teacher mobile app
Strict multi-tenant scoping across API and database
Every API request passes through tenant and subscription middleware backed by explicit PostgreSQL bootstrap roles to prevent cross-tenant queries
Reproducible Docker + Caddy deployment with 65 test files
Production templates (`docker-compose.production.yml`, Caddy, PostgreSQL init scripts) verified by GitHub Actions running PHPUnit and Laravel Pint across 65 test files
Security
Security & access control
- Mandatory tenant scoping in Laravel middleware prevents cross-tenant IDOR
- Release handoff discipline excludes placeholder endpoints and signing keys from version control
- 65 automated test files covering billing, attendance, assessments and tenant isolation
Code Highlight
Nexus Class modular workspace layout
nexus-class-platform/
├── backend/ # Laravel 12 API · 48 migrations · PHPUnit + Pint
├── apps/
│ ├── staff_windows/ # Flutter Windows desktop app for centre staff
│ └── teacher_mobile/ # Flutter Android/iOS app for teachers
├── packages/ # 7 shared Dart packages:
│ ├── api_client/ ├── auth/ ├── domain_models/
│ ├── local_cache/ ├── realtime/ ├── design_system/ └── shared_ui/
└── infrastructure/ # Docker Compose + Caddy + PostgreSQL bootstrap roles Product Screens
System screenshots
Web & desktop interfaces
Mobile app screens
Summary
Outcome & status
Reached release candidate `0.5.1-rc.2` with 48 migrations, 65 test files and seven shared Dart packages