# APeF LMS — Additions & Notes

## Additions Beyond Original Spec

### APeF Brand Information (sourced from apef.co.tz)
- **Full Name:** Africa Pension Fund Limited
- **Motto:** "Ensure Your Tomorrow"
- **HQ:** Dar es Salaam, Tanzania
- **Phone:** +255 22 260 0166 | Toll-Free: 0800 11 1234
- **Website:** apef.co.tz
- Used official brand colors: `#1a3a5c` (primary navy blue), `#f7941d` (accent orange)

### Additional Features Added

#### 1. Lead Reference System
- Auto-generated unique reference numbers: `APeF-YYYY-NNNNN` (e.g., APeF-2026-00001)
- Year-based sequential numbering
- Immutable once created

#### 2. Extended Lead Fields
- `client_type`: individual / corporate / institution (APeF serves HNWIs, corporates, insurers, pension schemes)
- `id_type` / `id_number`: For KYC compliance (national_id, passport, voter_id)
- `nationality`: Defaults to Tanzanian
- `investment_currency`: Defaults to TZS, supports multi-currency
- `risk_profile`: conservative / moderate / aggressive (standard wealth mgmt terminology)
- `lost_reason`: Compliance audit trail for lost leads

#### 3. Lead Documents
- `lead_documents` table for attaching KYC documents, proposals, contracts
- File upload support ready (storage linked)

#### 4. Activity Types
- Extended activity types: note, call, email, meeting, status_change, assignment, document, follow_up, system
- Auto-logging of status changes and assignments for compliance/audit

#### 5. Team Focus Areas
- Teams can be set to focus on a specific product or "all"
- Used to pre-filter lead type on team-specific dashboards

#### 6. Leaderboard
- Dashboard shows top 5 performers by leads assigned/converted (visible to admin/team_lead)

#### 7. Overdue Follow-ups Alert
- Dashboard highlights leads with `follow_up_at` in the past that are not converted/lost

#### 8. Seeded Realistic Data
- 15 users across 3 teams
- 62 leads with realistic Tanzanian names, cities, phone numbers
- Activities auto-logged during seeding
- Team-specific email addresses (investment@apef.co.tz, wealth@apef.co.tz, brokerage@apef.co.tz)

### Design Decisions

| Decision | Rationale |
|---|---|
| Bootstrap 5 (CDN) | Faster setup, financial-services friendly appearance |
| Spatie Laravel Permission | Industry standard for roles/permissions |
| Soft Deletes on leads/teams | Financial services require data retention |
| Scope-based team isolation | Cleaner than global scopes, more flexible |
| JSON metadata on activities | Stores old/new status for status changes without extra tables |
| ui-avatars.com fallback | No file upload needed for user avatars |

### Credentials (Development)
| Role | Email | Password |
|---|---|---|
| Admin | admin@apef.co.tz | Admin@2024! |
| Team Lead (Investment) | james.mwangi@apef.co.tz | Password@123 |
| Team Lead (Wealth) | sarah.njoku@apef.co.tz | Password@123 |
| Team Lead (Brokerage) | michael.lema@apef.co.tz | Password@123 |
| Agent (Investment) | amina.saleh@apef.co.tz | Password@123 |
