https://github.com/amalumian/ta-hacker-news
Test Assignment (Avito)
https://github.com/amalumian/ta-hacker-news
test-assignment
Last synced: 5 days ago
JSON representation
Test Assignment (Avito)
- Host: GitHub
- URL: https://github.com/amalumian/ta-hacker-news
- Owner: amalumian
- Created: 2024-08-13T20:18:41.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-06T18:02:53.000Z (10 months ago)
- Last Synced: 2025-03-16T16:51:45.524Z (3 months ago)
- Topics: test-assignment
- Language: JavaScript
- Homepage: https://ta-hacker-news.netlify.app/
- Size: 363 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hacker News
[](https://github.com/amalumian/ta-hacker-news/actions/workflows/test.yml) [](https://app.netlify.com/sites/ta-hacker-news/deploys)
The test assignment is an interface for the [Hacker News](https://news.ycombinator.com/news) website, consisting of two pages.
## Local Run
```bash
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](https://github.com/HackerNews/API)### Additional libraries
- axios
- lodash (.\_debounce())
- p-limit (Run multiple promise-returning & async functions with limited concurrency)
- uuid (v4)