mhdaxif / pokemon-app

https://mhdaxif.github.io/pokemon-app/
2 stars 0 forks source link

Pokémon List App

Live demo: https://mhdaxif.github.io/pokemon-app.

This project is a Pokémon List web application built with Angular and Angular Material. It allows users to search, view, and paginate through a list of Pokémon, mark favorites, and navigate to a detail page.

Features

Prerequisites

Make sure you have the following installed before setting up the project:

Getting Started

1. Clone the Repository

git clone https://github.com/mhdaxif/pokemon-app.git

2. Navigate to the Project Folder

cd pokemon-app

3. Install Dependencies

Install all necessary dependencies using npm.

npm install

4. Running the App

You can now start the Angular application using the following command:

ng serve

This will start a development server. Open your browser and go to http://localhost:4200/ to see the application in action.

Folder Structure

└── 📁src
    └── 📁app
        └── 📁core
            └── 📁guards
                └── save-state.guard.ts
            └── 📁services
                └── app-state.service.ts
                └── favorite.service.ts
                └── index.ts
                └── pokemon-details.service.ts
                └── pokemon.service.ts
        └── 📁features
            └── 📁pokemon
                └── 📁detail
                    └── detail.component.html
                    └── detail.component.scss
                    └── detail.component.spec.ts
                    └── detail.component.ts
                └── 📁home
                    └── home.component.html
                    └── home.component.scss
                    └── home.component.spec.ts
                    └── home.component.ts
        └── 📁shared
            └── 📁components
                └── 📁pagination
                    └── pagination.component.html
                    └── pagination.component.scss
                    └── pagination.component.spec.ts
                    └── pagination.component.ts
                └── 📁pokemon-card
                    └── pokemon-card.component.html
                    └── pokemon-card.component.scss
                    └── pokemon-card.component.spec.ts
                    └── pokemon-card.component.ts
            └── 📁models
                └── Ability.ts
                └── index.ts
                └── Pokemon.ts
                └── PokemonDetails.ts
                └── PokemonListModel.ts
                └── Statistics.ts
                └── Type.ts
        └── app.component.html
        └── app.component.scss
        └── app.component.spec.ts
        └── app.component.ts
        └── app.config.ts
        └── app.routes.ts
        └── material.module.ts
    └── index.html
    └── main.ts
    └── styles.scss

Application Technical Details


Key Components

1. Pokemon List (home.component.ts)

2. Pokemon Detail (pokemon-detail.component.ts)

3. Services (pokemon.service.ts)

4. Loader and Pagination

Usage

  1. Search Pokémon: Type in the search bar at the top of the page to filter Pokémon by name.

  2. Favorite Pokémon: Click on the heart icon to mark a Pokémon as a favorite. Use the filter button to only show favorites.

  3. View Details: Click on a Pokémon card to view more details such as abilities, stats, and other information.

  4. Pagination: Use the paginator at the bottom of the page to navigate through the Pokémon list.

Styling and Customization

Build for Production

To create an optimized production build, use the following command:

ng build --prod

The build artifacts will be stored in the dist/ directory.

Further Improvements