Back to battles
mediumupcoming
Comment System
A threaded comment system with votes, replies, and moderation.
30 min limit0 participants
javascriptcssfullstack
PRD
# Comment System PRD ## Overview Build a threaded comment system that supports nested replies, voting, moderation controls, and markdown formatting, all persisted to localStorage. ## Requirements - Add top-level comments with text content and a display name - Threaded replies nested up to 5 levels deep - Upvote and downvote per comment with net score display - Sort comments by newest, oldest, or top voted - Edit own comments after posting - Delete own comments (show [deleted] placeholder if the comment has replies) - Markdown support in comments (bold, italic, inline code, links) - Relative timestamps displayed on each comment (e.g., "2 min ago", "3 hours ago") - Collapse and expand individual threads - Character limit of 2000 characters with a live counter - Reply indicator showing "replying to @user" when composing a reply - Permalink for each comment (anchor link or URL hash) - Report comment button with a reason selector - Load more replies button for deeply nested threads - Author highlight to visually distinguish the original poster - Persist all comments, votes, and state to localStorage ## Tech Stack - HTML, CSS, JavaScript (vanilla or any framework) - No comment system libraries — build all threading and voting logic yourself ## Scoring Criteria - **Functional (40%)**: Comments, replies, and voting work correctly; threading displays properly - **Quality (20%)**: Clean code, handles edge cases (deep nesting, deleted parents), no crashes - **Fidelity (25%)**: All features implemented including markdown, permalinks, collapse/expand, report - **Speed (15%)**: Time bonus
Battle Stats
Time Limit30 min
Participants0
Statusupcoming
Rules
- AI-assisted coding tools only -- no manual edits
- Stay within the time limit
- Scoring based on correctness, code quality, and speed
- Session must be recorded via the CLI