Files
tri-pi/CLAUDE.md
T
Krystie c1d44cb027 Initial TRI-PI project import
- Raspberry Pi installer for Triangles cryptocurrency node
- QEMU ARM emulation smoke tests (build/qemu-smoke.sh)
- Backend API (Flask app for node monitoring)
- Frontend web UI (status dashboard)
- Tor integration templates
- systemd service files
- Installation scripts
2026-03-28 16:23:04 -07:00

2.6 KiB

tri-pi Project Notes

tri-pi is the appliance wrapper around a separate triangles source checkout.

This repo should own:

  • Raspberry Pi provisioning
  • Tor hidden service setup
  • local status UI and API
  • systemd integration
  • cross-build and QEMU validation glue

This repo should not own:

  • Triangles protocol code
  • wallet UI code
  • consensus changes

Repository Boundary

Recommended local layout:

e:/repos/
├── triangles/
└── tri-pi/

Use triangles for building trianglesd itself. Use tri-pi for packaging and operating that daemon on Raspberry Pi hardware.

Repository Layout

  • backend/ — Python status API server (real RPC to trianglesd, systemctl health, Tor hostname)
  • frontend/ — Vanilla JS dashboard (auto-refresh, responsive grid)
  • build/ — ARM cross-build (build-arm.sh) and QEMU smoke test (qemu-smoke.sh)
  • setup/ — Pi installer (install.sh), Tor setup (configure-tor.sh), config generator
  • services/ — systemd units for trianglesd and tripi-backend
  • tor/ — torrc template for v3 hidden service
  • config/triangles.conf template and backend env example
  • docs/ — architecture and development notes

Architectural Direction

The backend/frontend split is inspired by velxio, but the product scope is much smaller:

  • no browser IDE
  • no board simulator
  • no multi-user platform features
  • yes to reproducible local runtime orchestration
  • yes to QEMU-backed validation of the Pi appliance

Install & Deploy Flow

  1. Cross-compile: ./build/build-arm.sh (needs ../triangles source checkout)
  2. Install on Pi: TRIANGLESD_BIN=build/output/trianglesd sudo ./setup/install.sh
  3. Validate: sudo ./build/qemu-smoke.sh (uses systemd-nspawn + qemu-user-static)

Key Paths (on Pi)

What Path
App prefix /opt/tri-pi/
Daemon config /etc/triangles/triangles.conf
Daemon data /var/lib/triangles/
Backend env /etc/default/tripi-backend
Tor hidden service /var/lib/tor/tri-pi/
Tor hostname file /var/lib/tor/tri-pi/hostname

Next Steps

  1. Run QEMU smoke test on a real ARM64 host to validate end-to-end.
  2. Decide whether releases ship prebuilt ARM binaries or build on device.
  3. Add first-boot provisioning hooks in image/ for SD card images.
  4. Consider adding a lightweight health-check endpoint the dashboard can use for uptime monitoring.