Files
nuzlocke-tracker/.beans/nuzlocke-tracker-8fcj--local-storage-persistence.md

37 lines
1.1 KiB
Markdown
Raw Normal View History

2026-02-04 17:13:58 +01:00
---
# nuzlocke-tracker-8fcj
title: Frontend API Integration
status: completed
2026-02-04 17:13:58 +01:00
type: task
priority: normal
created_at: 2026-02-04T15:44:42Z
updated_at: 2026-02-05T13:55:52Z
2026-02-04 17:13:58 +01:00
parent: nuzlocke-tracker-f5ob
blocking:
- nuzlocke-tracker-uw2j
- nuzlocke-tracker-0q8f
- nuzlocke-tracker-hm6t
- nuzlocke-tracker-8tuw
---
Implement frontend services to communicate with the backend API.
## Checklist
- [x] Create API client/service layer
- [x] Implement API calls for:
- [x] Fetch available games
- [x] Fetch routes for a game
- [x] Fetch Pokémon data
- [x] Create/update/delete Nuzlocke runs
- [x] Create/update encounters
- [x] Update Pokémon status
- [x] Add loading states and error handling
- [x] Add retry logic for failed requests
2026-02-04 17:13:58 +01:00
## Technical Notes
- Using native `fetch` via `src/api/client.ts` wrapper
- Using TanStack Query for caching, loading states, and retry
- All API responses typed with TypeScript
- Vite dev proxy configured for `/api` → backend
- Query hooks in `src/hooks/` for each domain (games, pokemon, runs, encounters)
- Mutations auto-invalidate relevant query caches