Election night, 2024. The screen we’d spent months building to cover vote counting across Brazil goes dark — not our servers, not our code. A third-party .NET system, running on a machine we handed over but never had access to, buckles under the exact load it was bought to handle.

That’s the middle of this story. Brazil’s electoral authority — the TSE, short for Tribunal Superior Eleitoral, the body that runs every election in the country and publishes the raw data behind it — and I have met three times now, and each time the data, and what I was allowed to do with it, looked completely different.


2019–2020: first contact

The discussions started at the end of 2019; I was assigned to the project at the start of 2020, a junior dev with no idea what he’d signed up for. The task was to ingest TSE’s data on candidates and vote tabulation. What arrived was a mountain of JSON and CSV files with the internal coherence of alphabet soup.

Documentation existed, technically. It just didn’t agree with itself. A PDF described a field that a more recent video contradicted, and neither matched the columns actually present in the simulation data TSE provided — some of the fields described simply didn’t exist in the files. There was no schema to trust, only fragments to reconcile. I spent weeks reverse-engineering relationships between entities that no document laid out directly, dimensioning structures from evidence instead of specification.

I never finished it. Another challenge came up, in logistics and delivery, and I moved on before the project closed. I didn’t know it yet, but TSE and I weren’t done.


2024: the decision that wasn’t mine to make

New company, new election cycle. TSE’s documentation had genuinely improved — the simulated data was more consistent, the structure easier to reason about. This time the need was concrete: integrate candidate data for post-election coverage, and build the infrastructure to poll vote tabulation as it came in.

I argued for allocating two or three in-house developers to own it end to end. The company went with a third-party vendor instead. Worst call I watched get made. What we got was a .NET system we had no access to — not the code, only the database it produced — running on a machine we provisioned and handed over. Any change, any fix, meant sending an email and waiting on someone else’s goodwill to remote in.

On election night, it broke. Mid-event, during tabulation, the system we depended on for a screen we’d designed to cover results across the whole country simply stopped. That screen — gone, at the exact moment it mattered.

What saved the night was something I’d built on the side: automatic publication of “candidate elected” articles across every municipality and state, the moment results were final. The decision that mattered wasn’t the automation itself — it was tying publication to the “elected” flag instead of to live tabulation numbers. Live numbers move, get corrected, get contested. A flag is final. That distinction was the difference between publishing something true and publishing something you’d have to retract.

It generated a wave of traffic from across Brazil, coverage in municipalities no one on the editorial team could have staffed by hand, and it recovered real revenue on a night that was otherwise a write-off. It cost me some late nights and more cups of coffee than I’d like to count. The vendor’s system cost six figures and delivered a blackout.


2026: this time it’s different

Third encounter. This time the company didn’t hesitate — a team was assigned, a mandate was clear, and the scope was mine to own: ETL design, dimensional modeling from raw tabulated data, an API with resource discovery, and templates for editorial content built together with editors and journalists. Two people, documentation-first, tests from day one. By the time the frontend team came in to build screens, the backend was already tested, documented, and waiting — with a Prometheus telemetry dashboard already watching, ready for launch day.

Claude Code was part of how we got there in a two-person team, and I’ll get into what that actually looked like in the posts that follow.

This post is the context. The next two go into how it was actually built.