# Gap Analysis: Advertised vs Built

**Date:** 2026-07-08
**Purpose:** Identify what we're promising customers vs what's actually functional in the system.

---

## CRITICAL: Pricing Inconsistency Across Sources

We have **3 different pricing models** published in different places — this MUST be unified before first sale:

| Source | Tiers | Model |
|--------|-------|-------|
| `docs/pricing-strategy.md` | 3 tiers: 399 / 1,199 / 3,499 | Flat only, no commission |
| `docs/30-day-survival-plan.md` | 3 tiers: 699 / 1,499 / 3,499 | Flat + percentage (7%/5%/3%) |
| **Live marketing site** (Next.js) | 4 tiers: Free+12% / 1,000+7.5% / 3,500+5% / 10,000+3.5% | Flat + percentage |

**Trial duration conflict:** pricing-strategy says 10 days, marketing site says 14 days.

**Fabricated claims on live marketing site:**
- "47+ academies" — ZERO real customers
- "12,000+ players" — ZERO real data
- "1.2 million+ EGP managed monthly" — ZERO
- "99.9% uptime" — no SLA exists
- "98% customer satisfaction" — no customers to satisfy
- 3 fake testimonials with names/cities

These fabrications are a legal liability and will destroy credibility if a prospect Googles those people.

---

## Legend

| Symbol | Meaning |
|:------:|---------|
| :white_check_mark: | Fully built — migrations, models, services, UI, tested |
| :construction: | Schema + models exist, services partial, UI exists but may not be browser-tested |
| :warning: | Migrations exist, models exist, but no service or incomplete UI |
| :x: | Not built at all — zero code |

---

## Module-by-Module Status

### 1. Identity & Access (Foundation)

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Multi-tenant (academy_id scope) | Yes | :white_check_mark: | BelongsToAcademy trait, global scope |
| User login/auth | Yes | :white_check_mark: | Livewire Login, middleware |
| Roles & permissions | Yes | :white_check_mark: | Full RBAC, 10+ role levels |
| Branch management | Yes | :white_check_mark: | CRUD + branch switcher |
| User management | Yes | :white_check_mark: | UserList + UserForm |
| Login history | Yes | :white_check_mark: | Migration + model exists |
| Academy settings | Yes | :white_check_mark: | SystemSettings, BrandingSettings, AcademySettings |

### 2. People & Participants

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| People (staff) CRUD | Yes | :white_check_mark: | PersonList + PersonForm + PersonShow |
| Participant registration | Yes | :white_check_mark: | ParticipantForm + List + Show |
| Guardian management | Yes | :white_check_mark: | GuardianDashboard, linked to participants |
| Bulk import | Yes | :white_check_mark: | ParticipantImport component |
| Status transitions (freeze/suspend/etc) | Yes | :white_check_mark: | FreezeParticipant, BulkStatusChange, StatusTimeline |
| Classification (VIP, scholarship, etc) | Yes | :construction: | Migration exists, enum defined |
| Document management | Yes | :white_check_mark: | DocumentUploadWizard, Medical alerts, Approval flow |

### 3. Training Programs & Scheduling

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Training programs CRUD | Yes | :white_check_mark: | ProgramList + CreateProgramWizard |
| Training groups | Yes | :white_check_mark: | GroupList + CreateGroupWizard |
| Weekly schedule | Yes | :white_check_mark: | WeeklySchedule component |
| Session generation | Yes | :construction: | Migration exists, service exists |
| Session rescheduling | Yes | :white_check_mark: | RescheduleSession component |
| Holidays | Yes | :warning: | Migration only |

### 4. Enrollments

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Enrollment management | Yes | :white_check_mark: | EnrollmentForm + List |
| Waitlist | Yes | :white_check_mark: | WaitlistManager |
| Group transfer | Yes | :white_check_mark: | TransferGroup + TransferParticipantWizard |
| Enrollment history | Yes | :white_check_mark: | EnrollmentHistory component |
| Prerequisites checking | Implied | :warning: | No service visible for prerequisite validation |

### 5. Attendance

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Take attendance (trainer) | Yes | :white_check_mark: | TakeAttendance + QuickAttendance |
| Attendance list/reports | Yes | :white_check_mark: | AttendanceList, AttendanceReport |
| Auto-generation on session create | Yes | :construction: | Service exists |
| Auto-absent job (hourly) | Yes | :white_check_mark: | Scheduled in routes/console.php, runs hourly |
| Grace period (late detection) | Yes | :construction: | Logic in service |
| Threshold enforcement (auto-suspend) | Yes | :warning: | Rule defined but enforcement unclear |
| Parent attendance notifications | Yes | :x: | **No WhatsApp integration built** |

