Commit Graph

23 Commits

Author SHA1 Message Date
michael
5b9790c901 fix: correct LED B color from blue to red for PM3 Easy
Some checks failed
Build Base Image (Stages 0-2) / build-base (push) Has been cancelled
LED B on PM3 Easy is red per firmware define LED_RED=LED_B, not blue.
Updated all examples to use color names (green, red, orange, red2).
Added tune LED visualization examples and updated code references.

Tune LED color mappings inspired by the Dangerous Things RFID
diagnostic card color scheme:
- LF tune: Green (PM3 Easy) / Red2 (RDV4)
- HF tune: Red (PM3 Easy) / Orange (RDV4)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 20:15:49 -07:00
dangerous-tac0s
daad47933c Remove Greetings workflow 2026-03-04 14:55:28 -08:00
dangerous-tac0s
262a0f7c13 Remove GitHub Actions Demo workflow 2026-03-04 14:55:25 -08:00
michael
a9acdb85ce Build optimization: pre-built PM3 binaries, ARM64 CI, base image caching
Replace PM3 compile-from-source in pi-gen with pre-built tarball extraction
(saves 43-58 min). Merge stagePM3 into stageDangerousPi as 02-pm3-install
substage, renumber all subsequent substages. Switch CI PM3 build to native
ARM64 runner (ubuntu-24.04-arm64) eliminating QEMU overhead. Add weekly
base-image workflow for pre-baking stages 0-2. Support PM3_TARBALL,
BASE_IMAGE, and APT_PROXY env vars in build-image.sh.

Also includes prior Phase 5 work: theme system, design system integration,
component update system, OS updates, CI build pipeline, and test results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 12:01:01 -08:00
michael
2ec89041ef Phase 4 enhancements: WebSocket auth, HTTPS UI, plugin hooks, build fixes
Security:
- Add token-based WebSocket authentication (closes critical security gap)
  - In-memory token store with 24h TTL (token_store.py)
  - POST /api/auth/token exchanges Basic Auth for WS token
  - GET /api/auth/status public endpoint for auth check
  - WebSocket validates token query param, rejects with close code 4401
  - Frontend LoginPrompt modal for credential entry
  - WebSocket manager handles full auth flow with auth_required state
  - No-op when AUTH_ENABLED=false (preserves existing behavior)

HTTPS:
- Wire HTTPS toggle in Settings UI (POST /api/system/ssl/toggle)
- Add certificate regeneration button
- Display SSL info (expiration, SANs, SHA256 fingerprint)

Plugins:
- Wire trigger_hook("pm3_command") in PM3 service
- Wire trigger_hook("update_check") in update manager

Build/Infrastructure:
- Enable NetworkManager in pi-gen AP setup stage
- Add HF booster board detection patch for Proxmark3
- Update LED PWM control patch
- Fix BLE adapter, UPS drivers, WiFi manager improvements
- Update HTTPS support stage script

Documentation:
- Update PROJECT_STATUS.md and IMPLEMENTATION_PRIORITIES.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:45:11 -08:00
michael
4f35df1781 Initial commit - Phase 3/4
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 13:46:22 -08:00
michael
1da6730735 Add Dangerous Pi MVP implementation - complete backend and system integration
This commit adds the complete Dangerous Pi web management interface with all MVP features implemented and tested locally.

## New Features

### Backend (Python + FastAPI)
- Complete FastAPI backend with async support
- 40+ API endpoints (Health, PM3, WiFi, Updates, UPS, BLE, Plugins)
- 6 managers: Session, WiFi, Update, UPS, BLE, Plugin
- SQLite database with sessions, config, history, crash reports
- Server-Sent Events (SSE) for real-time notifications
- Mock PM3 worker for development without hardware

### WiFi Manager
- Interface detection (USB vs built-in)
- Network scanning with signal strength
- Mode switching (AP/Client/Dual/Auto/Off)
- Network connection with password support
- Hidden SSID and saved networks support
- Static IP and DHCP configuration
- 10 WiFi API endpoints

### Update Manager
- GitHub releases API integration
- Automatic periodic update checks
- Semantic version comparison
- Update download with progress tracking
- SHA256 checksum verification
- Automatic installation with backup and rollback
- PM3 client rebuild after updates
- 6 Update API endpoints

