🎯 Vision & Problem Statement
VVG Academy App is a comprehensive, AI-powered, multi-tenant Software-as-a-Service (SaaS) platform purpose-built for educational institutes — language schools, professional training centres, vocational academies, and corporate learning providers.
The Core Problem
Institutes currently operate with 5–7 disconnected tools. Students are managed in one system, teachers via spreadsheets, finance in separate software, and communication scattered across WhatsApp groups and email chains. The result:
- Revenue leakage — manual commission tracking creates disputes and errors
- Zero P&L visibility — owners cannot see real-time profit per batch
- Poor student experience — no single source for schedule, materials, and payments
- Teacher dissatisfaction — no transparent payment status or professional tools
- Compliance failures — accreditation tracked on paper, expiry dates missed
- Inability to scale — manual processes break down as the institute grows
💡 The Solution
One Unified Platform. Every Stakeholder. One Truth. A single login, role-detected, launches the right workspace. All 6 stakeholder roles share the same financial backbone, notification system, communication layer, and AI features.
Four Core Pillars
- Unified Dashboards — 6 role-specific workspaces, 55 panels total, real-time data, 3-second load
- Financial Intelligence — Real-time P&L per batch, automated invoicing, daily profit WhatsApp digest
- AI-Powered Automation — 3 practical AI features active at launch (AI-1, AI-2, AI-12)
- Omni-Channel Communication — Email, WhatsApp Baileys.js, In-App — 18 trigger events, 60-second delivery
🏗️ Technical Architecture
| Layer | Technology / Approach |
|---|---|
| Hosting | Vercel — global edge CDN, auto-scaling, zero-downtime deploys |
| Multi-Tenancy | Every DB record tagged with tenant_id — zero cross-tenant access |
| Authentication | JWT sessions, TOTP 2FA, role detection on login, OTP email verification |
| Live Classroom | Jitsi Meet (primary) · Nextcloud Talk (alternative) — open-source |
| Messaging | Nextcloud Talk or Matrix — federated, encrypted |
| Baileys.js via QR code — rich formatted messages | |
| AI/LLM | External LLM API for AI-1, AI-2, AI-12 |
| Payments | Polar (embedded Stripe) · PayPal · Bank Transfer with receipt upload |
| Storage | Cloud object storage for materials, documents, certificates |
| Session | Auto-timeout after 30 minutes inactivity, configurable per institute |
👥 Six Stakeholder Roles
| Role | Panels | Primary Goal | Link |
|---|---|---|---|
| 🏢 Institute Owner | 13 | Full financial and operational command. Real-time P&L, commission approval, daily digest. | Owner → |
| 🎓 Student | 8 | Learning hub — classes, materials, payments, attendance, certificates, progress. | Student → |
| 👨🏫 Teacher | 9 | Professional workspace — live class, gradebook, AI quiz builder, earnings. | Teacher → |
| 🤝 Referral Partner | 4 | Referral pipeline and transparent commission ledger with 5-state lifecycle. | Partner → |
| 🏛️ Accreditation Body | 6 | Issue certifications, conduct 4-tab audits, receive automated compliance reports. | Accred. → |
| ⚙️ System Admin | 11 | Full operational authority — users, finance, AI governance, audit, monitoring. | Admin → |
🤖 AI Features — 3 Active at Launch
AI-1: Enrollment Proposal Generator
Trigger: New enquiry received (manual or web form) → AI generates personalised PDF proposal in under 30 seconds. Includes course recommendations, schedule, fee structure, and e-signature enrollment link. Delivered via Email and WhatsApp automatically.
AI-2: Document & CV Field Extraction
Trigger: PDF, DOCX, or image uploaded to teacher or student profile. AI extracts all relevant fields (name, qualifications, experience, contact details) and populates form fields with per-field confidence scores. Fields below 80% confidence are highlighted for manual review.
AI-12: Smart Quiz Generation
Trigger: Teacher selects course materials → AI generates 10 questions in 30 seconds. Format: 5 MCQ + 3 Short Answer + 2 True/False. Teacher reviews, edits optionally, then publishes. All AI-generated quizzes are clearly flagged as AI-assisted in audit logs.
🔔 Notification System
Three channels: Email (HTML formatted), WhatsApp (Baileys.js via QR), In-App (bell icon, feed, unread badge). 18 trigger events covered. 60-second delivery guarantee with 3-retry fallback. All notifications delivered in the user's preferred language (EN or AR).
Key Trigger Events
- Class Starting in 30 Minutes — Students + Teacher (Critical)
- Payment Overdue (3/7/14 days) — Student (High)
- Daily Profit Summary (8 PM) — Institute Owner (Scheduled)
- Commission Status Change — Referral Partner (High)
- Class Cancelled / Rescheduled — All Enrolled (Critical)
- Certificate Ready — Student (Standard)
- Accreditation Expiry 30 Days — Owner + Accreditation Body (High)
- New Enrollment Received — Owner + Admin (Standard)
💰 Financial Engine
Batch P&L Formula
- Auto-Invoice — generated within 60 seconds of enrollment confirmation
- Overdue Reminders — automatic at 3, 7, and 14 days past due date
- Cost Tracking — fixed costs (rent, software, utilities) and variable costs (materials, transport)
- Daily Digest — P&L summary delivered by 8 PM via WhatsApp and Email
- Export — all financial reports exportable as PDF or Excel
🤝 Commission System — 5 States
Every partner commission passes through a strictly enforced 5-state lifecycle. The 14-day cooling-off period protects the institute from refund reversals being paid as commissions.
| State | Description | Who Acts |
|---|---|---|
| Pending | Student pays enrollment fee. Commission created in system. | Automatic |
| Cooling-Off | 14-day protected hold. Cannot be approved during this period. | System enforced |
| Approvable | Cooling-off complete. Owner is notified and can now approve. | Owner notification |
| Approved | Owner one-click approves. Payout scheduled. Partner notified. | Institute Owner |
| Paid | Payment processed. Record archived. Partner sees confirmed on ledger. | Admin / Finance |
💼 Subscription Plans
- All 6 stakeholder roles
- 3 active AI features
- WhatsApp notifications
- Email notifications
- Jitsi classroom
- Real-time P&L
- 3 payment methods
- Everything in Starter
- White-label (add-on)
- Priority support
- Advanced analytics
- Custom domain
- API access
- SLA guarantee
- Everything in Professional
- White-label included
- Dedicated support
- Custom integrations
- On-premise option
- Custom contracts
- Volume discounts
🛡️ Security & Compliance
- Data Encryption — Industry-standard TLS in transit, encryption at rest
- Tenant Isolation — Every record tagged tenant_id. Zero cross-tenant access possible at the query level
- 2FA — TOTP-standard 2FA mandatory for Admin/Owner, available for all roles
- Audit Trail — All sensitive actions logged: user ID, timestamp, action, IP address. Immutable
- Session Timeout — Auto-logout after 30 minutes inactivity, configurable per institute
- GDPR — EU compliance: right to erasure, data portability, cookie consent, 7-year financial records
- UAE PDPL — UAE Personal Data Protection Law compliance
- Saudi PDPL — Saudi Arabia Personal Data Protection compliance
- WCAG 2.1 AA — Full web accessibility compliance
- Penetration Test — Mandatory third-party pen test REQUIRED before production launch
- OWASP Top 10 — Full OWASP Top 10 coverage in development and testing
🔌 Integration Ecosystem
| Category | Tool | Purpose |
|---|---|---|
| Live Classroom | Jitsi Meet | Open-source video conferencing. HD video, screen share, whiteboard, breakout rooms, recording |
| Live Classroom | Nextcloud Talk | Self-hosted alternative. Full video with file sharing, end-to-end encryption |
| Baileys.js | QR code setup. Rich formatted message delivery to any WhatsApp number | |
| Messaging | Matrix / Nextcloud | Federated encrypted messaging for all stakeholder pairs within platform |
| Payments | Polar Payments | Embedded Stripe-powered checkout. USD payments, auto-invoice, compliant card processing |
| Payments | PayPal | Global multi-currency checkout for international students |
| Payments | Bank Transfer | Manual receipt upload with admin confirmation and invoice reconciliation |
| Hosting | Vercel | Global edge CDN, auto-scaling, sub-100ms response, zero-downtime deploys |
| AI/LLM | External LLM API | Powers AI-1 (Proposals), AI-2 (CV Extraction), AI-12 (Quiz Generation) |
⚡ Non-Functional Requirements
| Requirement | Target |
|---|---|
| Dashboard Load Time | Under 3 seconds with all panels populated (live data) |
| Concurrent Users | 500+ concurrent users per institute |
| Platform Uptime | 99.5% uptime SLA on production |
| Notification Delivery | 60 seconds from trigger event, 3-retry fallback |
| AI Response Time | Proposal/extraction in under 30 seconds, quiz in under 30 seconds |
| Invoice Generation | Within 60 seconds of enrollment confirmation |
| Certificate Generation | Within 24 hours of course completion |
| Session Timeout | Auto-logout after 30 minutes inactivity |
| File Upload | Messaging: 25MB max. Materials: per plan storage limit |
| Languages | English LTR + Arabic RTL at launch. Additional languages via update |