Answer by freny07pethelis1996
name: Top posts in a workspace
overview: "Atlassian-style design: top-N Confluence pages and blog posts in one workspace, scored from views, likes, and comments over 24h, 7d, and 30d."
isProject: false
Top-N posts in a workspace
Atlassian-style system design. Reuse identity, the page/blog record, comment create/delete, and the access-control check. This design owns engagement events, the score, and GET top-N. It does not redesign the editor or the comment thread.
Interactive board: Top posts (repo). Cursor live board: top-posts.canvas.tsx.
Pattern (same as comments and the image crawler): lock decisions → size the write → one concrete workspace → APIs → schema and SQL → the read that stays fast → duplicates, late events, backfill → scale, failure, observability.
The worked example is workspace ws_acme. Page Q3 roadmap is post p_4401. Incident review is p_4402. Handbook is p_4403. User u_9 is a member who can read all three.
How to read this
Each fact has one home. Later sections use that fact. They do not redefine it.
| Section | What it owns |
| --- | --- |
| §0 | Locked product decisions |
| §1 | Rates, store sizes, SLOs, and the worked scores |
| §2 | Planes, and why Kafka, PostgreSQL, and Datadog |
| §3 | The formula, the rolling windows, and a second ordering |
| §4 | The HTTP contract, bots, and the two sequences |
| §5 | How a record becomes a score: partitions, flush, hour close, ageing |
| §6 | Tables, Redis keys, and every command. §6.7 is the command catalog |
| §7