A full-stack Pokédex app built with a Laravel backend API and a Next.js frontend. Browse, search, and infinitely scroll through Pokémon pulled from the PokéAPI.
Scrolled View (Sticky Middle Section)

PokeApp/
├── pokedex-api/ # Laravel backend
├── pokedex-frontend/ # Next.js frontend
├── ss/ # Screenshots for README
└── README.md
Make sure you have the following installed before running the project:
| Tool | Version | Download |
|---|---|---|
| PHP | 8.1+ | https://windows.php.net/download/ |
| Composer | Latest | https://getcomposer.org/ |
| Node.js & npm | 18+ | https://nodejs.org/ |
| Git | Latest | https://git-scm.com/ |
git clone https://github.com/DesmondJS/PokeApp.git
cd PokeAppcd pokedex-apicomposer installIf routes/api.php does not exist, run:
php artisan install:apiWhen asked about migrations, press yes.
If you are on Windows and get an SSL error when fetching from PokéAPI:
- Download the CA cert file from: https://curl.se/ca/cacert.pem
- Save it as
cacert.peminsideC:\php\ - Open
C:\php\php.iniand update these two lines:
curl.cainfo = "C:\php\cacert.pem"
openssl.cafile = "C:\php\cacert.pem"php artisan serveThe API will be running at: http://localhost:8000
Test it by visiting: http://localhost:8000/api/pokemon?limit=9&offset=0
You should see Pokémon JSON data. ✅
Open a new terminal and keep Laravel running in the first one.
cd pokedex-frontendnpm installnpm run devThe frontend will be running at: http://localhost:3000 ✅
| Service | URL |
|---|---|
| Laravel API | http://localhost:8000 |
| Next.js Frontend | http://localhost:3000 |
Make sure both are running at the same time. The frontend fetches data exclusively from the Laravel API.
Base URL: http://localhost:8000/api
Fetch a paginated list of Pokémon or search by name.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit |
integer | No | 20 | Number of Pokémon to return |
offset |
integer | No | 0 | Number of Pokémon to skip (for pagination) |
search |
string | No | — | Search Pokémon by exact name |
Request:
GET /api/pokemon?limit=9&offset=0
Response:
{
"count": 1302,
"results": [
{
"name": "bulbasaur",
"id": 1,
"sprite": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png",
"types": ["grass", "poison"]
},
{
"name": "ivysaur",
"id": 2,
"sprite": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/2.png",
"types": ["grass", "poison"]
}
]
}Request:
GET /api/pokemon?limit=9&offset=9
Returns Pokémon 10–18.
Request:
GET /api/pokemon?search=charizard
Response:
{
"count": 1,
"results": [
{
"name": "charizard",
"id": 6,
"sprite": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/6.png",
"types": ["fire", "flying"]
}
]
}Request:
GET /api/pokemon?search=unknownpokemon
Response:
{
"count": 0,
"results": []
}| Field | Type | Description |
|---|---|---|
count |
integer | Total number of Pokémon available |
results |
array | List of Pokémon objects |
results[].name |
string | Pokémon name (lowercase) |
results[].id |
integer | Pokémon national Pokédex ID |
results[].sprite |
string | URL to the Pokémon's front sprite image |
results[].types |
array of strings | List of the Pokémon's types (e.g. ["fire", "flying"]) |
- Laravel 11 — PHP backend framework
- Next.js 14 — React frontend framework
- PokéAPI — Source of all Pokémon data
- Tailwind CSS — Utility-first CSS
