CivicLens
Civic issue archive and public dashboard
The problem this had to solve.
Export civic issue rows from Supabase to content-addressed Storacha storage and make an archived dataset inspectable without requiring the source database.
The repository contains a credentialed Node.js exporter that fetches filtered civic issue rows from Supabase, serializes the data with archive metadata, and uploads it to Storacha content-addressed storage.
A separately deployed static dashboard reads an IPFS archive with gateway fallbacks, computes summary counts, and lets visitors search and filter the archived issue records. The evidence supports this archive-and-explore workflow, not a full municipal case-management platform.
Constraints
- The public dashboard is a static HTML, CSS, and JavaScript interface backed by archived/sample JSON, not the issue-submission application.
- The Node.js archival utility requires Supabase and Storacha credentials and an interactive Storacha email-authentication flow.
- Filtering and status statistics are client-side operations over the fetched archive.
How the system is put together.
Supabase issue rows
Credentialed, filterable PostgreSQL source data
sourceArchive exporter
Transforms issues and adds schema/source metadata
processStoracha / IPFS
Content-addressed JSON archive
processStatic dashboard
Gateway fetch, statistics, search, and filters
outputWhat was chosen, and what it cost.
Separate archival from presentation
- Choice
- Use a Node.js utility to fetch and transform Supabase rows, then upload a JSON archive that a static dashboard can read.
- Rationale
- The published dashboard can remain simple and read-only while the credentialed export process runs separately.
- Cost
- The repository does not implement report creation, assignment, SLA enforcement, or authenticated resolution workflows.
Use content-addressed storage
- Choice
- Persist exported issue collections to Storacha and expose their CID/IPFS URL as the archive reference.
- Rationale
- An export can be referenced independently of the mutable source database.
Keep exploration in the browser
- Choice
- Calculate status counts and apply search, status, priority, and category filters in the static page.
- Rationale
- The deployed view needs no application server for basic archive exploration.
How it was checked.
- The repository includes a connection script that exercises Storacha initialization, Supabase statistics, and an archive upload when valid credentials are supplied.
- The deployed Vercel homepage returns HTTP 200 and presents the static dashboard.
- The checked-in dashboard can fall back across multiple public IPFS gateways before using bundled data.
Where this stops being true.
- No automated unit, integration, accessibility, or end-to-end test suite is present; test.js is a live credentialed smoke script.
- Archive freshness depends on rerunning the credentialed exporter; the static dashboard does not continuously synchronize with Supabase.
- The static page bundles issue data, so repository contents must be reviewed for privacy before publishing new archives.
- Storacha availability, public gateway behavior, and source-database permissions remain external dependencies.
What it is built with.
Runtime & interface
- JavaScript
- Node.js
- HTML/CSS
Data & evaluation
- Supabase
- PostgreSQL
Infrastructure & providers
- Storacha
- IPFS