You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/top-stories — returns the top 10 stories ranked by score in the last 10 minutes (see instructions). Each story will have the title, url, score, time of submission, and the user who submitted it.
/comments — returns the top 10 parent comments on a given story, sorted by the total number of comments (including child comments) per thread. Each comment will have the comment's text, the user’s HN handle, and their HN age. The HN age of a user is basically how old their Hacker News profile is in years.
/past-stories — returns all the past top stories that were served previously.
Non-Functional Requirements
To prevent overloading the HN APIs — and from getting your server rate-limited and blocked by Firebase — implement appropriate caching so that all clients connecting to your server will see the same cached data for up to 10 minutes.
System Architecture
File Structure
hackernews-api
API Controllers
hackernews-db
DB configs
Migration files
Dummy Data file generator
hackernews-service
Business Logic(Service)
For interacting with controllers
For collection of data from third party API
(In this case HackerNews)