Project / MERN stack / Social
Community Hub
A social platform with profiles, posts and threaded discussions.
- Year
- 2024
- Role
- Full-stack developer
- Type
- Social
- Stack
- MERN
Tech stack
- React
- Node.js
- Express
- MongoDB
- Redis
01 / Overview
Overview
A community app featuring profiles, a ranked feed, threaded comments and notifications, designed to stay performant as content grows.
02 / The problem
The problem
A growing group lived in a chat that moved too fast. Good answers were buried within a day, and newcomers could not find anything.
03 / My approach
My approach
Profiles, a feed and threaded replies, in that order. The feed is ranked by recent activity, and the busiest queries are cached in Redis so the page stays quick as the content grows. Moderation tools came before launch, not after.
04 / Key features
Key features
- Profiles with posts and activity
- Ranked feed with infinite scroll
- Threaded comments
- Notifications with read state
- Report and moderation tools
- Search across posts and people
05 / Challenges & learnings
Challenges & learnings
- 01
Infinite scroll that stays correct
Page numbers break when new posts arrive. I switched to cursor-based pagination, so loading more never repeats or skips a post.
- 02
Deep comment threads
Loading a thread with hundreds of replies in one go was slow. Replies now load a level at a time, with a "show more" at each branch.
- 03
A feed that does not repeat itself
Caching helped speed, but stale lists confused people. Cache entries are cleared when someone posts or replies.
06 / Gallery
Gallery
Click an image to enlarge it.