A Simple Hackernew Clone created using Nodejs + Expressjs + MongoDB and Deployed in Heroku.
Why Nodejs, Expressjs and MongoDB ?
Because I Love Javascript. Due to the growing interest in Javascript and MEAN(without angularjs) stack which is used for fast prototyping app, i decided to move with nodejs.
MongoDB Collections used:
To keep it simple i have only used three collections.
- Users: { username, password(hashed), time(account creation time) }
- Posts: { url, title( scrapped from the page), username( who posted the link), time }
- Userupvotes: { username, postid } [ This collections stores the list of users who have upvoted the posts ]
TODO:
- Fix upvote bug.
- Create root user who can be provided with stats for each posts and users actions.
- When some posts a link which has been posted some time ago( can be configured) suggesting already posted message.
- Provide Unit test.