| When | Game | Trainer | ID | OK? | |
|---|---|---|---|---|---|
| Loading… | |||||
Everything the web page does is available over a small HTTP API. Base URL is wherever
the app runs, e.g. http://localhost:3000.
| Method | Path | Purpose |
|---|---|---|
| POST | /api/saves | Upload & parse a .sav; returns the journal JSON |
| GET | /api/saves | List recent uploads |
| GET | /api/saves/:id | Fetch one parsed summary by id |
| GET | /api/health | Liveness check |
Send it as multipart form field file:
curl -F "[email protected]" http://localhost:3000/api/saves
…or as a raw binary body:
curl --data-binary @RUBY.sav \
-H "Content-Type: application/octet-stream" \
http://localhost:3000/api/saves
{
"id": "uuid",
"parse_ok": true,
"summary": {
"gameDisplayName": "Pokémon Ruby / Sapphire",
"trainer": { "name": "RED", "publicId": 15437, "secretId": 6699, "gender": "boy" },
"playtime": { "hours": 42, "minutes": 30 },
"money": 123456,
"pokedex": { "owned": 5, "seen": 7, "nationalUnlocked": true },
"badges": { "count": 0, "list": [ ... ] },
"party": [ { "nickname": "SPARKY", "speciesName": "Treecko",
"speciesNationalId": 252, "level": 25, "nature": "Gentle",
"isShiny": false, "ivs": { ... }, "evs": { ... },
"moves": [ { "id": 71, "name": "Absorb", "pp": 25 } ] } ],
"hallOfFame": { "entryCount": 0, "entries": [ ] }
}
}
On an unsupported game you get 422 { parse_ok:false, error }.
Badges & Hall of Fame are experimental. Rate limit: 60 uploads / 15 min.
Guests get the parsed summary back but nothing is stored on the server
(persisted:false) — your browser keeps its own history.
Signed-in users also get the save archived to their account
(persisted:true, with an id).
| Method | Path | Purpose |
|---|---|---|
| POST | /api/auth/signup | {username,email,password} |
| POST | /api/auth/login | {email,password} → sets session cookie |
| POST | /api/auth/logout | Clear the session |
| GET | /api/me/saves | Your archived saves (requires login) |
Sessions are httpOnly signed cookies, so browser API calls just work;
GET /api/saves/:id and DELETE are owner-only.