Accra, Ghana ·
All work
Case StudyReal-time financial data · 2022 - now

CediRates.

A real-time financial data platform with live FX rates and fuel prices across Ghana, built out of Accra by a small team and engineered to stay accurate and fast as traffic grows.

CediRates
Role
Software Engineer
Year
2022 - now
Stack
Next.js · Node.js · PostgreSQL
Status
Live
The constraint

Existing sources of FX and pump prices were slow, scattered, and frequently stale. The system needed to pull from unreliable upstream feeds and still serve fresh, consistent data at low latency.

The approach

A Next.js + Node service backed by Postgres and Redis, a v2 rewrite off an earlier document-store model when the access patterns outgrew it. The read path is tuned for latency, and the ingestion pipeline is built around retries and stale-while-revalidate so upstream flakiness never reaches the user. Instrumentation is first-class so regressions show up before they reach users.

Key decisions
Relational data needed a relational store
Every aggregate was a $lookup + $group chain. There were no foreign keys — a deleted company left its rate rows pointing at nothing, and duplicate fields drifted silently over time. The move to Postgres wasn't fashion; the data was genuinely relational and pretending otherwise was costing something every week.
Upserts as the default write path
Rate rows are keyed on the tuple (company, date, currency pair). A unique constraint on that tuple means scrapes overwrite the same row rather than stack duplicates. A separate timestamp records when the value actually changed, not just when the row was created.
Redis for exactly three things
Shared rate-limit counters across processes, short-lived OAuth exchange codes, and a hard startup check — nothing more. The hot read paths still hit Postgres directly. Postgres is fast enough, and what isn't built yet isn't described as shipped.
Outcome
~15K
monthly organic visitors (from ~800K search impressions)
~125ms
p95 latency on recent production traffic
1
EC2 instance running Redis + Postgres + Node
Resilient
ingestion (retries + stale-while-revalidate)
Tech stack
Next.jsNode.jsPostgreSQLRedisTypeScriptDockerAWS