### UPS Manager
- I2C battery monitoring (MAX17040-compatible)
- Battery percentage, voltage, current tracking
- Power source detection (AC/Battery)
- Safe shutdown triggers at configurable thresholds
- Event callbacks for battery warnings
- SSE and BLE notification integration
- 3 UPS API endpoints

### BLE Manager
- Bluetooth Low Energy notification support
- Auto-detects BLE capability
- Multiple notification types (updates, battery, shutdown, etc.)
- BLE advertising management
- Device connection tracking
- 4 BLE API endpoints

### Plugin Framework
- Dynamic plugin loading/unloading
- Plugin lifecycle management (load, enable, disable, unload)
- Hook system for extensibility
- JSON-based metadata
- Example "Hello World" plugin included
- 7 Plugin API endpoints

### Frontend (Remix.js + React)
- Cyberpunk-themed responsive UI
- Dashboard with system status
- PM3 command interface with history
- Settings page with WiFi and Update management
- Command logs viewer
- Theme toggle (Dark/Light/Auto)
- Server-side rendering (SSR)
- Mobile-first responsive design

### System Integration
- Systemd service with security hardening
- Automated install/uninstall scripts
- Environment configuration template
- Hardware access groups (i2c, bluetooth, gpio, dialout)
- Pi-gen stage 04 integration for OS image building
- Port conflict resolution with ttyd-bash
- I2C interface auto-enable for UPS HAT

### Testing
- test_backend.py - Backend API tests
- test_ups.py - UPS manager tests
- test_ble.py - BLE manager tests
- test_plugins.py - Plugin manager tests
- All tests passing locally

### Documentation
- 12 comprehensive documentation files
- claude.md - AI development guide
- WIFI_MANAGER.md - WiFi management guide
- UPDATE_MANAGER.md - Update system guide
- PORT_CONFLICT.md - Port conflict resolution guide
- MVP_COMPLETE.md - MVP implementation summary
- PROJECT_STATUS.md - Project status and roadmap
- systemd/README.md - Service management docs
- pi-gen integration documentation

## Technical Details
- ~5,000+ lines of backend code
- 11 Python dependencies (smbus2 added for UPS)
- FastAPI with async/await throughout
- Type hints and docstrings on all functions
- RESTful API design with SSE for notifications
- Security hardening (non-root, protected dirs, resource limits)

## Next Steps
- Deploy to Raspberry Pi Zero 2 W hardware
- Test with real Proxmark3 device
- Test UPS HAT integration
- Test BLE on Pi hardware
- Build custom OS image with pi-gen
- Performance optimization for Pi Zero 2 W

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 08:11:36 -08:00
Konstantin Krastev
0a586c5360 Merge pull request #1 from grizmin/debian-trixie
Debian trixie
2025-09-07 03:47:48 +03:00
Konstantin Krastev
92d957c733 Fix command in build instructions and update changelog for v1.1.0 2025-09-07 03:44:00 +03:00
Konstantin Krastev
e80c7aa93f Update PHP version references and configuration in scripts for debian Trixie 2025-09-07 03:40:53 +03:00
Konstantin Krastev
0a11da3a72 Create actions-demo.yaml 2024-11-07 19:19:24 +02:00
Konstantin Krastev
0be58e8478 Create greetings.yml 2024-11-07 18:43:27 +02:00
Konstantin Krastev
e74abf9e7e Update README.md 2024-07-22 23:38:20 +03:00
Konstantin Krastev
91a28f0d2e update readme 2024-07-22 19:11:14 +03:00
Konstantin Krastev
1a5fe4a0c5 fixed issues: ttyd, ap, pi-gen 2024-07-22 18:00:13 +03:00
Konstantin Krastev
f653803032 up-to-date 2024-07-18 15:13:01 +03:00
Konstantin Krastev
b3d3860fa2 update php-cgi 2024-07-18 11:03:45 +03:00
Konstantin Krastev
8fc961da3a update image 2024-07-18 00:35:31 +03:00
Adam Morris
4dbd6f4ab4 updatded php-cgi package, removed rfkill 2022-04-17 18:43:35 -07:00
Adam Morris
6763d2a5c5 Initial switch to raspap 2022-04-17 17:36:23 -07:00
Adam Morris
a879e32621 Working 64 bit version 2022-03-30 21:27:27 -07:00
Adam Morris
6755c5ac13 Updated instructions so you can use this repo and the pi-gen repo to create your images 2022-03-28 21:49:34 -07:00
Adam Morris
24682abaa4 Initial repository 2022-03-27 21:49:00 -07:00