Publish the First Post
Easy About 20 min Free with an account
A social prototype writes posts from the browser and hides follows in a JSON column. Put a trusted Post API in charge, with content in the Post Store and relationships in their own Social Graph.
The brief
The social app's first version writes posts from browser code directly into a table, and it keeps each user's follow list as a JSON array stuffed into the same table. A modified client can impersonate another author, follow someone on their behalf, and set impossible visibility values; and because follows hide inside post rows, nothing can ever query "who follows Ana" without scanning everything.
A social network has two primitive writes, and they are different data. A post is content: authored once, read by many. A follow is a relationship: an edge between two people, written on its own schedule, and the thing every future feature (the home feed above all) will need to query by both ends. Give each its own store, and one API ownership of both.
Drag components from the palette, wire the interactions, and Check the design.
- Place an API gateway and Post API between the client and all storage.
- Publishing: Social Client → API Gateway → Post API → Post Store.
- Following: the same path into the Social Graph, a separate store for the relationship edges.
- Remove every direct client-to-store line; identity and relationships are integrity facts.
The topology is deliberately bounded. Choose the responsibility and interaction pattern, not a cloud vendor or product SKU.
How it is graded
You build the design on a canvas, and Katabench checks the topology against the challenge's design rules.
What it practices
- Stateless app tier
- Route clients through a trusted, horizontally scaled app tier behind a load balancer.
Related katas
- Route Through the App Easy Free with account Build a safe three-tier request path that keeps clients away from the database.
- Scale the Web Tier Easy Free with account Put a stateless app tier behind a load balancer and remove its single point of failure.
- Accept Notification Requests Easy Pro A campaign tool writes delivery rows from the browser and broken template references explode at send time. Put a Notification API in charge that resolves every template at intake.
- Establish a Chat Session Easy Pro A prototype lets mobile clients write messages straight to storage. Introduce a trusted real-time gateway and chat service before scaling connections.