SvelteKit: API integration #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Depends on daily-100 #7 (SvelteKit scaffold) and daily-100-api #1-#4 (all API endpoints).
Repo
forgejo_admin/daily-100User Story
As a user
I want my checklist data to persist across sessions
So that my progress is saved and stats are accurate
Context
Replace mock data in SvelteKit components with real API calls to the FastAPI backend. GET/PUT /api/today for checklist state, GET /api/history for heat map data, GET /api/stats for stats cards and gamification header. Add loading states and error handling.
File Targets
Files the agent should modify or create:
src/lib/api.ts-- API client with typed fetch functionssrc/routes/+page.svelte-- data fetching via load functionsrc/routes/+page.server.ts-- server-side load for initial datasrc/lib/components/ChecklistItem.svelte-- call PUT on togglesrc/lib/components/HeatMap.svelte-- consume real history datasrc/lib/components/StatsGrid.svelte-- consume real statssrc/lib/components/GamificationHeader.svelte-- consume real level/streakFiles the agent should NOT touch:
prototype/-- reference onlyAcceptance Criteria
Test Expectations
npm run buildsucceedsnpm run buildConstraints
Checklist
Related
daily-100-- project