The Pokédex Search App allows users to search for any Pokémon by name or ID and view detailed information such as stats, moves, and evolutions. The application follows a structured architecture combining Atomic Design and Feature-Based Architecture for better scalability and maintainability.
- Search Functionality: Users can search for Pokémon by name, ID, or pick one randomly.
- Pokémon Detail Page:
- Dynamic background color based on the Pokémon's primary type.
- Displays Pokémon image, types, description, and stats.
- Lists Pokémon evolutions with arrows matching the background color.
- Error Handling: Displays a custom error page if the Pokémon is not found.
- Multilingual Support: Integrated with
i18next
for localization. - UI Component Documentation: Utilizes Storybook for isolated component testing and visualization.
- Testing Suite: Includes unit tests and UI testing using
Vitest
,Testing Library
, andPlaywright
.
- React 19 - Frontend framework for building the UI.
- React Router 7 - Client-side routing.
- React Hook Form - Form handling.
- i18next & React-i18next - Internationalization and localization.
- Vite - Fast development and build tooling.
- Storybook - UI component documentation and testing.
- Vitest - Unit and integration testing framework.
- Testing Library & Playwright - UI testing.
- ESLint & Prettier - Code quality and formatting.
The project follows a combination of Atomic Design and Feature-Based Architecture:
src/
├── app/
│ ├── config/ # Application-level configurations
│ ├── features/
│ │ ├── pokemon/ # Pokemon feature module
│ │ │ ├── api/ # API-related code
│ │ │ ├── components/# Feature-specific components
│ │ │ ├── pages/ # Feature-related pages
│ │ │ ├── types/ # Type definitions
│ │ │ ├── utils/ # Helper functions
├── routes/ # Application routes
├── locales/ # Translations
├── pages/ # General pages
├── shared/
│ ├── assets/ # Static assets (images, icons, css tokens, etc.)
│ ├── components/ # Reusable UI components
│ │ ├── atoms/ # Basic UI elements (buttons, inputs)
│ │ ├── molecules/ # Composed UI elements
│ ├── hooks/ # Custom React hooks
│ ├── types/ # Global type definitions
│ ├── utils/ # Shared utility functions
- Clone the repository:
git clone https://github.com/fadinouira/pokedex cd pokedex
- Install dependencies using Yarn:
yarn install
- Start the development server:
yarn dev
- Run Storybook:
yarn storybook
- Run tests:
yarn test
- Build for production:
yarn build
The app fetches Pokémon data from PokeAPI:
- Uses REST API where GraphQL lacks coverage.
- Uses simple js fetch and custom hooks.
- Unit & Integration Tests:
Vitest
+Testing Library
- End-to-End Tests:
Playwright
(not developed yet) - Storybook Tests: Snapshot and interaction tests