https://github.com/tkrotoff/marvelheroes
Web app that displays characters from Marvel comics
https://github.com/tkrotoff/marvelheroes
babel bootstrap jest playwright react react-testing-library typescript
Last synced: about 1 month ago
JSON representation
Web app that displays characters from Marvel comics
- Host: GitHub
- URL: https://github.com/tkrotoff/marvelheroes
- Owner: tkrotoff
- License: mit
- Created: 2018-05-29T16:39:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-03T00:35:44.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T07:10:55.500Z (7 months ago)
- Topics: babel, bootstrap, jest, playwright, react, react-testing-library, typescript
- Language: TypeScript
- Homepage:
- Size: 3.43 MB
- Stars: 53
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Marvel Heroes
[](https://github.com/tkrotoff/MarvelHeroes/actions)
[](https://codecov.io/gh/tkrotoff/MarvelHeroes)
[](https://codeclimate.com/github/tkrotoff/MarvelHeroes/maintainability)
[](https://codeclimate.com/github/tkrotoff/MarvelHeroes/test_coverage)
[](https://github.com/prettier/prettier)
[](https://github.com/airbnb/javascript)http://marvelheroes.s3-website.eu-west-3.amazonaws.com/ [1]
Very simple React app that displays the Marvel characters thanks to https://developer.marvel.com/
- 2 pages: list of heroes + details of a hero
- Implementation is 400 LOC (+ 700 LOC of tests)
- Unit/integration tests written in react-testing-library & Jest
- E2E tests written in Playwright
- [W3C validator](https://validator.w3.org/) completedI use this app as a boilerplate and to demo some JS web app best practices.
1. No HTTPS, no gzip, no cache...
### List of heroes: HeroesPagination/Heroes component screenshot

### Details of a hero: Hero component screenshot

## How to run
```
npm run start:stubs
open http://localhost:8080
``````
npm run start:marvel.com
open http://localhost:8080
```## Libraries used
- React with hooks
- No Redux, just `useState()`
- TypeScript with `strict: true`
- Babel with `@babel/preset-typescript`
- Jest + react-testing-library + Playwright => 100% code coverage
- Fetch API
- React Router
- Prettier + ESLint + stylelint
- Bootstrap 5 + Purgecss
- Google Lighthouse