HackPanel is a macOS-native dashboard for monitoring and diagnosing an OpenClaw Gateway.
It combines a SwiftUI app (HackPanelApp) with a reusable gateway client library (HackPanelGateway) and mock implementations for development (HackPanelGatewayMocks).
- What this repository contains
- Features
- Project structure
- Requirements
- Quick start
- Development workflow
- Testing
- Makefile commands
- CI
- Documentation and assets
- Security
- Contributing
- Troubleshooting
This repo is a Swift Package with three products:
HackPanelApp(executable): the macOS app.HackPanelGateway(library): gateway protocol/client models and decoding logic.HackPanelGatewayMocks(library): deterministic mock client(s) for app development and previews.
Current implemented areas include:
- Gateway connection state and health handling.
- Decoding and modeling gateway status and node list payloads.
- SwiftUI dashboard/navigation surfaces.
- Settings validation and local defaults support.
- Diagnostics formatting and helper utilities.
- Extensive unit coverage for frame decoding, payload contracts, and app-level connection behavior.
.
├── Sources/
│ ├── HackPanelApp/ # macOS app (SwiftUI UI, connection store, support utils)
│ ├── HackPanelGateway/ # Gateway client, frames/payloads, shared models
│ └── HackPanelGatewayMocks/ # Mock gateway client implementation
├── Tests/
│ ├── HackPanelAppTests/ # App-level unit tests
│ └── HackPanelGatewayTests/ # Gateway protocol/model decoding tests + fixtures
├── Scripts/ # Dev/automation helpers
├── Docs/ # Screenshots, PR review docs, media assets
├── Package.swift # SwiftPM package definition
└── Makefile # Common development commands
- macOS 14+
- Xcode 15.4+ (recommended for Swift tools compatibility)
- Swift toolchain supporting
swift-tools-version: 5.10
git clone <your-fork-or-repo-url>
cd hackpanelswift buildswift test- Open
Package.swiftin Xcode. - Choose the
HackPanelAppexecutable scheme. - Build and run.
Recommended local loop:
make format-check(or your formatter/lint flow if you use one locally)make buildmake testmake sanity(matches CI build+test sequence)
If you are changing gateway decoding/contracts, also run:
make test-gatewayIf you are changing app connection/UI behavior, also run:
make test-appThe repo has two test bundles:
HackPanelGatewayTests- Validates JSON fixtures for frame contract and payload decoding.
HackPanelAppTests- Validates app-focused behavior (settings validation, connection store behavior, diagnostics formatting, keychain/storage helpers).
You can run all tests with swift test or target specific suites with swift test --filter <SuiteName>.
A Makefile is included for common tasks and CI parity.
make helpKey targets:
make build— Build package.make test— Run all tests.make test-app— Run app tests only.make test-gateway— Run gateway tests only.make run— Launch app via SwiftPM executable.make sanity— RunScripts/spm_sanity_check.sh(used in CI).make clean— Clean SwiftPM build artifacts.
GitHub Actions CI is configured in:
.github/workflows/ci.yml
CI currently executes the SwiftPM sanity check script to ensure build/test parity with local development.
Docs/PR_REVIEW.md— PR review guidance.Docs/Screenshots/— UI screenshots.Docs/Snapshots/— Snapshot comparison media.Docs/copy-diagnostics.gif— Diagnostics copy UX demo.
- Do not commit secrets, tokens, or private keys.
- Review
SECURITY.mdfor reporting guidance. - Keep local credentials in secure storage and gitignored files only.
See CONTRIBUTING.md for branch naming, PR expectations, and local workflow.
make clean
swift package resolvemake clean
make testmake sanity