Skip to content

kathesama/rick-and-morty-app

Repository files navigation


IntellijIdea ReactJS React Router Redux Yarn
Vercel ReactTable GraphQL Apollo-GraphQL TypeScript
ESLint Git
CodeQL
GitHub issues GitHub forks GitHub stars
GitHub last commit GitHub version commits GitHub top language
Maintained

GitHub license GitHub repo size

Rick and Morty Application


This project was created as a wonderful challenge, the idea was demostrate and integrate a wide family of actual technologies. It involves the consumption of the Rick and Morty API more exactly the Graphql Services of this API.

This application is running at rick-and-morty-app-kathesama.vercel.app Down below are detailed what technologies I have implemented and some very useful commands to run this.

NOTE: This is a responsive site

  • React
  • React Router
  • Typescript
  • Redux
  • React Table
  • Apollo Client + queries and lazy queries
  • SCSS
  • Storybook
  • Material UI
  • Eslint
  • Jest
  • Prettier
  • Git
  • i18next

Getting Started with Create React Application

This project was created with this command: npx create-react-app my-app --template redux-typescript This project was bootstrapped with Create React Application.

Available Scripts

Running:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Testing

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Another useful commands are with more detailed information output:

yarn test: open

yarn test: verbose

yarn test: coverage

Building

yarn run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Ejecting

yarn run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc.) right into your project. So you have full control over them. All the commands except eject will still work, but they will point to the copied scripts, so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However, we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Another very useful commands

Formatting code

yarn format

Checking errors and warnings

yarn lint:tsc

This command check for all warnings and errors in the code

yarn lint:eslint

This command check for all warnings and errors in the code with linter

yarn lint:fix

This command run linter and fix automatically the errors and warnings

Checking prettier

yarn prettier:check

yarn prettier:fix

Those commands run prettier and check prettify rules, instead this commands runs with yarn format so is not necessary run it.

Running Storybook

yarn storybook

Run storybook instance. Open http://localhost:6006/ to view it in the browser.

yarn build-storybook

Same as yarn build this command builds the documentation for storybook components, kind of swagger.

You can read more here. https://storybook.js.org/

Creating all the GraphQL schema and important stuff related with data.

yarn schema:download

This downloads the schema from the api graphql and store it on the src folder

yarn schema:generate

Every change you do to queries requires a schema update to reply those changes, this command will do that.

yarn schema:generate-watch

Same as the previous command but this keeps running.