Skip to content

auxfix/hacker_news

Repository files navigation

Build Status Maintainability Test Coverage

Hacker News 💾

This is a simple news feed application that shows 10 random hacking news from the Hacker News API.

Main features 💿

  • React 18-based app
  • Redux/Redux-toolkit/redux-saga is used for the state management
  • it is a full CI/CD solution: if new code is committed in the master branch it will be built/linted/tested first and if these steps are finished successfully then it will be uploaded automatically to AWS S3/CloudFront
  • TypeScript
  • sass modules/styled-component for the styling
  • it has a decent test coverage > 70%
  • git hooks which runs linters and tests on every commit, which prevents problematic/not super beautiful code from slippering into the repository

folder structure 📁

This app has a standard redux structure with dedicated folders for components/redusers/actions/sagas. But these folder contains only code for the common functionality. All code specific for the particular features is contained in the feature subfolder with the corresponding name. Now this app has only one feature: news so it might seem like an overengineering solution, but it will help when the app will grow, so it will be a way easy to find files by their feature origin.

test coverage and bundle size 🔬

Test coverage and bundle size are calculated on every build, so we can control these values and see if they violate admissible thresholds

unit/e2e tests 🧪

Code is covered both with the unit and e2e tests. Unit tests check small pieces of functionality in the isolation and the e2e test runs the common scenario of viewing and updating news feed