This project fetches data from the Rick and Morty API and displays it in an interactive interface. It generates a navigation menu filtering through the 3 types of data (characters, locations and episodes). It has pagination in each of them and a search input to filter by name.
App: beatrizsmerino.github.io/rick-and-morty
Documentation: beatrizsmerino.github.io/rick-and-morty/jsdocs
rick-and-morty/
βββ assets/
β βββ css/ # Compiled CSS styles
β βββ favicon/ # Favicon files
β βββ icomoon/ # Icon fonts
β βββ images/ # Project images
β βββ js/ # JavaScript files
β βββ scripts.js
βββ jsdocs/ # JSDoc generated documentation
βββ README/
β βββ images/ # README screenshots
βββ .husky/ # Git hooks
βββ jsdoc.json # JSDoc configuration
βββ package.json
The Rick and Morty API is an open API, no authentication is required for use. Nonetheless, to prevent malicious usage of the API there is a limit on the number of requests a given IP address can make. This limit is 10000 requests per day. If you happen to hit the limit you'll receive a 429 status (Too Many Requests) on all your requests during a period of 12 hours.
{
"characters": "https://rickandmortyapi.com/api/character",
"locations": "https://rickandmortyapi.com/api/location",
"episodes": "https://rickandmortyapi.com/api/episode"
}If you have installed the Adblock browser extension, you must select 'pause on this website' for the app to work correctly.
If you need more API requests, you can use a VPN browser extension to change your IP address.
This project uses JSDoc to generate documentation from the JavaScript source code comments.
The documentation is generated from assets/js/scripts.js and exported to the jsdocs folder. It is published on GitHub Pages and can be accessed at beatrizsmerino.github.io/rick-and-morty/jsdocs.
Install all dependencies listed in package.json.
npm installRemove node_modules and package-lock.json to reinstall from scratch.
npm run install:cleanRuns automatically after npm install to run npm run lint on all project files.
npm run postinstallRuns automatically after postinstall to enable pre-commit and commit-msg hooks of Husky.
npm run prepareRun Prettier (prettier:fix), ESLint (eslint:fix) and Stylelint (stylelint:fix) to format and lint all project files.
npm run lintFormat CSS, JSON, YAML, JS and HTML files with Prettier.
npm run prettier:fixLint and fix JSON and JS files with ESLint.
npm run eslint:fixLint and fix CSS files with Stylelint.
npm run stylelint:fixGenerate documentation from JS source code comments with JSDoc.
npm run jsdocsThis project uses Husky for Git hooks and Commitlint for commit message validation.
All commits must follow the Conventional Commits specification:
type(scope): description
This project is licensed under the MIT License, which allows free use, modification and distribution. See LICENSE for details.

