Data Flow
Employee Onboarding
Marketer submits referral (portals)
→ POST /api/referrals/ (django-api)
→ Referral model created (MySQL)
→ Notification sent to Admin (Celery + SendGrid)
Admin reviews & creates Employee account
→ Employee receives invite email
→ Employee completes application form (portals)
→ Documents uploaded to S3
→ Background check triggered (Clearchecks API)
Admin approves → Employee gains portal access
→ Onboarding forms, competency tests assigned
→ Schedule createdDocument Lifecycle
Form assigned to employee
→ Employee fills / uploads (portals)
→ File stored on S3
→ PDF generated (WeasyPrint) if fillable
→ Digital signature applied (pyHanko) if required
→ Compliance document record updated (MySQL)Authentication Flow
User submits credentials (portals)
→ POST /api/auth/login/ (dj-rest-auth)
→ JWT access + refresh tokens returned
→ Access token stored in memory (portals)
→ Refresh token in httpOnly cookie
→ Token refreshed automatically before expiry