How Open Grants Index runs
A small web app in front of a database. This page describes the Grants deployment, not a live server inventory.
Server infrastructure
Public HTTPS requests pass through Cloudflare and an NGINX reverse proxy to the app. The app and PostgreSQL run in separate containers on the server. The database is private; browsers do not connect to it directly.
In short: browser or agent → HTTPS → Next.js → PostgreSQL.
The Next.js app
Next.js 16 and React render the grant list, filters, table, and detail pages. The app runs on Node.js 22, packaged as a standalone container image.
Server-side code reads PostgreSQL using the postgres library. The browser interface, HTTP API, and MCP tools use the same grant records. Public browsing needs no account; editing and draft submission are protected.
This docs page is static and does not query the database.
The PostgreSQL database
PostgreSQL 16 stores the grant data in a persistent volume, separate from the app image. Replacing the app does not replace the stored grant records.
- The
grantstable stores funders, source URLs, eligibility text, deadlines, and award amounts. - Review state, verification dates, original source text, and JSON provenance preserve the evidence behind each record.
- Public searches show reviewed records and exclude archived or expired opportunities by default.
Schema changes live in versioned SQL migrations. This is plain PostgreSQL, not a Supabase deployment.
Updates and recovery
Code changes are tested and committed locally. A Grants-only deployment broker builds an exact clean Git commit, backs up the database, replaces the app image, and checks public routes. If release checks fail, it restores the previous app release.
Grant-data publication uses a separate validated process. Database migrations and infrastructure changes are not part of an ordinary app release.
What stays private
Credentials, internal connection details, and private organization documents are not part of these public docs. The app does not store private organization context or require embedded AI inference, and it does not decide eligibility or submit grant applications.