Documentation Index
Fetch the complete documentation index at: https://grantmaster.dev/llms.txt
Use this file to discover all available pages before exploring further.
shared/platform
Extension system runtime services. Handles module installation, activation, health monitoring, policy enforcement, and the platform-wide gamification and dashboard preset systems.Module Map
| File | Role |
|---|---|
ExtensionRegistry.ts | Compile-time module manifest catalog (ModuleRegistry) |
ExtensionInstallationService.ts | Install / uninstall module per org |
ExtensionActivationService.ts | Activate / deactivate installed modules |
ExtensionHealthService.ts | Periodic health checks per installed module |
ExtensionMigrationService.ts | Schema migration runner on module version upgrades |
ExtensionRuntimePolicyService.ts | Enforces extensionPolicy quotas at runtime |
GamificationService.ts | Platform-wide gamification (points, badges, leaderboards) |
PlatformPolicyService.ts | Platform-level policy document management |
PolicyService.ts | Per-organization policy enforcement |
ScheduledReportService.ts | Scheduled report job management |
activityFeedService.ts | Cross-feature activity feed aggregation |
dashboardPresetService.ts | Dashboard widget preset configurations |
ModuleRegistry API
ExtensionRegistry is the compile-time manifest catalog — it does not interact with Firestore.
Installation API
Health Service
ExtensionHealthService runs periodic checks (heartbeat pings to extension entry points) and writes health status to organizations/{orgId}/moduleInstallations/{moduleId}.healthStatus. Emits MODULE_HEALTH_DEGRADED when a check fails consecutively.
Runtime Policy Enforcement
ExtensionRuntimePolicyService intercepts extension EventBus operations and enforces:
maxEventSubscriptions— max active subscriptions per extensionmaxEventEmitsPerMinute— rate limit on event emissionmaxAgentToolCallsPerHour— throttles agent tool usagemaxAgentCreditsPerHour— caps AI credit consumption
Gamification
GamificationService manages the platform’s points-and-badges system used by features/mission:
awardPoints(userId, orgId, action, points)— award points for an actioncheckBadges(userId, orgId)— evaluate and award any newly unlocked badgesgetLeaderboard(orgId, limit)— returns ranked user list by points
Dashboard Preset Service
dashboardPresetService.ts manages per-role default widget layouts:
getPresetsForRole(orgId, role)— returns ordered widget list for a rolesavePreset(orgId, role, widgets[])— saves a custom presetgetCuratedOrdering(role)— returns the opinionated default widget order per role
Firestore Collections
| Collection | Owner | Description |
|---|---|---|
organizations/{id}/moduleInstallations/{moduleId} | InstallationService | Per-org installation records |
platform/modules/definitions/{moduleId} | SuperAdmin catalog | Override records for module catalog |
gamificationBadges | GamificationService | Badge definitions |
userBadges | GamificationService | Awarded badges per user |
platformPolicies | PlatformPolicyService | Platform-wide policy documents |