A full-stack web application featuring a Pokémon Pokedex built with Node.js, Express, GraphQL, and React.
- View a list of Pokémon with their details including name, type, and base stats.
- Sort Pokémon by ID, name, HP, attack, defense, special attack, special defense, and speed.
- Filter Pokémon by type.
- Paginate through the list of Pokémon.
- Searchbar to find your favourite Pokémon with ease.
- Node.js
- Express.js
- GraphQL
- Cors
- React
- React Router
- FontAwesome Icons
- Clone the repository:
git clone https://github.com/Twoos123/Pokedex.git
cd PokedexIkarus
- Install dependencies:
npm install
(try npm install --force if encountering dependency issues)
- Run the server:
node server/index.js
The server will start running at http://localhost:4000.
- GraphiQL Interface:
Explore and test GraphQL queries using the interactive GraphiQL tool at http://localhost:4000/graphql.
-
All Pokémon data endpoint: http://localhost:4000/api/pokemon
-
GraphQL Queries:
- pokemons: Get a list of all Pokémon.
- pokemon(id: Int!): Get details of a specific Pokémon by ID.
- Example query to fetch all Pokémon:
pokemons {
id
name {
english
}
type
base {
HP
Attack
Defense
SpAttack
SpDefense
Speed
}
}
}
- Navigate to the client directory:
cd client
- Install dependencies:
npm install
- Start the client app:
npm start
The React app will be running at http://localhost:3000.
Click on the column headers (ID, Name, HP, Attack, etc.) to sort Pokémon in ascending or descending order.
- Searching: Use the searchbar to look for a specific Pokémon.
- Filtering: Use the dropdown to filter Pokmon by type.
- Pagination: Navigate through pages using the pagination buttons at the bottom.
- Detailed View: Click on the name of the Pokemon to get a detailed view.