Social network that connects people by shared interests
People find each other by what they are into: shared interests surface matches, and messages and notifications arrive the moment they happen — the same experience on a phone and on a desktop.
The challenge
Persice connected people to each other and to events around shared interests — and in a product like that, a message that arrives late is a conversation that never happens. Chat, matches and notifications had to land the moment they occurred, on the phone and on the desktop, from a codebase small enough for a startup team to keep moving.
Our approach
We started from the moment that matters: a message is sent and the other side sees it now. Chat, matches and notifications travel over websockets with pub/sub underneath, and one token-based authentication covers the websocket connection and the REST API alike. To keep two apps affordable for a small team, we built the mobile-first and the desktop app from one statically typed codebase — services, models and state stores written once — and kept both fast with async module loading and a tree-shaken build. Social login through Facebook, Twitter and LinkedIn took the friction out of signing up, and continuous deployment, backed by unit and end-to-end tests, put every change in front of users the same day.
The results
The startup got one product in two apps where messages, matches and notifications arrive the moment they happen — the same experience on a phone and on a desktop, and both kept moving at once by a small team for the two years we worked together.
What we did
- Built the two single-page apps — mobile-first and desktop — from one statically typed codebase, so services, models and state stores are written once and used in both
- Delivered chat, matching and live notifications over websockets, with a pub/sub layer underneath
- Covered REST and websockets with a single token-based authentication layer
- Connected social login for Facebook, Twitter and LinkedIn, so signing up takes one click
- Kept both apps fast with async module loading and a tree-shaken production build
- Set up continuous deployment to app servers behind a reverse proxy, with static assets on object storage
- Covered the codebase with unit and end-to-end tests, so every deploy went out without a manual check