MeshDD-Bot/.claude/CLAUDE.md
ppfeiffer 40f8d17a9f docs: add .claude/CLAUDE.md project context
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 18:09:25 +01:00

37 lines
1.8 KiB
Markdown

# MeshDD-Bot Project Memory
## Workflow Rules
- **Every commit** must include: version bump in `config.yaml` + CHANGELOG.md entry
- Version is in `config.yaml` (field `version:`), NOT in a separate version.py
- Changelog format: `## [x.y.z] - YYYY-MM-DD` with `### Added/Changed/Removed` sections
## Project Structure
- Config: `config.yaml` (live-reloaded via file watcher in `meshbot/config.py`)
- Bot: `meshbot/bot.py` - Meshtastic TCP, commands use `config.get("bot.command_prefix")`
- Web: `meshbot/webserver.py` - aiohttp + WebSocket
- DB: `meshbot/database.py` - SQLite via aiosqlite
- Scheduler: `meshbot/scheduler.py` - Cron-based job scheduler
- Frontend: `static/` - Bootstrap 5.3 dark/light theme, AdminLTE-style layout
- Entry: `main.py`
## Pages & Routes
- `/` - Dashboard (`static/index.html`, `static/js/dashboard.js`)
- `/scheduler` - Scheduler (`static/scheduler.html`, `static/js/scheduler.js`)
- `/map` - Leaflet map (`static/map.html`, `static/js/map.js`)
- `/settings` - Node config (`static/settings.html`, `static/js/settings.js`)
- `/ws` - WebSocket endpoint
- API: `/api/nodes`, `/api/messages`, `/api/stats`, `/api/send`, `/api/node/config`, `/api/scheduler/jobs`
## Frontend Layout Pattern
- All pages use consistent AdminLTE-style: top-navbar (46px), sidebar (200px), content-wrapper
- Sidebar nav with active state, 4 entries: Dashboard, Scheduler, Karte, Einstellungen
- Each JS file has: theme toggle (localStorage), sidebar toggle (mobile), page-specific logic
- Shared styles in `static/css/style.css`
## Key Details
- Meshtastic host configured in config.yaml, not env vars
- Bot start: `/home/peter/meshdd-bot/venv/bin/python main.py`
- Forgejo remote with token in URL
- Current version: 0.3.6
- Protobuf objects converted via `google.protobuf.json_format.MessageToDict()`