Skip to content

Marvel API frontend implementations - localStorage, SWR, offline, responsive, unit tests, e2e, ci/cd

Notifications You must be signed in to change notification settings

osmarpetry/earth-1999

Repository files navigation

Earth-1999

This application is hosted at https://earth-19999.web.app.

What's this application is about?

It's a React.js web application from the open Marvel's comics API

What this application has

  • Storybook
  • Visual tests on Storybook with Chromatic
  • Unit Tests using @testing-library
  • E2E Cypress with Cucumber (BDD) tests
  • Typescript
  • SWR
  • Hosting on Firebase
  • Sentry for error tracking
  • CI/CD with Travis-CI
  • Responsive
  • Loading, empty, and error states

What's the roadmap?

  • Storybook with more uses cases
  • Move the container component to the Storybook. For in the container just do the API calls and handle the local storage. It would make it easier to take care of screen states and responsivity
  • Better unit tests
  • Better E2E tests
  • React.lazy for just import the component if it's necessary (have data available to show)
  • Be a PWA

How to contribute to the project

To help, it is necessary to do the project setup, as instructed in the sub-topics below. However, it is necessary to first execute the fork of the application in the way is quoted in the following image:

Fork button on Github

Dependencies for installation You must have a version installed on your operating system, should choose the latest LTS version.

Search for the latest NodeJS  LTS version- https://nodejs.org/en/

The code can be edited in any text editor, however, we recommend using the Visual Studio Code. Because it has several extensions that aid in the development.

Visual Studio Code open

Installation

Should do the download of the code using git, the code should be the fork you made earlier. Use the following command:

git clone https://github.com/YOUR_GITHUB_USER/earth-1999.git

Now navigate to the page and install the dependencies with the following command:

npm install

Finally, you can upload the project with the following command:

npm start

Then you will have access to the project in your browser, at the address: http://localhost:3000/

Heroes list web page

Hero details web page

Making PR to my branch Pull Request must be done by comparing the branch on your fork to my master branch. As you can see in the following image:

Branch comparison from master to the fork

About

Marvel API frontend implementations - localStorage, SWR, offline, responsive, unit tests, e2e, ci/cd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published