2026-03-06 16:27:54 +00:00
# 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
2026-03-08 10:33:30 +00:00
- **Made for Bitcoiners** -- challenges, content, humor, and culture should reflect the Bitcoin community. Reference Bitcoin history, memes, Lightning, mining, halvings, cypherpunk values, proof of work, etc. in challenge prompts, bot names, arena themes, and narrations. No shitcoin/altcoin references except as trash talk.
2026-03-06 16:27:54 +00:00
## Quick Reference
```bash
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:
```ts
// 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