0% found this document useful (0 votes)
13 views2 pages

Your Task Is To Build A Comment System From Scratch

Uploaded by

apurba.sarker.as
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Your Task Is To Build A Comment System From Scratch

Uploaded by

apurba.sarker.as
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Your task is to build a comment system from scratch.

App flow
 The app can have 5-10 static pages (like blog posts)
 Each page will have the ability to add comments to it
 Logged-out users can only view comments

Logged-in users should be able to


 Add comments to a page
 Reply to other comments on that page
 Upvote/Downvote comments of other people
 Edit their comment within 5 minutes of creation
 Delete their comments

Other considerations
 There can be replies to the reply of a comment.
 Top-level comments are the comments made directly on the page (and not as replies to
any other comment)
 Maximum five levels of replies can be there on a top-level comment (comment <- reply
<- reply <- reply <- reply <- reply)
 Deleting a comment should not delete its replies. We can show that "This comment was
deleted" instead of the original comment.
 For each top-level comment, the total sum of all replies to it (including nested replies)
can be at most 50.

Extra features
These are some of the additional features you can work on if you wish to.
 Logged-in users should be able to
o Report comments made by other people. If five unique users report a comment,
the comment will be hidden. Instead of the comment, a message can be shown,
like "This comment is hidden because of spam."
 Any user who has received a sum of 10 upvotes on their comments becomes a
moderator.
 A moderator has special permissions to
o Edit anyone's comment. The 5-minute limit doesn't apply to the moderators.
o Delete anyone's comment. The comment text can show "This comment was
deleted by a moderator."
o Hide anyone's comment. Hiding a comment should not hide its responses. Again,
this will show "This comment is hidden by the moderator."

Tech Stack
 Frontend - React
 Backend - PHP Slim framework
 Database - MySQL
 For CSS, you can use any available framework, like Bootstrap or Material UI.

We believe these are all simple technologies and any sufficiently motivated person can learn
enough about them in a few days to build a project. You are not allowed to use any other
frontend/backend/database technology for this assignment.

Note that you have to build backend APIs that interact with the database. It is okay if you are not
able to finish with all the features. But please be mindful that the features which you do build,
work as expected.

We also expect you to deploy whatever portion of your app is finished.

Helpful resources to learn these technologies


 https://www.sololearn.com/Course/PHP/
 https://www.slimframework.com/docs/v4/
 https://www.mysqltutorial.org/mysql-basics/
 https://reactjs.org/community/courses.html

Helpful Resources For Deployment


 Deploying React with Zero Configuration | Heroku
 Tutorial: Install a LAMP web server on Amazon Linux 2 - Amazon Elastic Compute
Cloud)
 Setting Up LAMP on Compute Engine
 Tutorial - Deploy LAMP on a Linux virtual machine in Azure - Azure Virtual Machines

Judging criteria
Your application would be judged based on the following parameters:
 The functionality and Usability of the Application - 45%
o How well do you build all the required functions
 Application Code Quality - 45%
o Using best practices while writing code and structuring files.
 The UI and look and feel - 10%

If you have any questions related to the assignment, mail us at [email protected]

Instructions to Submit
Create a private GitHub repository of your code and add “codechefdevs” as a collaborator to it.

Submit your assignment at this link:


https://www.codechef.com/careers/sde-intern-2023/assignment

You might also like