(English version | Clique aqui para versão Português-BR)
This project consists of building a Pokédex API and a simple frontend interface to interact with it. The Pokédex API is developed using FastAPI in Python, and the frontend is built using Angular.
The primary objectives of the Pokédex project are as follows:
- To create an API for managing a list of captured Pokémon with pagination and detailed views.
- To develop a user-friendly frontend interface for browsing and accessing Pokémon information.
- To implement additional features such as exporting Pokémon data and documentation generation.
- Use of Gitflow for development.
- Unit tests with Pytest.
- Docker and Docker-Compose for build and deploy.
Barbara Calderon, software developer.
The main goal of this project is to create a Pokédex API that manages a list of captured Pokémon with pagination and a simple frontend interface to view the list of Pokémon and their details.
Below, some images.
- Base URL: Retrieve data from
https://pokeapi.co/api/v2/pokemon
. - Pagination: Implement pagination with the default behavior listing all Pokémon if no offset or limit is specified.
- Detailed View: Implement a detailed page for each Pokémon similar to
https://www.pokemon.com/us/pokedex
. - Data Fetching:
- Use
httpx
for data fetching. - Ensure that the fetched data is sufficient to replicate the details found at
https://www.pokemon.com/us/pokedex
.
- Use
- Sorting: Sort the API results alphabetically by Pokémon name.
- Export Functionality: Ability to export the sorted list of Pokémon to an XML file.
- Documentation:
- Provide API documentation using Swagger.
- Follow best practices in API development.
- Technologies: Use Angular.
- Features: The interface should allow viewing the list of Pokémon and the details of each individual Pokémon.
Clone this repo: git clone git@github.com:barbaracalderon/pokedex-api.git
To run the application using Docker and Docker Compose, follow these steps:
- Make sure Docker and Docker Compose are installed on your system.
- Navigate to the project directory:
cd pokedex-api
- Run the application:
docker-compose up
This will build and start both the backend and frontend services.
-
Frontend: The Angular frontend will be accessible at
http://localhost:4200
. You can open your browser and navigate to this URL to use the frontend interface. -
Backend API: The FastAPI backend will be accessible at
http://localhost:8000
. You can access the API documentation (Swagger UI) athttp://localhost:8000/docs
.
Method | Endpoint | Description |
---|---|---|
GET | /pokemons | List Pokémon |
GET | /data | List Pokémon data |
GET | /docs | Swagger documentation from OpenAPI |
GET | /export | Export the list of Pokémon in XML format |
This project was generated with Angular CLI version 17.3.7.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
The Pokédex project represents a culmination of efforts to create a comprehensive and user-friendly Pokémon management system. Developed by myself, Barbara Calderon, the project aims to simplify the process of managing and accessing Pokémon data while providing a seamless user experience.
We hope that this system meets your needs and enhances your Pokémon-related activities.