Giter Site home page Giter Site logo

tjf91 / nested-comments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sunny0910/nested-comments

0.0 0.0 0.0 299 KB

Demonstration of nested comments functionality often used in Social or Collaborative applications like Instagram, Facebook, Reddit etc

Home Page: https://nested-comment.herokuapp.com/

JavaScript 91.58% CSS 3.98% HTML 4.43%

nested-comments's Introduction

Nested/Threaded Comments

A NodeJs application which uses MongoDB to store nested/threaded comments. User Comments can be one of the primary things in any Social or Collaborative website. The applications like Instagram, YouTube, Reddit etc have great implementations of User Comments.

Techincal Specifications

  • The Backend is a REST API built in ExpressJs which is an MVC web-application framework for NodeJs.
  • MongoDB is used as the NoSQL Database along with ExpressJs in the backend Rest API. Mongoose, a MongoDB ODM(Object Data Mapper) has also been used along with MongoDB in the database layer.
  • The Frontend is built using ReactJs along with React-Router and Material UI as component library.

Project Specifications

  • Home page has a demo post where users can add their comments.
  • Users can Add a new comment or reply to an existing comment.
  • Users can also Edit their own comment
  • Their can be no limit to the nesting of comments, but ideally, for the optimum performace and better user experience, I added a restriction to the depth value of nesting comments as 4.
  • For Instance, Instagram only allow one level of reply to a comment, that is nesting level of 2 (parent, one-child)

Requirements

  • Express 4.x
  • MongoDB 3.x
  • Mongoose 5.x
  • Node 8.x
  • React-Router 5.x

Installation

Clone the repository and Run the following commands in the terminal:

  • npm run install_all (This will install the server's and the client's dependency packages)
  • npm start (This will start the backend server. Alternatively, you can also run npm run start_dev to start the server with nodemon, which will look for the changes in the files and restart the server everytime)
  • cd view && npm start (This will start the Frontend React application for Dev Environment. For Production, run npm build to build the FrontEnd for deployment)

About

Examples of Threaded Comments?

Hacker News

How to store Threded Comments?

Threaded Comments are basically hierarchical data, with parent & child relation.
Their are bunch of ways to store the hierarchical data in Relational/non-Relational database

References

nested-comments's People

Contributors

sunny0910 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.