Skip to content

sarapis/ctfg-build

Repository files navigation

ctfg-build

The developer landing site for the Civic Tech Field Guide — a static Next.js app documenting how to build on the world's largest curated civic tech dataset.

Three ways to access the data

API host: the directory API is currently served from https://staging-directory.civictech.guide during infrastructure migration. It moves to https://directory.civictech.guide at DNS cutover — update the base URL below accordingly.

MCP server

A hosted, read-only MCP server is live over Streamable HTTP (no API key):

POST https://staging-directory.civictech.guide/api/mcp

Tools: search_projects, get_project, list_categories.

Connect from Claude Code:

claude mcp add --transport http civictech-guide https://staging-directory.civictech.guide/api/mcp

From Claude Desktop / Cursor / any config-file client (bridge stdio → HTTP with mcp-remote; a native @civictechguide/mcp package is coming soon):

"mcpServers": {
  "civictech-guide": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://staging-directory.civictech.guide/api/mcp"]
  }
}

Once connected, your assistant can search listings, pull project detail, and traverse categories. Example queries:

  • "Find active govtech projects in Kenya"
  • "Open-source participatory budgeting tools"
  • "Who works on election integrity?"

REST API

Clean JSON over HTTPS. No key required for public reads. Base: https://staging-directory.civictech.guide

Method Endpoint Description
GET /api/v1/projects/search Search and filter listings (q, category, status, limit)
GET /api/v1/projects/:slug Single project detail
GET /api/v1/projects/export Bulk export, paginated
GET /api/v1/categories Category index + counts
GET /api/v1/facets Filter option values
curl "https://staging-directory.civictech.guide/api/v1/projects/search?q=participatory+budgeting&limit=5"

Showcase

Apps already running on the dataset:

Code & examples

Open-source packages are being prepared for release (coming soon):

Package What it is
@civictechguide/mcp Native one-line MCP server (npx) — until it ships, use mcp-remote as above
api-examples Copy-paste fetch snippets in curl, Python, and JS
data Export scripts and JSON dumps of the full directory
notebooks Jupyter notebooks for analysing the dataset

Getting started

npm install
npm run dev

Opens at http://localhost:3000.

Building

npm run build

Output goes to out/ as a fully static export. If the site is deployed at a sub-path:

NEXT_PUBLIC_BASE_PATH=/your-path npm run build

Stack

  • Next.js 16 with output: "export" (static)
  • React 19
  • TypeScript
  • Tailwind CSS v4
  • Google Fonts: Space Grotesk, Archivo, Inter

License

The Field Guide dataset is CC BY 4.0 — free to use and adapt with attribution.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors