Case Studies/Requiems API
Case Study

Requiems API

A production API platform that unifies email validation, location, finance, and utility APIs under a single key. Built as a multi-language monorepo with Go, Rails, and Cloudflare Workers.

Overview

Requiems API is a developer-facing API platform. One API key gives access to a growing set of categorized APIs — email validation, geographic data, financial utilities, text processing, and technology tools. The goal is to eliminate the sourcing, validation, and infrastructure overhead that comes with integrating multiple third-party data sources.

The platform includes a public-facing API (via a Cloudflare Worker gateway), a developer dashboard (Rails), a key management service, and a high-performance Go backend that handles all business logic.

Problem

Developers building real applications need access to reliable data APIs — email validation before user registration, timezone data for scheduling, currency rates for billing. The status quo is integrating five different APIs with five different SDKs, auth schemes, rate limit policies, and reliability profiles.

The technical challenge here was multi-dimensional: a single platform serving different API categories with different data characteristics, an auth layer that's fast enough to not add perceptible latency, and a management interface that doesn't require a full SPA deployment.

Solution

We chose a polyglot monorepo. Go handles the API core — it's fast, compiles to a small binary, and the concurrency model fits high-volume request handling. Rails handles the developer dashboard — it's batteries-included for admin UIs and Hotwire means no separate frontend build pipeline. Two Cloudflare Workers handle the public edge: one for auth and rate limiting, one for key management and analytics.

pnpm workspaces manages the JavaScript services. Docker Compose orchestrates the full stack locally — Go API, Rails, both Workers (via Wrangler), PostgreSQL, and Redis — from a single command.

Architecture

Go API

Core business logic

Chi router, pgx driver (jackc/pgx v5), golang-migrate for schema management, Sentry for error tracking. All API categories (email, location, finance, text, technology) are domain-separated. Fast, stateless, horizontally scalable.

Auth Gateway

Public edge entry point

Cloudflare Worker built with Hono. Handles API key validation, rate limiting, and request proxying to the Go API. Cloudflare D1 tracks usage per key. OpenAPI spec generated from route definitions. This is the only service exposed publicly.

API Management Worker

Internal key + analytics service

Second Cloudflare Worker for key issuance, usage exports, and developer analytics. Swagger UI is served directly from the Worker for interactive API exploration. Not publicly routed.

Rails 8 Dashboard

User and admin UI

Rails 8.1 with Hotwire (Turbo + Stimulus) for reactive pages without a separate frontend build. Tailwind CSS for styling. Used by developers managing keys and by admins monitoring usage. PostgreSQL via ActiveRecord.

Performance & scaling decisions

Auth at the edge, logic in Go

The Cloudflare Worker validates API keys and checks rate limits before a request ever reaches the Go API. D1 (SQLite at the edge) handles usage counters. This separation means the Go API only processes authenticated, rate-checked requests — it doesn't touch auth overhead.

Redis for hot-path caching

Geographic lookups and financial data responses that are expensive to compute or unlikely to change within a time window are cached in Redis. The Go API handles cache-aside logic per API category with independent TTLs.

Domain isolation in Go

Each API category (email, location, finance, etc.) is a separate domain package. This makes it straightforward to scale, test, or replace individual API categories without touching the others. The router wires domains together — it doesn't contain business logic.

Rails without a SPA

Hotwire (Turbo + Stimulus) gives the dashboard real-time page updates without shipping a React app. The Rails server renders HTML; Turbo handles partial page replacement over websockets or fetch. This simplifies the deployment and removes the need for a separate frontend build.

API categories

Validation

Email validation, disposable detection, MX lookup

Places

Cities, postal codes, timezone, geocoding, holidays, working days

Finance

Currency, exchange rates, financial data utilities

Text

Formatting, transformation, parsing utilities

Technology

QR code generation, password utilities, user agent parsing

Networking

IP lookup, DNS resolution, network utilities

Health

Health data utilities and calculations

Entertainment

Entertainment data and discovery APIs

Stack

API runtimeGo 1.26 — Chi router, pgx v5, golang-migrate
CachingRedis (go-redis) — response caching, rate limit counters
Edge workersCloudflare Workers — Hono framework, TypeScript, Zod
Edge storageCloudflare D1 (SQLite) — usage tracking per API key
DashboardRails 8.1 — Hotwire, Turbo, Stimulus, Tailwind CSS
DatabasePostgreSQL — shared between Go API and Rails dashboard
Monorepopnpm workspaces, Docker Compose for local development
ObservabilitySentry (Go), structured logging, Biome for TS linting

Results

8 API categories

Unified under one key, one SDK, one billing relationship

Edge auth layer

Key validation and rate limiting happen before requests reach Go — minimal latency overhead

Full dev tooling

Dashboard, key management, usage analytics, and Swagger docs — all shipped

Need a backend like this?

API platforms, multi-service architectures, Go backends — let's talk about what you're building.