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.

Intelligence Platform

StatusUpdatedCovered Files
🟢 Stable2026-02-22functions/src/intelligence/, functions/src/intelligence/anonymizer.ts, src/components/widgets/platform/, src/shared/platform/

Overview

The Intelligence Platform aggregates anonymized data across organizations to provide cross-platform benchmarks, predictive analytics, and sector insights. Privacy is enforced through SHA-256 anonymization with yearly salt rotation, value bucketing, and metric clamping.

Architecture

┌─────────────────────────────────────────────────────────┐
│  Organization Data (per-tenant)                         │
│  Grants, budgets, compliance, projects, people          │
├────────────────────┬────────────────────────────────────┤
│  Anonymizer        │  Consent Layer                     │
│  SHA-256 hashing   │  Opt-in per organization           │
│  Value bucketing   │  IntelligenceOptInWidget            │
│  Metric clamping   │                                    │
├────────────────────┴────────────────────────────────────┤
│  Cohort Builder                                         │
│  Size + sector + geography grouping                     │
├─────────────────────────────────────────────────────────┤
│  Intelligence Outputs                                   │
│  Benchmarks, predictions, sector trends                 │
└─────────────────────────────────────────────────────────┘

Anonymization System

File: functions/src/intelligence/anonymizer.ts

Core Techniques

TechniqueImplementationPurpose
SHA-256 hashinggenerateAnonymousId(orgId, salt)Irreversible organization identification
Yearly salt rotationgetYearlySalt(baseSalt) — SHA-256 of {baseSalt}-{year}Prevents cross-year correlation
Value bucketingbucketValue(value, buckets)Groups continuous values into ranges
Metric clampingclampMetric(value, min, max)Caps extreme outliers to prevent identification
Size categorizationcategorizeOrgSize(employeeCount)Groups: micro, small, medium, large, enterprise

Anonymization Pipeline

function anonymizeOrgData(orgData: OrgData, config: AnonymConfig): AnonymizedRecord {
  const salt = getYearlySalt(config.baseSalt);
  const anonymousId = generateAnonymousId(orgData.organizationId, salt);

  return {
    anonymousId,
    cohort: buildCohort(orgData),
    metrics: {
      grants: computeGrantMetrics(orgData),
      finance: computeFinanceMetrics(orgData),
      compliance: computeComplianceMetrics(orgData),
      people: computePeopleMetrics(orgData),
      projects: computeProjectMetrics(orgData),
    },
    qualityScore: calculateQualityScore(orgData),
  };
}

Quality Scoring

A 100-point quality score determines if an organization’s data is sufficient for inclusion:
function calculateQualityScore(data: OrgData): number {
  // Scores based on data completeness across domains
  // Only records with score ≥ threshold are included in benchmarks
}

function meetsQualityThreshold(score: number): boolean;
function getDataWeight(score: number): number;  // Higher quality = more weight

Opt-In Flow

Organizations must explicitly opt in to data sharing:
  1. SuperAdmin sees IntelligenceOptInWidget on Platform tab
  2. Reviews what data is collected and how it’s anonymized
  3. Grants consent (stored in organization settings)
  4. Data collection begins on next scheduled pipeline run

Data Retention

  • Anonymized records are retained for rolling 3-year windows
  • Organizations can revoke consent at any time
  • Revocation triggers deletion of all anonymized records within 30 days

Metric Domains

Grant Metrics

MetricDescription
Application success rateProposals submitted vs. funded
Average award sizeBucketed by grant type
Pipeline velocityTime from identification to award
Diversification indexFunder concentration ratio

Finance Metrics

MetricDescription
Overhead ratioAdministrative vs. program costs
Burn rateMonthly expenditure rate
Reserve monthsOperating reserve duration
Budget utilizationSpent vs. allocated percentages

Compliance Metrics

MetricDescription
Audit readiness scoreComposite compliance indicator
Policy violation rateViolations per 100 transactions
Document complianceRequired vs. present documentation
Reporting timelinessOn-time vs. late report submissions

People Metrics

MetricDescription
Staff utilizationBillable hours ratio
Cost per FTEFully-loaded employee cost
Turnover rateAnnual attrition (bucketed)
Volunteer ratioVolunteer hours vs. staff hours

Project Metrics

MetricDescription
On-time delivery rateProjects completed by deadline
Milestone completionPlanned vs. achieved milestones
Risk resolution rateIdentified risks mitigated
Deliverable qualityAccepted vs. revision-required deliverables

Cohort System

Organizations are grouped into cohorts for meaningful comparison:
function buildCohort(orgData: OrgData): Cohort {
  return {
    size: categorizeOrgSize(orgData.employeeCount),
    sector: orgData.sector,      // e.g. 'health', 'education', 'environment'
    geography: orgData.region,   // Continental region
  };
}

Cohort Dimensions

DimensionValues
Organization Sizemicro (1-5), small (6-25), medium (26-100), large (101-500), enterprise (500+)
Sectorhealth, education, environment, humanitarian, development, governance, other
GeographyContinental regions

Platform Widgets

Directory: src/components/widgets/platform/
WidgetDescription
SectorBenchmarksWidgetCompare organization metrics against sector peers
SectorTrendsWidgetLongitudinal trends across the sector
GrantSuccessPredictorWidgetML-based grant success probability
BudgetRiskRadarWidgetBudget risk indicators with peer comparison
FunderIntelligenceWidgetFunder landscape and opportunity analysis
IntelligenceOptInWidgetConsent management and data sharing settings

Key Files Reference

FilePurpose
functions/src/intelligence/anonymizer.tsSHA-256 anonymization, bucketing, clamping, cohort building
functions/src/intelligence/pipeline.tsScheduled data collection and aggregation
src/components/widgets/platform/Platform intelligence dashboard widgets
src/components/widgets/platform/IntelligenceOptInWidget.tsxConsent management widget
src/shared/platform/Platform service utilities