From 40f8d17a9f8399726684a1b0b7d5d7dbf52403d6 Mon Sep 17 00:00:00 2001 From: ppfeiffer Date: Sun, 15 Feb 2026 18:09:25 +0100 Subject: [PATCH] docs: add .claude/CLAUDE.md project context Co-Authored-By: Claude Opus 4.6 --- .claude/CLAUDE.md | 36 ++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 37 insertions(+) create mode 100644 .claude/CLAUDE.md diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..7b4175f --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,36 @@ +# 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()` diff --git a/.gitignore b/.gitignore index 2b27f7c..687173f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ env/ *.swo *~ .DS_Store +.claude/settings.local.json