This project runs a full Pokedex stack with Docker Compose:
mysqlfor persistent database storageapi(Express + MySQL driver)frontend(nginx serving static web files)
On first startup, schema is created automatically and Pokemon data is seeded from PokeAPI.
- Optional: copy environment defaults.
cp .env.example .env- Start the full stack.
docker compose up --build- Open the app.
- Frontend: http://localhost:8080
- API: http://localhost:5000/pokedex
- MySQL: localhost:3306
- Schema initialization runs from
data/schema.sqlusing MySQL's init hook. - The
seedservice runsnpm run seed:if-empty. - If
pokemonalready has rows, seed is skipped. - If the MySQL volume is fresh, all initial data is loaded.
Run reseed inside the API container:
docker compose exec api npm run db:reseedOr run only seed (without reset):
docker compose exec api npm run seeddocker compose down -v
docker compose up --build-v deletes the named MySQL volume, so the next startup performs first-run initialization again.
Use .env (optional) to override defaults:
MYSQL_ROOT_PASSWORDMYSQL_DATABASEMYSQL_USERMYSQL_PASSWORDPOKEDEX_POKEMON_LIMIT
- Frontend API base URL is configured in
web/config.js. - Default is
http://localhost:5000. - For Docker frontend image, a container-specific config points to
/apivia nginx proxy.
- The user can view all the pokemon.
- The user can view a picture of each pokemon.
- The user can view the pokemon name and number.
- The system will change the color of the card based on the Pokemons type. For example, yellow for electric.
- The system will initially fill the database with data from the PokeAPI
- The user can search pokemon
- The user can view more attributes of each pokemon
- The user can order pokemon by any attribute
- The user can filter pokemon by any attribute
| Pokemon |
|---|
| id: number |
| name: string |
| img: string |
| types: string[] |
| Method | Path | Response |
|---|---|---|
| GET | /pokemons | Pokemon[] |

