A web service for tracking submissions on AtCoder and other competitive programming sites, which are graded by difficulty (Q11-D6).
Always prefer simplicity over pathological correctness. YAGNI, KISS, DRY. No backward-compat shims or fallback paths unless they come free without adding cyclomatic complexity.
When implementing:
- Plan with a phased TODO list before starting (lower risk → higher risk order)
- Before writing a new function, search
src/lib/utils/,src/lib/services/,src/features/*/utils/andsrc/features/*/services/for existing implementations; extract shared logic there when it appears in 2+ places - Write tests first, then implement production code, then verify with
pnpm test:unit - Review critically after implementing: flag YAGNI violations, over-abstraction, missing tests
- Record reusable insights in
.claude/rules/ordocs/guides/after the session - Discard or summarize completed plans; don't leave stale TODOs
SvelteKit 2 + Svelte 5 (Runes) + TypeScript | PostgreSQL + Prisma | Flowbite Svelte + Tailwind 4 | Vitest + Playwright
pnpm dev # Start dev server (localhost:5174)
pnpm build # Build for production
pnpm test # Run all tests
pnpm test:unit # Vitest unit tests
pnpm test:integration # Playwright E2E tests
pnpm coverage # Report test coverage
pnpm lint # ESLint check
pnpm format # Prettier format
pnpm check # Svelte type check
pnpm exec prisma generate # Generate Prisma client
pnpm exec prisma migrate dev --name # Create migration (with description)
pnpm db:seed # Seed databasesrc/routes/ # SvelteKit file-based routing
src/lib/
├── actions/ # SvelteKit actions
├── clients/ # External API clients (AtCoder Problems, AOJ)
├── components/ # Svelte components
├── constants/
├── server/ # Server-only (auth.ts, database.ts)
├── services/ # Business logic
├── stores/ # Svelte stores (.svelte.ts with Runes)
├── types/ # TypeScript types
├── utils/ # Pure utility functions
└── zod/ # Validation schemas
src/features/ # Feature-scoped code (single domain)
├── {feature}/
│ ├── components/ # Feature UI (list/, detail/, shared/)
│ ├── fixtures/ # Test data
│ ├── services/ # Feature business logic (CRUD via Prisma)
│ │ └── _.test.ts # Tests co-located next to source (not in src/test/)
│ ├── stores/ # Feature stores
│ ├── types/ # Feature types
│ └── utils/ # Feature utilities
│ └── _.test.ts # Tests co-located next to source
src/test/ # Unit tests (mirrors src/lib/)
tests/ # E2E tests (Playwright)
prisma/schema.prisma # Database schema- Svelte 5 Runes: Use
$props(),$state(),$derived()in all new components - Server data:
+page.server.ts→+page.svelteviadataprop - Forms: Superforms + Zod validation
- Tests: Write tests before implementation (TDD). Use
@quramy/prisma-fabbricafor factories, Nock for HTTP mocking - Naming:
camelCasevariables,PascalCasetypes/components,snake_casefiles/routes,kebab-casedirectories - Pre-commit: Lefthook runs Prettier + ESLint (bypass:
LEFTHOOK=0 git commit)
- See
package.jsonfor versions and scripts - See
prisma/schema.prismafor database models - See
docs/guides/for detailed documentation - See
docs/guides/architecture.mdfor directory structure and colocation guide