The app is built using a React (Vite) frontend and a Node.js (Express.js) backend. Users can browse the first 150 Pokémon with pagination, view Pokémon details, and add/remove them from a favorites list. The backend provides RESTful APIs to manage Pokémon data and favorites.
- Frontend Production (Vercel): https://pokemon-client-vert.vercel.app/
- Backend Production (Render): https://pokemon-backend-mjgb.onrender.com/
- React with Vite for fast development
- TypeScript for type safety
- Tailwind CSS for styling and responsiveness
- Axios for API requests
- Deployed on Vercel
- Node.js with Express.js for API handling
- TypeScript for backend logic
- Express-Validator for request validation
- Deployed on Render
- Homepage (
/): Displays the first 150 Pokémon with pagination. - Favorites Page (
/favorites): Lists all favorited Pokémon. - Detail Modal: Shows detailed stats and type relationships.
- Responsive Design: Mobile-first, fully responsive using Tailwind CSS.
| Method | Endpoint | Description | Request Body | Response |
|---|---|---|---|---|
GET |
/api/pokemon |
Fetches the list of all available Pokémon | None |
200 OK - Returns an array of Pokémon objects |
GET |
/api/pokemon/:id |
Fetches a single Pokémon by its ID | None |
200 OK - Returns the Pokémon object or 404 Not Found if it doesn't exist |
GET /api/pokemonGET /api/pokemon/1| Method | Endpoint | Description | Request Body | Response |
|---|---|---|---|---|
POST |
/api/favorites |
Adds a Pokémon to the favorites list | { "id": number } |
201 Created - Returns the updated favorites list |
DELETE |
/api/favorites/:id |
Removes a Pokémon from the favorites list | None |
200 OK - Returns the updated favorites list or 404 Not Found if it doesn't exist |
GET |
/api/favorites |
Fetches the list of all favorite Pokémon | { "id": number } |
201 Created - Returns an array of favorite Pokémon object |
POST /api/favorites
Content-Type: application/json
{
"id": 1
}DELETE /api/favorites/1GET /api/favorites- Latest LTS version of Node.js and npm should be installed
- Clone the repository
git clone [email protected]:sharjilk/pokemon-backend.git cd backend
- Install dependencies
npm install
- Run the backend
npm run start
- Backend runs on
http://localhost:4000/
- Navigate to the frontend directory:
git clone [email protected]:sharjilk/pokemon-client.git
- Install dependencies
npm install
- Start the development server
npm run dev
- Frontend runs on
http://localhost:5173/