woo-app Svelte Themes

Woo App

Solo Leveling Tracker — SvelteKit 5 + Svelte 5 Runes offline-first RPG-style productivity tracker with Claude AI quest generation

Solo Leveling Tracker

SvelteKit 5 + Svelte 5 Runes — offline-first, RPG-style productivity / habit tracker with Claude-generated quests, deployed to Cloudflare Pages.

Dashboard — Level 45 B-Rank hunter, active streaks, daily briefing

Route transitions — onboarding through quests, stats, shadows, achievements, journal
Route transitions through onboarding → quests → stats → shadows → achievements → journal

Stat-based progression (STR, INT, DEX, VIT, WIS, CHA), levels and ranks, achievements, pillar mastery, and AI-generated daily quests. All mutations are written to IndexedDB first; a background sync queue ships them to a remote PocketBase instance when online.

Tech stack

Layer Choice
Framework SvelteKit 2 + Svelte 5 (Runes)
Styling Tailwind CSS 4
Local DB Dexie (IndexedDB), offline-first
Remote DB PocketBase (self-hosted, binary in pb/)
AI Anthropic Claude (server-only proxy, @anthropic-ai/sdk)
Validation Zod + zod-to-json-schema for AI tool_use contracts
Motion GSAP (level-up / rank-up cinematics)
PWA Workbox service worker, background sync
Deploy Cloudflare Pages (@sveltejs/adapter-cloudflare)

Quick start

git clone https://github.com/ReqiDions/woo-app.git
cd woo-app
npm install
cp .env.example .env       # fill in ANTHROPIC_API_KEY + POCKETBASE_* values
npm run dev:all            # SvelteKit on :5173 + PocketBase on :8090

Open http://localhost:5173. Demo seeds available at /demo (fresh) and /demo/l45 (level 45 preloaded).

Environment

Required in .env:

Var Purpose
PUBLIC_POCKETBASE_URL PocketBase base URL (e.g. http://127.0.0.1:8090)
ANTHROPIC_API_KEY Server-only. Without it, AI features degrade gracefully.
POCKETBASE_ADMIN_EMAIL Server-side /api/sync admin auth
POCKETBASE_ADMIN_PASSWORD Server-side /api/sync admin auth

Scripts

Script What it does
npm run dev:all SvelteKit + PocketBase in parallel (recommended)
npm run dev SvelteKit only (5173)
npm run pocketbase PocketBase only (8090)
npm run build Production build → .svelte-kit/cloudflare/
npm run preview Preview the built output
npm run check svelte-kit sync + svelte-check (TS strict)
npm run check:watch Type-check in watch mode

No test runner is wired up yet; npm run check is the only automated verification.

Architecture

Offline-first by contract: all writes go to Dexie first, then a SyncQueueItem table drains to PocketBase via the /api/sync endpoint when online. Client code never talks to PocketBase directly — that bypasses the queue and breaks offline behavior.

src/lib/
├── game/         Pure functions — XP curve, ranks, stats, achievements, scoring
├── stores/       Svelte 5 Runes ($state) modules — *.svelte.ts files
├── db/           dexie.ts (schema + migrations), pocketbase.ts, sync.ts, schema.ts
├── ai/           Server-only Claude client + Zod prompt/tool schemas
├── components/   By feature: quest/, player/, dashboard/, animations/, ui/
├── pwa/          Service worker, Workbox cache, background sync
├── data/         Static content — achievements, shadows, system quests, demo seeds
└── utils/        constants.ts (game balance knobs)

Path aliases

Alias Path
$ai src/lib/ai
$game src/lib/game
$stores src/lib/stores
$db src/lib/db
$components src/lib/components

Screenshots

Captured from the live /demo/l45 seed (Level 45, B-Rank, mid-game state). Dark theme is the default; see src/lib/components/layout/ThemeProvider.svelte for the light variant.

Quests — active board, streaks, scoring
Quests — daily / weekly / one-shot, scored against pillar mastery
Stats — XP curve, rank progression, pillar mastery
Stats — XP curve, rank thresholds, pillar mastery breakdown
Shadows — summoned companions and their effects
Shadows — summoned companions with passive effects
Achievements — unlocked and locked milestone tiles
Achievements — 60+ tiered milestones across pillars
Journal — daily reflections with attachments
Journal — daily reflections with attachments + mood log

Deployment

Cloudflare Pages target. After authenticating wrangler once (npx wrangler login), deploys are one command:

DEPLOY.bat

This runs wrangler pages deploy .svelte-kit/cloudflare-deploy --project-name=woo-app --branch=main. Production secrets (ANTHROPIC_API_KEY, POCKETBASE_ADMIN_*) live in the Cloudflare Pages dashboard under Environment Variables — never in .env.production (which is gitignored anyway).

More

  • CLAUDE.md — guidance for Claude Code agents (conventions, layered architecture, specialist subagent routing protocol).
  • docs/ — long-form documentation (Turkish): architecture, game-mechanics, ai-integration, database, api-reference, development, deployment.
  • SESSION_NOTES.md — recent session handoff notes (Turkish).
  • .claude/audit-state.md — single source of truth for baselines, open issues, project realities.
  • .claude/runbooks/ — deep procedures for Dexie migrations, tool_use Zod patterns, sync queue debug, cinematic timeline, anti-template UI checklist, test setup.

Security

Please report security issues privately — see SECURITY.md. Do not open public issues for vulnerabilities.

License

MIT © 2026 ReqiDions

Top categories

Loading Svelte Themes