### 6. Financial System

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Double-entry accounting | Yes | :white_check_mark: | TransactionService, debit/credit pairs |
| Invoice creation | Yes | :white_check_mark: | CreateInvoiceWizard + InvoiceList + InvoiceShow |
| Payment recording | Yes | :white_check_mark: | CollectPaymentWizard |
| Wallet system | Yes | :white_check_mark: | WalletList + WalletShow |
| Payment plans / installments | Yes | :construction: | Migration + model, PaymentPlanCreate component |
| Cash sessions | Yes | :white_check_mark: | CashSessionList + CashSessionManage |
| Financial reports | Yes | :white_check_mark: | FinancialReport + FinancialOverview |
| Coupon validation | Yes | :white_check_mark: | CouponValidator component |
| Refund flow | Yes | :construction: | Logic in service, no dedicated UI |
| **Online payment gateway** | **Yes (advertised: "يدفعوا أونلاين")** | :x: | **ZERO payment gateway integration** |
| Service fees / commission tracking | Yes | :construction: | Migration added |
| Receipt printing | Yes | :construction: | ReceiptSettings + templates exist |

### 7. Pricing Engine

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Base prices | Yes | :white_check_mark: | BasePriceList + BasePriceForm |
| Pricing rules (13 types) | Yes | :white_check_mark: | PricingRuleList + CreatePricingRuleWizard |
| Promotions/coupons | Yes | :white_check_mark: | PromotionForm + PromotionList |
| Smart discount engine | Yes | :construction: | PricingService exists, untested end-to-end |
| Stackable/non-stackable logic | Yes | :construction: | Service logic exists |

### 8. POS System

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| POS terminal | Yes | :white_check_mark: | POSTerminal component |
| POS history | Yes | :white_check_mark: | POSHistory component |
| Split payments | Yes | :construction: | Logic in POSService |
| Product sales | Yes | :construction: | Connected to inventory |
| Kit sales | Yes | :warning: | Kit model exists, POS integration unclear |

### 9. Inventory Management

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Products & categories | Yes | :white_check_mark: | ProductList + CreateProductWizard |
| Warehouses | Yes | :white_check_mark: | WarehouseList + WarehouseForm |
| Inventory movements | Yes | :white_check_mark: | MovementList |
| Stock adjustments | Yes | :white_check_mark: | StockAdjustment + StockAdjustmentWizard |
| Purchase orders | Yes | :white_check_mark: | PurchaseOrderList + route |
| Kits (BOM) | Yes | :white_check_mark: | KitList + KitForm + routes |
| Stock counts | Yes | :white_check_mark: | StockCountList + StockCountForm + routes |
| Low stock alerts | Yes | :construction: | Logic in service |

### 10. Facilities & Space

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Facility CRUD | Yes | :white_check_mark: | FacilityList + CreateFacilityWizard |
| Space layouts (grid/lanes/zones) | Yes | :white_check_mark: | SpaceLayoutManager |
| Visual schedule builder | Yes | :white_check_mark: | VisualScheduleBuilder |
| Space reservations | Yes | :construction: | Migration + model exists |
| Collision detection | Yes | :construction: | Service logic defined |
| Space assignment wizard | Yes | :white_check_mark: | SpaceAssignmentWizard |

### 11. HR & Payroll

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Employee management | Yes | :white_check_mark: | EmployeeList + CreateEmployeeWizard |
| Trainer management | Yes | :white_check_mark: | TrainerList + CreateTrainerWizard |
| Trainer qualifications | Yes | :white_check_mark: | Migration + model |
| Trainer availability | Yes | :construction: | Migration, no dedicated UI |
| Trainer compensations | Yes | :white_check_mark: | TrainerCompensations component |
| Payroll periods | Yes | :white_check_mark: | PayrollDashboard |
| Payslips | Yes | :white_check_mark: | PayslipDetail |
| Trainer advances | Yes | :white_check_mark: | TrainerAdvances |
| **Full HR / Leave management** | **No** | :x: | Not built, not critical |

### 12. Notifications & Communication

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Notification templates | Yes | :white_check_mark: | NotificationTemplateList + Form |
| Notification center (in-app) | Yes | :white_check_mark: | NotificationCenter |
| Notification preferences | Yes | :white_check_mark: | NotificationPreferences |
| Notification log | Yes | :white_check_mark: | NotificationLogList |
| Bulk messaging | Yes | :white_check_mark: | BulkMessage component |
| **WhatsApp Business API** | **Yes (entire cost model built on it)** | :x: | **ZERO integration — no channel, no templates sent** |
| **SMS gateway** | **Yes (SMS pack in pricing)** | :x: | **No SMS provider integrated** |
| **Email notifications** | **Yes** | :x: | **No email sending configured (poste.io exists but no Laravel mail integration verified)** |
| Push notifications | Implied | :x: | No PWA/push setup |

