Stooky
My strongest system-design work. I designed the runtime shape of the system (which store owns what, how events flow, and what still works when a piece fails), then built product features on top of it.
live sim · stooky runtime · click to send traffic
swipe ⇆
Architecture decisions
AD-01
PostgreSQL is the source of truth
Connections go through PgBouncer with transaction pooling.
AD-02
Redis is an overlay, not an authority
It holds the profile cache, feed and Explore snapshots, suspension state and hot counters. A Redis miss or outage never fails a write that has already committed.
AD-03
Kafka is the behavior bus
Likes, impressions, watches, follows, searches and session events are emitted asynchronously, so the API never waits on the broker.
AD-04
Exposure is separated from engagement
Impressions, watches, skips and hides are much hotter traffic, so they get their own lag budget.
AD-05
Effectively-once counters
The counter consumer aggregates batches and stores its watermark in the same PostgreSQL transaction as the counter update, so a replay after a crash doesn't double-count.
AD-06
Compensate after commit
Redis is patched after the database commits, with overlay TTLs as the backstop.
AD-07
Kafka down ≠ API down
The API keeps serving. Counters may go stale until a reconciliation job repairs them.
Process roles
Staging and production run on a VPS with Docker and Nginx.
Operator dashboard · led
Led the Next.js operator dashboard: live VPS and database health over a socket, broadcast controls, a Content Security Policy, and an Authelia-protected login.
Built on top
- Ranked feed hydrated from snapshots and rank stats, with a caught-up state and recycled posts
- Redis-backed user suspension, plus privacy rules for seeded engagement on private accounts
- FCM push for comments, mentions, DMs and sign-in security alerts
- Broadcast campaigns with banner images and a live campaign socket
- Apple sign-in redirect into the app
- Cloudflare R2 for media
- PostgreSQL backup and restore
- Platform kill switches for voice and video
Stack