Skip to main content

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

Billing & Credits

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

  1. Internal Calls: Secured via Firebase Auth and Firebase Security Rules.
  2. External Calls: Secured via rotating API keys and HMAC webhook signatures.
  3. Tenancy: All API responses are scoped automatically by the tenantId associated with the API key or Auth token.

For Developers

If you are building a new feature:
  1. Check the BaseService & EventBus guide first.
  2. Examine the Firestore Schemas to understand data structures.
  3. Use the listenerManager for real-time Firestore updates rather than direct onSnapshot calls.