Provides comprehensive context and development guidelines for the GhostDraft League of Legends companion suite, including desktop overlay app (Wails/Go), Next.js website, and data pipeline architecture.
This skill provides comprehensive context for developing the GhostDraft League of Legends companion suite, which includes a desktop overlay app, companion website, and match data pipeline.
When working on GhostDraft, this skill helps you:
GhostDraft consists of three main components:
1. **Desktop App (Wails)**: Real-time overlay connecting to League Client via LCU API
- Backend: Go with Wails v2
- Frontend: Vanilla JavaScript + CSS (Hextech theme)
- Data: Riot LCU API, Local SQLite, Data Dragon, Turso
2. **Website (Next.js)**: Companion site for champion stats and builds
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS + Hextech theme
- Database: Turso (cloud SQLite)
- See `website/CLAUDE.md` for details
3. **Data Analyzer**: Match history collection and aggregation
- See `data-analyzer/CLAUDE.md` for details
**Stats Provider** (`internal/data/stats_queries.go`):
**Cache Strategy**:
**To add a new event**:
1. Create emit in `app.go`: `runtime.EventsEmit(a.ctx, "event:name", data)`
2. Add listener in `main.js`: `EventsOn('event:name', handlerFunction)`
3. Create handler function to update DOM
**To add a new UI tab**:
1. Add button in `main.js` HTML: `<button class="tab-btn" data-tab="tabname">Label</button>`
2. Add content div: `<div class="tab-content" id="tab-tabname">...</div>`
3. Tab switching is automatic via existing JS
Maintain the unified visual theme across desktop app and website:
**Color Palette**:
**Fonts**:
**Design Elements**: Gold borders, glowing effects, hex patterns, 8-12px rounded corners
**Local SQLite** (Desktop App):
**Turso (Cloud)**:
**Development**:
```bash
wails dev # Uses .env vars for Turso credentials
```
**Production Build** (embeds read-only Turso credentials):
```bash
./build.ps1 # Windows PowerShell
./build.sh # Linux/Mac/Git Bash
```
Set these environment variables before building:
**Manual Build**:
```bash
wails build -ldflags "\
-X 'ghostdraft/internal/data.TursoURL=libsql://your-db.turso.io' \
-X 'ghostdraft/internal/data.TursoAuthToken=your-read-only-token'"
```
**Running the Pipeline**:
```bash
cd data-analyzer
go run cmd/pipeline/main.go --max-players=100
go run cmd/pipeline/main.go --riot-id="Player#NA1" --max-players=100
go run cmd/reducer/main.go --output-dir=./export
```
**Statistical Sampling**:
**Desktop App Structure**:
**Frontend Events**:
1. **Embedded Credentials**: Desktop app embeds read-only Turso credentials at build time (data is public anyway)
2. **Item Filtering**: Only show completed items (no components, cost >= 1000g)
3. **Caching Keys**: Track last fetched champ/role to prevent redundant queries
4. **Stats Fallback**: Fall back to aggregated data across patches if current patch has no data
5. **SQLite Syntax**: Use `?` placeholders and `CAST(... AS REAL)` for queries
Use this skill when:
This skill helps you maintain consistency across the entire GhostDraft ecosystem while following established patterns and best practices.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/ghostdraft-project-context/raw