The main MAPs product centers on appraisal and development workflows, but the important architecture signal is how tenant settings, permissions, modules, realtime events, and reporting all integrate coherently.
Auth, Sessions, and Account Security
01JWT access/refresh lifecycle with Mongo-backed refresh sessions, refresh rotation, reuse detection, lockout policy, password history/expiry, and MFA (TOTP + email challenges).
- Rate limiting on auth endpoints
- Password complexity + reuse prevention
- TOTP QR setup + hashed backup codes
- Email-based MFA challenge support
Tenant Configuration + Module Gating
02Organisation-specific Settings drives labels, modules, theming, templates, analytics options, and more. Server middleware enforces module availability for protected feature domains.
- Settings-backed feature flags and tenant labels
- requireModuleEnabled(moduleKey) middleware
- System-admin monitoring endpoints for module toggles
Appraisals (Primary Workflow)
03Lifecycle-heavy appraisal domain with CRUD, session start/end, notes history, structured notes, reporting endpoints, PDF export, and tenant-configurable templates and marker/grid behavior.
- Structured notes Map keyed by template field keys
- Conditional required fields on completion
- Reporting endpoints across date windows and organisation/location lenses
- Appraisee notes PDF export
Realtime Collaboration + Notifications
04Socket.IO handles presence registration, appraisal room joining, collaboration updates, and targeted notification events, backed by a notification API for read/delete flows.
- userId -> socketId registration
- Appraisal room events and session events
- Single-device and marker-reveal notification patterns
- Notification CRUD + mark-read endpoints
Reporting + AI Narrative Summaries
05Aggregation-heavy reports and dashboard endpoints, including OpenAI-powered narrative summaries of dashboard rows/distributions for admin interpretation support.
- Reports route groups for dashboard analytics
- OpenAI-backed dashboard summary generation
- Tenant-configurable analytics options via Settings
People, Roles, and Org Hierarchy Admin
06Users, roles, user-role assignments, locations/divisions/units, custom tiers, organisation metadata, and settings are all exposed as admin APIs with role-aware access patterns.
- Org-scoped directory queries and search
- Archive/restore and workflow flags on users
- Role CRUD + assignment/removal endpoints
- Hierarchy CRUD (location/division/unit)
Configurable Capability Modules
07Competency tracking, Johari, 360 feedback, and traits reflection are implemented as separately gated modules with their own route groups and workflows.
- Competency framework CRUD + progress tracking
- Johari templates/grids/responses + expiry closure cron
- 360 feedback lifecycle with reminders and sharing controls
- Traits reflection latest/history endpoints
Files, Storage, and Rich Content
08Cloudflare R2 document uploads via presigned URLs and Cloudflare Images direct uploads, plus rich content editing/rendering support for MAPs content pages.
- Presigned PUT/GET/DELETE URL flows
- Cloudflare Images direct upload controller
- TipTap + sanitization on client content pages
- Bulk upload + post-upload processing flows
Operations, Health, and Observability
09Health endpoints, Sentry integration, a test-error route for instrumentation checks, and scheduled jobs (e.g., Johari expiry closure) with guarded failure handling.
- Liveness/readiness endpoints
- Sentry instrumentation + validation route
- Hourly cron with failure capture
- Request logging + security middleware stack