Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

🔴 Pokedex App

A Pokedex web application built with Node.js and Express.js, featuring a layered architecture pattern. This project serves as a learning resource for understanding modern web development practices.

Node.js Express.js License

✨ Features

  • 📋 Paginated list of Pokemon
  • 🔍 Search Pokemon by name
  • 🏷️ Filter Pokemon by type
  • 📄 Detailed Pokemon information pages
  • 🌐 RESTful JSON API endpoints
  • 🎨 Server-side rendered HTML views with EJS

🛠️ Tech Stack

Technology Purpose
Node.js JavaScript runtime
Express.js Web framework
EJS Template engine
Axios HTTP client
PokeAPI Pokemon data source
Jest Testing framework

📚 Documentation

👉 Start the Guide

This project includes a comprehensive step-by-step guide for building the application:

Part Topic Link
00 Introduction Read
01 Project Setup Read
02 Understanding Architecture Read
03 Configuration Read
04 Building the Repository Read
05 Building the Service Read
06 Building the Controller Read
07 Building the Routes Read
08 Building the Views Read
09 Styling Read
10 Testing Read
11 Running the App Read

🚀 Quick Start

Prerequisites

  • Node.js (version 18 or higher)
  • npm (comes with Node.js)

Installation

  1. Clone the repository

    git clone https://github.com/your-username/interns-pokedex.git
    cd interns-pokedex
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env
  4. Start the development server

    npm run dev
  5. Open your browser Navigate to http://localhost:3000

📜 Available Scripts

Command Description
npm start Start the production server
npm run dev Start development server with hot reload
npm test Run tests with coverage
npm run lint Check code for linting errors
npm run lint:fix Fix linting errors automatically
npm run format Format code with Prettier
npm run format:check Check code formatting

🏗️ Project Architecture

This project follows a layered architecture pattern:

Routes → Controllers → Services → Repositories → External API (PokeAPI)
src/
├── app.js              # Application entry point
├── config/             # Configuration files
├── controllers/        # HTTP request handlers
├── repositories/       # Data access layer
├── routes/             # URL routing
├── services/           # Business logic
└── views/              # EJS templates

public/
└── css/                # Stylesheets

🧪 Testing

Run the test suite:

npm test

Tests are located in the tests/ directory and cover:

  • API endpoints (api.test.js)
  • Repository layer (pokemonRepository.test.js)
  • Service layer (pokemonService.test.js)

📄 License

This project is licensed under the MIT License.


Happy Coding! 🎮

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages