Single-page application built with React that consumes both the public Rick and Morty API and the Rickverse backend API. Requires the backend to be running or available at the configured URL.
| Technology | Version | Purpose |
|---|---|---|
| React | 17 | UI library |
| React Router DOM | 6 | Client-side routing |
| Redux | 4 | Global state management |
| Redux Thunk | 2 | Async action middleware |
| Axios | 1 | HTTP requests |
| React Hot Toast | 2 | Toast notifications |
src/
βββ App.js # Root component β routing, login state, search logic
βββ index.js # Entry point, Redux Provider, BrowserRouter
βββ redux/
β βββ store.js # Redux store with thunk middleware
β βββ reducer.js # Handles favorites, filter, order, species actions
β βββ actions.js # Thunk actions: addFav, removeFav, filterCards, orderCards, speciesCards
βββ components/
βββ Form/ # Login form with client-side validation
βββ Navbar/ # Nav bar + SearchBar (search by character ID)
βββ Cards/ # Home grid of searched characters
βββ Detail/ # Single character detail view
βββ Favorites/ # Favorites list with filter/sort controls
βββ AllCharacters/ # Paginated full character gallery
βββ About/ # About page
Prerequisites: Node.js 16+, the Rickverse backend running (see /Server).
# 1. Install dependencies
cd Client
npm install
# 2. Start development server (port 3000)
npm startThe app points to the backend at https://rickverse-backend.onrender.com by default. To use a local backend, replace that URL in src/App.js and src/redux/actions.js with http://localhost:3001.
| Script | Description |
|---|---|
npm start |
Starts the dev server on port 3000 |
npm run build |
Creates an optimized production build in /build |
npm test |
Runs the test suite with Jest |
- Login β Authenticates against the backend with email and password. Client-side validation enforces valid email format and a 6β10 character password containing at least one number.
- Character search β Search any character by numeric ID from the Rick and Morty API. Prevents duplicate additions with toast feedback.
- Character detail β Full detail view for each character, including status, species, origin, location, gender, type, and episode list.
- All Characters gallery β Browse the full character catalogue with server-side pagination (previous / next).
- Favorites β Add or remove characters from a persisted favorites list (stored in the backend). Supports filtering by gender or species and sorting by ID ascending/descending.
- Dark mode β Toggle between light and dark themes across all views.
Redux manages two pieces of state:
| Key | Description |
|---|---|
myFavorites |
Active list (after filters/sort are applied) |
allCharactersFav |
Source-of-truth copy used to restore state after filters are cleared |
Actions that mutate favorites (ADD_FAV, REMOVE_FAV) sync with the backend and replace both keys. Filter and order actions operate only on myFavorites without hitting the network.
Email: Thiagozambonini24@gmail.com
Password: Thiago123