### 13. Parent Portal

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Parent dashboard | Yes | :white_check_mark: | ParentHome |
| View child attendance | Yes | :white_check_mark: | ParentAttendance |
| View finances/invoices | Yes | :white_check_mark: | ParentFinances + ParentInvoiceDetail |
| View schedule | Yes | :white_check_mark: | ParentSchedule |
| View programs | Yes | :white_check_mark: | ParentPrograms |
| Submit excuses | Yes | :white_check_mark: | ParentExcuseForm |
| View evaluations | Yes | :white_check_mark: | ParentEvaluationDetail |
| Profile management | Yes | :white_check_mark: | ParentProfile |
| Notifications | Yes | :white_check_mark: | ParentNotifications |
| **Pay online** | **Yes ("يدفعوا أونلاين")** | :x: | **No payment gateway in parent portal** |
| **Mobile app** | **Yes ("تطبيق أولياء")** | :x: | **No mobile app exists** |

### 14. Academy Website (Public)

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Auto-generated website | Yes | :white_check_mark: | Just built — full CMS + 16 sections |
| Bold Athletic template | Yes | :white_check_mark: | website.css + all section views |
| CMS editor | Yes | :white_check_mark: | SectionManager + ThemeEditor |
| Gallery | Yes | :white_check_mark: | GalleryManager |
| Contact form | Yes | :white_check_mark: | ContactFormController + ContactSubmissionList |
| SEO (JSON-LD) | Yes | :white_check_mark: | In layout.blade.php |
| Custom domain (youracademy.com) | Yes (annual plan perk) | :white_check_mark: | Manual via CapRover custom domain per customer |
| Subdomain routing (name.elcaptain.com) | Yes | :white_check_mark: | Manual via CapRover app creation per customer |

### 15. Reports & Analytics

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Attendance reports | Yes | :white_check_mark: | AttendanceReport |
| Financial reports | Yes | :white_check_mark: | FinancialReport |
| Reports page | Yes | :white_check_mark: | ReportsPage |
| Dashboard widgets | Yes | :white_check_mark: | RevenueWidget, EnrollmentTrends |
| **Advanced reports + export** | **Yes (Business tier feature)** | :white_check_mark: | Reports exist + ExportController handles CSV (participants, payments, invoices, enrollments) |

### 16. Evaluations

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Evaluation criteria | Yes | :white_check_mark: | EvaluationCriteriaList |
| Evaluation forms | Yes | :white_check_mark: | EvaluationForm + List + Show |
| Parent view evaluations | Yes | :white_check_mark: | ParentEvaluationDetail |

### 17. Assignments

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Trainer-to-group assignments | Yes | :white_check_mark: | AssignmentList + AssignmentForm |
| Assignment scopes (full/partial/etc) | Yes | :construction: | Enum exists |

### 18. Audit & Compliance

| Feature | Advertised | Status | Notes |
|---------|:----------:|:------:|-------|
| Audit log | Yes | :white_check_mark: | AuditLogList + ActivityLog |
| Immutable records | Yes | :construction: | Migration design enforces it |

---

## Critical Gaps (BLOCKERS for Sales)

These are features we're actively selling that DO NOT EXIST:

| # | Gap | Impact | Effort | Priority |
|:-:|-----|--------|--------|:--------:|
| 1 | **WhatsApp Business API integration** | Entire cost model + parent notifications depend on this. We promise "إشعارات أولياء أمور" in Basic tier. | 3-5 days | **P0** |
| 2 | **Online payment gateway** | We say "يدفعوا أونلاين" in pitch. Parents can view invoices but can't pay. | 3-5 days | **P0** |
| 3 | **Mobile app (parent)** | Business tier advertises "تطبيق أولياء". We have a web portal but no native app. | 2-4 weeks | **P2** |
| 4 | **SMS channel** | Listed as Business tier feature "SMS + email". Zero provider. | 1-2 days (if WhatsApp-first, SMS becomes fallback) | **P2** |
| 5 | ~~**Email sending**~~ | ~~No verified mail config~~ **DONE** — config/mail.php wired to poste.io with self-signed cert bypass, NotificationService uses Mail::raw() | ~~0.5 day~~ | ~~**P1**~~ |
| 6 | **Subscription/billing engine** | No way to charge customers monthly. No Stripe/Paymob/etc. No tier enforcement (player limits, user limits). | 3-5 days | **P0** |

**NOT gaps (handled manually or already built):**
- ~~Subdomain/custom domain routing~~ — Done manually via CapRover per customer
- ~~Trial system (10-day + lockout)~~ — Managed manually via CapRover manager app
- ~~Auto-absent scheduled job~~ — Already in `routes/console.php`, runs hourly
- ~~Data export~~ — ExportController already exports participants, payments, invoices, enrollments as CSV

---

## Revenue-Critical Path (What blocks first sale)

