Fetch 'Em All

A Pokédex web app that pulls live data from PokéAPI. Browse and search Pokémon, then open a detail view with abilities and base stats.

Started
Built with
  • HTML
  • CSS
  • JavaScript
  • PokéAPI
Course
WEB 241, JavaScript Technologies and Applications (Spring 2026)
Source code
github.com/cihake/fetch-em-all
The detail view for Decidueye-Hisui, open over search results for "hisui". It shows the Pokémon's artwork, Grass and Fighting type badges, height, weight, abilities, base experience, and a bar for each of the six base stats.
The detail view for a Pokémon found by searching “hisui”.

Overview

Fetch 'Em All is a client-side JavaScript app built for WEB 241. It fetches live data from PokéAPI, a public web API, and presents it as a browsable, searchable Pokédex. The assignment asked for modern, modular JavaScript that handles loading, empty, and error states and stays accessible, and those requirements shaped the design.

Features

  • A paginated grid of 20 Pokémon per page. Each card shows the sprite, number, name, and type badges.
  • Search by name (partial names work) or by Pokédex number, such as #25.
  • A detail view with official artwork, height, weight, abilities, base experience, and a bar for each of the six base stats.
  • Loading, error, and “no results” states for every request.
  • Keyboard and screen reader support. Cards can be focused and opened with Enter or Space, Escape closes the detail view and returns focus to the card you opened, and page changes are announced.

More screenshots

The home page. A red header holds the Fetch 'Em All logo and a search box. Below it are a welcome message, two ways to search, and a grid of Pokémon cards from Bulbasaur to Pidgeot, each with a sprite, number, name, and type badges.
The home page, showing the first page of Pokémon.
Search results for "mega", page 5 of 5. A grid of Mega form cards with type badges is followed by Previous and Next buttons, with Next disabled because this is the last page.
Search results are paged too, with the Next button disabled on the last page.

How it's built

Plain HTML, CSS, and JavaScript with no framework and no build step. The JavaScript is split into three files, each with one job:

  • api.js holds the fetch helpers for PokéAPI.
  • ui.js turns data into HTML for the grid, the status messages, and the detail view.
  • app.js keeps the app's state and wires up events, pagination, and search.

Challenges and solutions

  • The list endpoint returns only names and links. To show sprites and types, each page makes one request per Pokémon. They run in parallel with Promise.all, so a page of 20 appears together instead of one card at a time.
  • PokéAPI has no search endpoint. A number search requests that Pokémon directly. A name search downloads the full list of names once, keeps it in memory, and filters it a moment after you stop typing, so later searches don't download it again.
  • Search results need pages too. They are paged 20 at a time with their own offset, separate from the main browse view, so switching between searching and browsing works cleanly.

What I'd do differently

  • Keep keyboard focus inside the detail view while it is open. Right now Tab can move to the page behind it.
  • Cancel out-of-date searches, so a slow response can't replace the results of a newer one.
  • Cache Pokémon that were already fetched. The detail view requests data the grid has already loaded.
  • Respect the reduced-motion setting for the loading spinner and the smooth scrolling.
  • Add automated tests for the search and pagination logic.