# A tracker that starts counting pledges the day after the election

> Nobody tracks whether campaign pledges are kept during a term. I built a web service that splits official election-commission pledge books into individual pledges, judges each status against official press releases, and publishes it with evidence links and change history.

- Published: 2026-11-11
- Client: Personal project (based on public data)
- Role: Design, data structuring, implementation, deployment
- Period: 2026-10-21 ~ 2026-11-10
- Stack: React, TypeScript, Mantine, Supabase, PostgreSQL RLS, pgTAP, GSAP, Playwright, Cloud Run
- Outcome: 6 officials, 227 pledges, 84 evidence links published (demo judgments)
- Tags: civic-tech, supabase, rls, data-curation

**Why**: Elections bring dozens of pledges, yet no one tracks whether they are kept during the term, and local pledges get no attention at all.

**Principle**: Without evidence, a pledge stays at not started. Consistent judgment rules matter more than filling in blanks.

## Metrics

| Metrics | Value | Scope | Source |
| --- | --- | --- | --- |
| Officials tracked / pledges / evidence links | 6 / 227 / 84 | Reproducible measurement | Counted directly from data/pledges/daegu-mayor-2026.json and data/pledges-extra/*.json (2026-11-10) |
| Elected officials list (searchable) | Metropolitan 16 + local 227 = 243 | Reproducible measurement | Officials list load run 2 times {"upserted":243,"metro":16,"local":227}, Development log (private) |
| E2E / DB policy tests (pgTAP) | 106 / 60 | Reproducible measurement | npx playwright test, supabase test db (local Supabase), Development log (private) |
| Production smoke E2E | 6 passed | Production measurement | tests/e2e/prod/smoke.prod.ts (public URL, 2026-11-10) |

## Links

- Demo: https://pledgetracker-1072416881206.asia-northeast3.run.app
- Repository: https://github.com/ilyos-numon/pledgetracker

## 1. Situation

Elections bring dozens of pledges, yet no one tracks whether they are kept during the term. The press covers a few big ones, and by the next election voters no longer remember what was promised. The goal: a resident seeing the site for the first time can say within 5 minutes which of an official's pledges got done, every judgment has a source you can click, and the page looks the same to supporters of any party.

## 2. Scoping

I left out whether a pledge is good or bad, party colors, and evaluative wording. Evidence candidates are collected automatically, but a person always decides what to accept and how to judge. Events, meetings, and petitions alone do not change a status, and no evidence means not started. Party played no role in choosing whom to track. I dropped payments and an admin screen for tracking requests. Statuses on screen are demo judgments based on public press releases, and every page says so in its header.

## 3. Build

| Category | What | Why |
| --- | --- | --- |
| Reused | Election commission pledge books and elected officials list, Supabase (auth, RLS), Cloud Run | Source material stays as published; infrastructure is managed |
| Changed | Officials list contract: metropolitan 17 → 16 | The real source had 1 official for a merged special city |
| Built | Pledge-level structuring, status/evidence/change-history pages, disputes, write paths behind DB functions | Every status change records an evidence link and a one-line reason |

## 4. What broke

**There were not 17 metropolitan heads.** The schema fixed 17 metropolitan regions as a contract, but the source data had 16 winners. Instead of forcing the data to fit, I treated the merged region as one metropolitan unit and changed the contract, keeping a record of the old version. Now validation fails if the metropolitan count differs from the contract, so any change to the list shows up immediately.

**Every Busan city domain returned 401.** The press release board, the city website, and the city council all returned the same block notice. I did not work around it or substitute material outside the rules. I entered 28 pledges as not started with "evidence unverified (outside review scope)" and stated this on screen and in the README.

**It looked like infinite loading.** With the network cut, the number fields seemed frozen. The cause was normal behavior: supabase-js retries a GET 3 times before returning an error. I left the code alone and added 2 tests that prove that behavior.

## 5. Results

| Metric | Value | Scope | Source |
| --- | --- | --- | --- |
| Officials tracked / pledges / evidence links | 6 / 227 / 84 | Reimplementation (demo judgments) | Counted from data files |
| Judgment distribution | In progress 77 · not started 150 · fulfilled, modified, abandoned 0 | Reimplementation (demo judgments) | Counted from data files |
| Elected officials list | Metropolitan 16 + local 227 = 243 | Reimplementation | Same result over 2 loads |
| E2E / pgTAP | 106 / 60 | Reimplementation | Development log (private) |
| Production smoke E2E | 6 passed, 0 production DB writes | Production | Public URL, 2026-11-10 |

## 6. If I did it again

Judgments rest only on official press releases, so council minutes and budget documents need to be added. LLM extraction had no API key, so all 6 officials were structured by hand and the pipeline has only passed fixture tests; I would verify it with real calls. The first thing to do is the 5-minute comprehension test with residents seeing it for the first time. I have not done it yet.
