This project is a web application that consumes a Pokémon API to provide information about different Pokémon. It uses an architecture based on Domain-Driven Design (DDD) and has been implemented with good development practices, including unit testing.
- Query Pokémon information by name.
- Paginated Pokémon list.
- Well-organized DDD-based architecture.
- Unit tests for controller logic.
- ASP.NET Core: The backend of the application is built on ASP.NET Core, which is an open-source web development framework.
- Blazor WebAssembly: The frontend of the application is constructed with Blazor WebAssembly, allowing interactive web applications to be built in C#.
- xUnit: A unit testing framework used to test the controller logic.
The architecture of this project follows a DDD-based approach. This means it's divided into layers of domain, application, and presentation. Here's a brief description of each:
-
Domain: Contains entities, aggregates, repositories, and services representing the business logic of the application. It also includes Data Transfer Objects (DTOs) used for data exchange between layers.
-
Application: This is where the application logic resides. Application services interact with the domain and provide an interface for the presentation layers.
-
Presentation: This layer contains the user interface and is built with Blazor WebAssembly. Pages, components, and presentation services are managed here.
To run the project locally, follow these steps:
-
Clone this repository to your local machine.
-
Open the solution in your favorite IDE (e.g., Visual Studio).
-
Ensure you have .NET Core SDK installed on your machine.
-
Open a terminal and navigate to the API project directory (e.g.,
Pokedex.Api
). -
Run the
dotnet run
command to start the API. -
Open another terminal and navigate to the Blazor client project directory (e.g.,
Pokedex.Client
). -
Run the
dotnet run
command to start the Blazor client. -
Keep both the API and client running simultaneously.
-
Open your browser and visit
https://localhost:5001
to access the application.
Unit tests have been included for the controller logic. To run the tests, use the following command in the respective directory: dotnet test