
Case study Personal project
A public record of any Brazilian candidate, with the official source behind every number.
- Client
- Personal project
- Type
- Civic data tool
- Role
- Fork, redesign & front-end features
- Year
- 2026
01Overview
A read-only web app over a 12 GB SQLite database built from official sources (the Superior Electoral Court, the Federal Revenue Service and the Transparency Portal): candidacies from 2014 to 2026, campaign donations and expenses, declared assets and alert signals, organised by person, with the file, URL, collection date and SHA-256 of each record one click away. It is a fork of EloSys, an open-source project; my part was the new identity, the front end and the features around it.
02The problem
Brazilian electoral data is public, but it is spread across yearly ZIP files of more than a gigabyte each, in different layouts. Putting one candidate's history together means downloading, joining records by CPF and CNPJ, and then trusting a number without being able to say where it came from.
02The approach
Keep the data pipeline and rebuild what the reader touches. EloSys's collectors store every record with a provenance chain back to the original file and its hash, and the web app opens the database read-only. I renamed the project, gave it a sober civic look in place of a dark dashboard, and added the tools people reach for when they research someone: favourites, side-by-side comparison, export, sharing and printing.
03The build
What was actually built
- 01
A new visual system applied to every page: a light theme by default with a dark one, Public Sans and IBM Plex Mono, a magnifier-and-check logo, a redesigned sidebar and top bar, and a phone layout with a slide-out menu that respects reduced motion.
- 02
Favourites on any record (candidate, CPF or CNPJ) pinned to the sidebar, and recent searches with keyboard navigation in the existing Ctrl K search palette, all kept in the browser with no account.
- 03
A comparison page for up to three candidates: candidacies, donations, electoral fund, contracted and paid expenses, declared assets and alert signals, with proportional bars and a shareable link. Plus CSV export on every table, one-click copy of CPF and CNPJ, link sharing and a print layout.
- 04
An in-memory cache for the heaviest aggregations, the declared-assets ranking and the top suppliers across all years, which took up to about a minute on the full database, with a warm-up script and a LAN start mode so others on the same network can use one machine's copy.
Technology
- Next.js
- React
- TypeScript
- Tailwind CSS
- SQLite
- better-sqlite3
- React Flow
- Python
04The experience





05Where it stands
Runs locally against the downloadable database (about 12 GB once extracted); not deployed publicly. The collectors, detection rules and provenance model come from EloSys. Alert signals are leads, not proof.
