/ta-hacker-news

Test Assignment (Avito)

Primary LanguageJavaScript

Hacker News

test Netlify Status

The test assignment is an interface for the Hacker News website, consisting of two pages.

Local Run

npm install
npm run dev

Product requirements

Home page

  • Shows news as a list sorted by date, most recent at the top
  • Infinite roll is implemented
  • It is possible to filter news by New, Top, Best
  • Saves the news filter to local storage
  • Each news contains:
    • title
    • rating
    • author's nickname
    • date of publication
    • number of comments
  • Clicking on a news item takes you to the news page
  • The list of news should be automatically updated every 5 minutes without user's participation
  • There should be a button on the page for forced updating of the news list

News page

  • Should contain:
    • news link
    • news headline
    • date
    • author
    • comment count
    • the last 25 comments in the form of a tree
  • Root comments are loaded immediately when you enter the page, subcomments — by clicking on the root comment
  • The page should have a button to return to the news list

Technical Requirements

  • React
  • React Router
  • Redux Toolkit + React-Redux
  • Ant Design
  • Vitest + React Testing Library + Mock Service Worker
  • Vite
  • npm
  • Netlify
  • CI
  • Hacker News API

Additional libraries

  • axios
  • lodash (._debounce())
  • p-limit (Run multiple promise-returning & async functions with limited concurrency)
  • uuid (v4)