Files
nuzlocke-tracker/README.md
Julian Tabel 3d362a8314
Some checks failed
CI / backend-tests (pull_request) Failing after 1m16s
CI / frontend-tests (pull_request) Successful in 28s
Last weird branch commit
2026-03-20 22:11:39 +01:00

83 lines
2.4 KiB
Markdown

# ANT - Another Nuzlocke Tracker
A full-stack Nuzlocke run tracker for Pokemon games.
## Getting Started for now
### Prerequisites
- Docker & Docker Compose
### Start the Stack
```bash
docker compose up
```
This starts four services:
| Service | URL |
|------------|---------------------------|
| Frontend | http://localhost:5173 |
| API | http://localhost:8080 |
| API Docs | http://localhost:8080/docs|
| GoTrue | http://localhost:9999 |
| PostgreSQL | localhost:5432 |
### Local Authentication
The stack includes a local GoTrue container for auth testing. Email/password signup and login work out of the box with auto-confirmation (no email verification needed).
**OAuth providers (Google, Discord) are disabled in local dev.** The login/signup pages show OAuth buttons as disabled with a tooltip explaining this. For OAuth testing, deploy to an environment with Supabase cloud configured.
The local JWT secret and anon key are pre-configured in `.env.example` and `docker-compose.yml`. Copy `.env.example` to `.env` before starting:
```bash
cp .env.example .env
docker compose up
```
### Run Migrations
```bash
docker compose exec api alembic -c /app/alembic.ini upgrade head
```
### Seed the Database
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.
```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
```
This loads game data, Pokemon, routes, and encounter tables for FireRed, LeafGreen, Emerald, HeartGold, and SoulSilver.
### Regenerating Seed Data
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:
```bash
python -m import_pokedb
```
It auto-downloads [PokeDB](https://pokedb.org) data on the first run. Options:
```bash
# Generate data for a specific game only
python -m import_pokedb --game firered
# Use a custom PokeDB data directory
python -m import_pokedb --pokedb-dir ~/my-pokedb-data/
# Write output to a different directory
python -m import_pokedb --output /tmp/seed-output/
```
Review and commit the updated JSON files in `backend/src/app/seeds/data/`.