Skip to content

Data Model

Entity Hierarchy

Organization
  └── Program (one org has many programs)
       ├── Donor (many-to-many via ProgramDonor)
       └── Project (one program has many projects)
            ├── ProjectIndicator (maps Indicator → Project)
            │    └── IndicatorReport (per period, per indicator, per project)
            ├── Activity (links to Output result node)
            │    └── ActivityParticipant → Participant
            │                              └── HouseholdMember
            ├── BudgetLine
            ├── ReportingPeriod (project-level periods)
            └── Report (assembled donor report)
                  └── ReportSection

ResultNode (tree)
  Impact → Outcome → Output → [Activity]

Indicator (definition)
  └── IndicatorDisaggregation
  └── IndicatorReport (values per period/project)

Form (data collection)
  └── FormField (with conditional logic)
  └── FormSubmission
       └── FormAnswer

Core Tables

organizations

ColumnTypeNotes
iduuidPK
namevarcharDisplay name
codevarcharShort slug, unique
logo_urlvarcharOptional
created_attimestamptz

programs

ColumnTypeNotes
iduuidPK
org_iduuidFK → organizations
namevarchar
descriptiontext
start_datedate
end_datedate
statusenumactive, completed, draft

projects

ColumnTypeNotes
iduuidPK
program_iduuidFK → programs
namevarchar
budgetdecimalTotal budget
currencyvarcharISO 4217
start_datedate
end_datedate
statusenumactive, completed, draft, suspended

indicators

ColumnTypeNotes
iduuidPK
org_iduuidFK → organizations
namevarchar
codevarcharShort identifier
unitvarchare.g. people, %, USD
aggregation_methodenumsum, average, latest, min, max
is_formulabooleanComputed from other indicators
formulatextExpression if is_formula = true
result_node_iduuidFK → result_nodes (optional)

indicator_reports

Actual values submitted per indicator, per project, per period.

ColumnTypeNotes
iduuidPK
indicator_iduuidFK → indicators
project_iduuidFK → projects
reporting_period_iduuidFK → reporting_periods (nullable for custom)
valuedecimalReported value
targetdecimalPeriod target
narrativetextQualitative notes
statusenumdraft, submitted, approved, rejected
submitted_byuuidFK → users
approved_byuuidFK → users

reporting_periods

ColumnTypeNotes
iduuidPK
project_iduuidFK → projects
labelvarchare.g. "Q1 2026"
start_datedate
end_datedate
is_lockedbooleanPrevents further edits

reports

Assembled donor reports.

ColumnTypeNotes
iduuidPK
project_iduuidFK → projects
titlevarchar
report_typeenumquarterly, annual, ad_hoc
start_datedateCustom date range
end_datedate
share_tokenuuidNullable; set when shared
share_expires_attimestamptzOptional expiry
statusenumdraft, published

result_nodes

Implements the logical framework tree.

ColumnTypeNotes
iduuidPK
org_iduuidFK → organizations
program_iduuidFK → programs
parent_iduuidFK → result_nodes (self-ref)
levelenumimpact, outcome, output
titlevarchar
descriptiontext
order_indexintSort order within parent

Key Relationships

Organization  1──N  Program
Program       1──N  Project
Program       N──M  Donor         (via program_donors)
Project       N──M  Indicator     (via project_indicators)
Indicator     1──N  IndicatorReport
Project       1──N  ReportingPeriod
Project       1──N  Activity
Activity      1──N  ActivityParticipant
Participant   1──N  HouseholdMember
Project       1──N  BudgetLine
Project       1──N  Report
Form          1──N  FormSubmission
FormSubmission N──1 IndicatorReport  (optional link)

ImpactMEL — Enterprise M&E Platform