2026-02-05 18:36:08 +01:00
# nuzlocke-tracker
A full-stack Nuzlocke run tracker for Pokemon games.
## Getting Started
### Prerequisites
- Docker & Docker Compose
### Start the Stack
```bash
docker compose up
```
This starts three services:
| Service | URL |
|------------|--------------------------|
| Frontend | http://localhost:5173 |
| API | http://localhost:8000 |
| API Docs | http://localhost:8000/docs|
| PostgreSQL | localhost:5432 |
### Run Migrations
```bash
docker compose exec api alembic -c /app/alembic.ini upgrade head
```
### Seed the Database
2026-02-07 19:44:19 +01:00
The seeder reads from pre-generated JSON files in `backend/src/app/seeds/data/` (committed to the repo) and loads them into PostgreSQL. No external API access is needed — everything runs from local files inside the container.
2026-02-05 18:36:08 +01:00
```bash
docker compose exec api python -m app.seeds
```
To seed and verify the data was loaded correctly:
```bash
docker compose exec api python -m app.seeds --verify
```
2026-02-07 19:44:19 +01:00
This loads game data, Pokemon, routes, and encounter tables for FireRed, LeafGreen, Emerald, HeartGold, and SoulSilver.
### Regenerating Seed Data
2026-02-11 13:53:40 +01:00
The seed JSON files don't normally need regenerating. If you need to update them (e.g., to pull in new game data), run the import tool from the repo root:
2026-02-07 19:44:19 +01:00
2026-02-11 13:53:40 +01:00
```bash
python -m import_pokedb
```
2026-02-07 19:44:19 +01:00
2026-02-11 13:53:40 +01:00
It auto-downloads [PokeDB ](https://pokedb.org ) data on the first run. Options:
2026-02-07 19:44:19 +01:00
2026-02-11 13:53:40 +01:00
```bash
# Generate data for a specific game only
python -m import_pokedb --game firered
2026-02-07 19:44:19 +01:00
2026-02-11 13:53:40 +01:00
# Use a custom PokeDB data directory
python -m import_pokedb --pokedb-dir ~/my-pokedb-data/
2026-02-07 19:44:19 +01:00
2026-02-11 13:53:40 +01:00
# Write output to a different directory
python -m import_pokedb --output /tmp/seed-output/
```
2026-02-07 19:44:19 +01:00
2026-02-11 13:53:40 +01:00
Review and commit the updated JSON files in `backend/src/app/seeds/data/` .