This document explains the architecture, local development setup, and design principles for the OpenGrants monorepo.
The OpenGrants platform integrates multi-source data ingestion, transformation, orchestration, and visualization — hosted entirely on DigitalOcean.
| Layer | Tool | Purpose |
|---|---|---|
| Ingestion | DLT | Load data from APIs, CSVs, Airtable, or custom scripts |
| Storage | PostgreSQL + DuckDB | Bronze/Silver layers in Postgres; Gold in DuckDB |
| Transformation | DBT | SQL models for cleaning + aggregations |
| Orchestration | Dagster | Pipeline scheduling, lineage, monitoring |
| Frontend | Next.js | Interactive analytics dashboard |
| Hosting | DigitalOcean | Unified stack on Droplet + App Platform |
| CI/CD | GitHub Actions | Build → Test → Deploy to DO |
The Medallion (Bronze–Silver–Gold) model structures our data pipeline into 3 progressive layers:
- Direct ingestion from source APIs, CSVs, or Airtable.
- Stored in Postgres as raw tables.
- No cleaning or normalization.
- Examples:
bronze_gitcoin_rounds,bronze_giveth_projects.
- Transformations that standardize schema into DAOIP-5 format.
- Enforce typing, relationships, and metadata quality.
- Stored in Postgres.
- Computed metrics and cross-ecosystem aggregates.
- Stored in DuckDB for fast querying and dashboard integration.
- Examples: funding trends, grant round stats, ecosystem funding distributions.
┌──────────┐
│ Bronze │ ← raw API / CSV / Airtable data (Postgresql)
└────┬─────┘
│
▼
┌──────────┐
│ Silver │ ← cleaned + normalized DAOIP-5 schema (Postgresql)
└────┬─────┘
│
▼
┌──────────┐
│ Gold │ ← analytics-ready data (DuckDB)
└──────────┘
- Docker Engine ≥ 20.10
- Python ≥ 3.12
- Node.js ≥ 20 (for frontend)
- GitHub CLI (optional)
git clone <repo-url>
cd opengrants-platform
cp .env.example .envdocker compose builddocker compose up -dVisit Dagster UI at → http://localhost:3000
| Service | Port | Description |
|---|---|---|
postgres |
5432 | Internal data warehouse |
dagster |
3000 | Dagster web UI + job scheduler |
dlt |
— | DLT loader container (runs ingestion scripts) |
dbt |
— | Transformation container (runs dbt run) |
nextjs-dashboard |
8080 | Frontend (to be added later) |
GitHub Actions automates:
- Build + push Docker images to DigitalOcean registry
- Redeploy Droplet stack via SSH
- Deploy frontend via DigitalOcean App Platform
| Phase | Goal |
|---|---|
| 1 | Local Docker stack working (DLT → DBT → Dagster) |
| 2 | Connect DigitalOcean Managed PostgreSQL |
| 3 | Deploy on DigitalOcean Droplet |
| 4 | Add Next.js dashboard with live DuckDB queries |
| 5 | Integrate LLM-powered query layer (Ask your data) |