Documentation Index
Fetch the complete documentation index at: https://grantmaster.dev/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
This directory contains technical API documentation for the GrantMaster platform. Reference docs are generated via DocuWriter.ai and reviewed before merging.Contents
External API
- External API Guide: Documentation for organization-level integrations (ERPs, CRMs, BI Tools).
Internal Service Reference
- AI Functions Reference: geminiService exported functions (generateJournalEntries, analyzeCompliance, etc.)
- Cloud Functions Reference: Cloud Function wrappers in cloudFunctionsService
- Hooks Reference: Shared custom React hooks API
- Component API Reference: UI component props and usage patterns
- Canonical Events API: Canonical status/event contracts, hooks, projection APIs, and version compatibility helpers
Billing & Credits
- Credit Service: Credit allocation, consumption, and balance management
- Quota Service: Entitlement checks and quota enforcement
- Usage Tracking: Usage metering and reporting
Shared Module Reference (src/shared/)
Cross-cutting services used by multiple feature modules. Each doc covers the public API, Firestore collections owned, and EventBus events emitted.
- Auth: Session management, API keys, MFA, security monitoring, invitations
- Audit:
logAuditEvent(),queryAuditLogs(), AuditAction enum, all callers - Billing: QuotaService enforcement, warning thresholds, storage quota helpers
- Budget: Burn-rate forecasting, budget alerts, categories, receipt storage
- Email: Postmark client, template catalogue, integration helpers, admin operations
- Events:
emitCanonicalSystemEvent(), EventPayloadMap type safety, canonical consumers - Extension API: Versioned contract boundary — ExtensionBaseService, scoped event bus, widget/command registration
- Intelligence: Cross-org benchmarks, funder profiles, GDPR consent management
- Integrations: HubSpot, Xero, webhooks, API key CRUD, audit log data access
- Notifications:
sendNotification()dispatch, audience resolution, all callers - Organization: Settings API, tenant provisioning, i18n helpers, ownership transfer
- Partnerships: PartnerService, invitation lifecycle, revenue share, referral credit wallet
- Platform: ModuleRegistry, module installation/activation API, GamificationService, dashboardPresetService
- Widgets: Grant pipeline metrics and dashboard widget data services
API Security
- Internal Calls: Secured via Firebase Auth and Firebase Security Rules.
- External Calls: Secured via rotating API keys and HMAC webhook signatures.
- Tenancy: All API responses are scoped automatically by the
tenantIdassociated with the API key or Auth token.
For Developers
If you are building a new feature:- Check the BaseService & EventBus guide first.
- Examine the Firestore Schemas to understand data structures.
- Use the
listenerManagerfor real-time Firestore updates rather than directonSnapshotcalls.