# Pollux: Let's explore Nigerian political sentiment

> Source: <https://dev.to/akcumeh/pollux-lets-explore-nigerian-political-sentiment-ifo>
> Published: 2026-07-14 01:43:07+00:00

*This is a submission for Weekend Challenge: Passion Edition*

**Pollux** is an anonymous, real-time tracker of Nigerian political sentiment. Pick any of 52 politicians, national or state level, and vote *support*, *undecided*, or *oppose*. Leave a short comment saying why. Watch the tally move live, see how the country breaks down across all six geopolitical zones, and read a neutral, AI-generated briefing on who the person is and what's being said about them right now.

I built it because Nigerian political discourse online is loud, fast, and hard to read. Twitter tells you who's shouting. It doesn't tell you what the quiet majority actually thinks, or whether the loudest voices are representative of anything at all. Pollux is my attempt at a calmer instrument: no accounts, no follower counts, no badges, no clout scores. Just a vote, a reason, and a running tally you can watch move in real time.

The goal was never a "who's winning 2027" scoreboard. I wanted a public ledger of how much Nigerians *care*, one that admits what it doesn't know instead of pretending. When a politician hasn't crossed the minimum sample, Pollux withholds the number rather than inventing one.

Live app: [pollux-ng.vercel.app](https://pollux-ng.vercel.app)

*[drop a short screen recording or a couple of screenshots here. The live tally updating and a detail page with the AI briefing and temperature gauge open make the strongest visuals]*

Anonymous, real time tracker of Nigerian political sentiment. Vote support, undecided, or oppose on politicians across all 36 states, comment, and explore live rankings and regional insight. Numbers below the minimum sample are withheld, never invented, and everything a machine wrote is labeled.

A single Vercel deployment serves both halves:

`src/`

is a vanilla TypeScript + Vite frontend. Pages render as template strings, event handlers attach to `window`

. No framework.`api/`

is the backend: Vercel Node serverless functions (`cast-vote`

, `moderate-comment`

, `ai-insights`

, `briefing`

, `report-comment`

). They hold the Supabase service role key and the Gemini key, enforce vote cooldowns and daily limits server side, and are the only thing that ever calls Gemini (`gemini-2.5-flash`

, via `@google/genai`

).`supabase/migrations`

holds the schema. The client only ever reads tables directly with the anon key; every write…A single Vercel project serves everything. `src/`

is a **vanilla TypeScript + Vite** frontend. No React, no Vue, no framework at all. Pages render as template strings and event handlers attach to `window`

. I went framework-less deliberately: the app is mostly read-heavy dashboards, the bundle stays tiny, and I wanted full control over what hits the network and when. The entire project has exactly two runtime dependencies: `@supabase/supabase-js`

and `@google/genai`

.

`api/`

is a handful of Vercel Node serverless functions: `cast-vote`

, `moderate-comment`

, `ai-insights`

, `briefing`

, and `report-comment`

. This split is the backbone of the whole trust model:

`api/`

, which holds the service-role key.Supabase is just Postgres plus Realtime for me. Postgres triggers auto-recount the vote aggregates on every insert, update, and delete, and Realtime subscriptions push fresh tallies to every open tab. Nobody refreshes; the numbers just move.

This is the part I care most about, and it shaped almost every decision:

`src/lib/constants.ts`

, imported by This is where Gemini earns its keep. I use ** gemini-2.5-flash** via

`@google/genai`

, the only model in the stack, and it never runs in the browser. The `GEMINI_API_KEY`

lives only in server-side env and is referenced exclusively by `api/`

.`clean / abusive / spam / incitement`

before it's stored, using structured JSON output with a strict response schema at temperature 0.2. Strong political disagreement is explicitly All three are **cached and resilient**: insights live for 10 minutes (or until 5 new comments land), briefings for 24 hours, and if a regeneration call fails, the last good cached version is served rather than erroring in the user's face.

The theme is **Passion**, and Pollux measures it literally. The temperature gauge on every detail page doesn't tell you who's winning; it tells you how much heat a debate is carrying. The component in my codebase is even called `passionMeter`

.

Nigerians are among the most politically passionate people anywhere. We argue about governors in barbershops, dissect ministerial appointments in family WhatsApp groups, and turn every election season into a national obsession. What we've never really had is an honest instrument for that passion: something that captures the intensity without the noise, the shouting matches, or the bot armies. Pollux is my attempt to give that energy a place to register, one anonymous vote and one 280-character reason at a time, and to render it back as something the country can actually read.

The anonymous model is a feature (low friction means more honest votes), but it means I lean entirely on rate limits and moderation to keep things sane. After the challenge, I want to explore:

**Best Use of Google AI.** Gemini 2.5 Flash runs three distinct, load-bearing jobs in Pollux:
