Architecture

How the front end and the Rails API were split, and what that cost.

Tremr ran a Rails API behind a JavaScript front end, at a point when that was still an argument rather than a default.

The split

Rails handled persistence, auth and the feed queries. The client owned routing and rendering. The boundary was a JSON API, versioned from the start, which turned out to matter more than expected once the mobile client arrived.

What it cost

Two things bit hard. First, server-rendered HTML was gone, which meant search engines and link previews needed a separate path — a problem the industry spent the following five years solving properly. Second, the feed’s ranking logic wanted to live in both places at once, and keeping one implementation authoritative took real discipline.

Given the same brief now, the split would be the same and the rendering story would be completely different.