To do a **live demo** and close a customer, we need AT MINIMUM:

```
1. Working login + dashboard                    ✅ DONE
2. Add players/participants                     ✅ DONE
3. Create programs + groups                     ✅ DONE
4. Take attendance                              ✅ DONE
5. Create invoice + collect payment (cash)      ✅ DONE
6. Show parent portal                           ✅ DONE
7. Show academy website                         ✅ DONE (just built)
8. "yourname.elcaptain.com" live                ✅ Manual via CapRover
9. WhatsApp notification demo                   ❌ BLOCKER
10. Online payment demo                         ❌ BLOCKER
```

**Verdict:** We can demo 80% of the system TODAY. The 2 blockers (#9, #10) are the features that differentiate us from "Excel + WhatsApp group" — they're the reason someone pays.

---

## What We Can Honestly Sell TODAY

Without fixing any gaps, our current honest value proposition is:

> A full sports academy management system with: participant tracking, training programs, group scheduling, attendance with trainer app, full financial system (invoices, payments, wallets, cash sessions), POS, inventory, facility management, pricing engine, HR/payroll, evaluations, parent web portal, role-based access, and a customizable public website.

**What we CANNOT honestly promise today:**
- WhatsApp notifications to parents
- Online payment by parents
- Mobile app
- SMS notifications
- Subscription tier enforcement

---

## Recommended Fix Order (to "sellable")

| Day | Task | Unlocks |
|:---:|------|---------|
| ~~1~~ | ~~Wire Laravel Mail to poste.io + basic email notifications~~ **DONE** | ~~"Email notifications" claim becomes real~~ ✅ |
| 2-3 | Integrate WhatsApp Cloud API (Meta) — send template messages | Parent notifications, the core differentiator |
| 4-5 | Integrate Paymob (Egypt) payment gateway — parent pays invoice online | "يدفعوا أونلاين" becomes real |

**Handled manually (not code tasks):**
- Subdomain routing → Create CapRover app per customer
- Trial/lockout → Managed via manager app + manual onboarding
- Custom domains → DNS pointing + CapRover custom domain feature

After this sprint: **every claim in the sales pitch is real.**

---

## Marketing Site Gaps (Next.js at `/marketing-site/`)

The live marketing site makes additional promises not covered in the module breakdown above:

| Claim | Reality |
|-------|---------|
| "Trainer app" (Professional tier) | No mobile app. TrainerDashboard is web-only. |
| "Parent app" (Professional tier) | No mobile app. Parent portal is web-only. |
| "API for external integrations" | One QuickStats endpoint exists. No documented REST API. |
| "Custom modifications" (Professional) | No mechanism for per-customer customization |
| "Private hosting" (Professional) | No multi-instance deployment. Single shared DB. |
| "Smart alerts via app, email, and messages" | In-app exists. Email/SMS/WhatsApp: ZERO channels wired. |
| "One-tap attendance recording" | Exists (QuickAttendance) |
| "Instant absence alerts" | Alert component exists, notification sending doesn't |
| "Quick registration wizard" | Exists (NewRegistrationWizard) |
| "Free 14-day trial. No credit card." | Managed manually — deploy instance via CapRover, lock after trial period |
| "Percentage Only" tier (Free + 12%) | No billing system to collect commission. |

---

## Immediate Action Items (Before Next Demo)

### STOP doing:
- [ ] Remove fake stats from marketing site (or replace with "beta" language)
- [ ] Remove fake testimonials (legal risk)
- [ ] Pick ONE pricing model and kill the others

### START doing:
- [ ] Wire email (poste.io → Laravel SMTP, 0.5 day)
- [ ] WhatsApp Cloud API basic integration (2-3 days)
- [ ] Paymob payment gateway (2-3 days)
- [ ] Rewrite marketing site hero with honest "launching" language

### KEEP doing:
- [ ] Demo the 18 working features listed below with confidence
- [ ] Show the parent portal (real differentiator)
- [ ] Show the academy website builder (just shipped)

---

## Features Safe to Advertise (No Gap)

These work end-to-end and can be demoed confidently:

1. Full participant lifecycle (register → active → graduate)
2. Training programs, groups, weekly schedules
3. Attendance taking (trainer view + parent view)
4. Invoice creation + cash/card payment recording
5. Wallet system (top-up, deduct, freeze)
6. POS terminal for product/service sales
7. Smart pricing engine (13 rule types + stackable discounts)
8. Facility management with visual layout builder
9. HR: employees, trainers, payroll, advances
10. Parent portal (view attendance, finances, schedule, evaluations)
11. Public website with CMS editor
12. Role-based permissions (10+ roles)
13. Multi-branch support
14. Cash session management
15. Document management with approval workflow
16. Evaluations system
17. Audit logging
18. Dashboard with revenue + enrollment widgets
