Welcome to the Rick & Morty Application! This application allows users to explore the Rick & Morty universe by viewing locations, characters, and episodes.
This project is built using the following technologies:
-
Frontend:
- Next.js
- Tailwind CSS
-
Component Library:
- DaisyUI
Ensure the following are installed on your machine:
- Git
- Node.js (>=v18)
- Yarn
The project structure is organized as follows:
rick-and-morty-app/
|-- components/
|-- pages/
|-- styles/
|-- public/
|-- ...
|-- README.md
|-- initial wireframe.png
- components: Contains React components for various UI elements.
- pages: Next.js pages for different sections of the application.
- styles: Tailwind CSS styles for styling the components.
- public: Public assets, including images.
-
Pros:
- Well-documented and widely used in the industry.
- Single server for client-side and server-side rendering.
-
Cons:
- New app router might not fulfill all requirements.
-
Other Notes:
- The developer chose to test the new app router functionality.
-
Pros:
- Reduces development time for common components.
- Lightweight abstraction coexisting with Tailwind.
-
Cons:
- May need to eject if a design system is introduced.
-
Pros:
- Offloads data fetching to the server for better performance.
-
Cons:
- Care needed to identify user hotpaths affected by server rendering.
- Pros:
- Fully typed client for easy prototyping.
- Leverages fetch library in Next.js.
-
Pros:
- Fast prototyping for saving functionality.
-
Cons:
- Not suitable for persistent data across sessions.
-
Pros:
- Speedy prototyping without the need for a database.
-
Cons:
- Cannot work for storing persistent data.
- Pros:
- Easier verification of UI state across browsers.
The choice was REST due to:
- Displaying lists with information already received from REST responses.
- Ease of implementing paginated responses for lists.
- Leveraging server-side components to reduce client processing time.
GraphQL might be beneficial for entity pages (e.g., character details) due to reduced query complexity.
The project is deployed on Vercel and can be accessed here.
To run the application locally:
- Clone the repository.
- Run
yarn
to install dependencies. - Run
yarn dev
to start the application.
- Setup main responsive layout
- Fetch locations and list them
- Fetch characters and list them
- Make a single location clickable and show associated characters
- Make a single character clickable
- Show character metadata
- Allow users to add notes
- Preferably a modal
- Add search capabilities
- Add Playwright tests
- Include more information on episodes
Feel free to explore the Rick & Morty universe with this interactive application!