Files
botfights/CLAUDE.md
T
DorianandClaude Opus 4.6 335c148866 feat: botfights v1 — full fighting game with Kaplay engine
- Vue 3 + Vite + Tailwind 4 frontend with synthwave aesthetic
- Hono backend on port 9100 with SQLite/Drizzle
- Procedural pixel-art sprite generator (48x48, 8 animation states)
- Kaplay fight scene with punch/kick/special/knockback/KO animations
- 12 mock bots across 6 tiers with Elo rating system
- 9 challenge types, 10 fight arenas with modifiers
- Fight replay with staggered battle log and ~1 min timing
- Sprite preview page at /sprites

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:27:54 +00:00

2.3 KiB

CLAUDE.md -- botfights

Core Philosophy

  • Open source only -- MIT/Apache-2.0 dependencies
  • Privacy-first -- no tracking, no telemetry
  • Bitcoin only -- sats/Lightning/Cashu for payments, never fiat, never altcoins
  • Quality over speed -- working code, tested, documented

Quick Reference

pnpm dev            # Run app dev server + Claude proxy
pnpm dev:core       # Watch-build core library
pnpm build          # Build all packages (turbo)
pnpm test           # Run tests (vitest)
pnpm lint           # Lint all packages (eslint)
pnpm typecheck      # Type-check all packages (vue-tsc)
pnpm clean          # Remove dist/ directories

Dev server: http://localhost:5173 | Claude proxy: http://localhost:3141

Vue 3 Conventions

Always use <script setup lang="ts"> — never Options API.

Script section ordering

Imports → Props (defineProps) → Emits (defineEmits) → Reactive state → Computed → Watchers → Methods → Lifecycle hooks → defineExpose

Naming

Thing Convention Example
Components PascalCase ProjectCard.vue
Composables camelCase, use prefix useTheme.ts
Props (JS) camelCase projectName
Props (template) kebab-case project-name
Boolean props is/has/can/should prefix isVisible, canEdit
Emits (template) kebab-case with colon namespacing project:updated
Stores camelCase, use prefix, Store suffix useSettingsStore

Reactive state rules

  • ref() for primitives, reactive() for objects
  • computed() for derived values — no side effects in computed
  • shallowRef() for large collections/objects not requiring deep reactivity
  • Always use unique IDs for :key — never array index

Props

Always use object-style with type annotations, never array-style:

// Correct
defineProps<{ title: string; count?: number }>()

// Wrong
defineProps(['title', 'count'])

Performance

  • Lazy load with defineAsyncComponent for non-critical components
  • Use onErrorCaptured for error boundaries
  • Always handle loading/error/data states in async operations

Git Conventions

  • Conventional commits: feat:, fix:, refactor:, docs:, test:, chore:
  • Branch naming: feature/, bugfix/, release/
  • Never commit secrets, .env files, or API keys