# CLAUDE.md — Archipelago (Archy) Project Guide ## Project Overview Archipelago is a **Bitcoin Node OS** — a bootable, self-sovereign personal server you flash to USB, install on hardware, and manage via a web UI. Similar to Umbrel/Start9/RaspiBlitz but custom-built with production-grade security. **Stack**: Rust backend + Vue 3 (Composition API) + TypeScript (strict) + Vite 7 + Tailwind CSS + Pinia + Podman **Target OS**: Debian 12 (Bookworm) — x86_64 and ARM64 **Current version**: 0.1.0 --- ## BETA FREEZE — ACTIVE (2026-03-18) **Goal: Ship a flawless beta that works perfectly on every machine we install it on.** We are in **beta stabilization mode**. The current feature set is LOCKED. Every session must push toward this goal. ### Pipeline ``` PHASE 1: Feature Testing (internal) ← WE ARE HERE ↓ Gate: every feature works, bugs fixed, security hardened, ISO verified PHASE 2: User Testing (real users on real hardware we don't control) ↓ Gate: user-reported issues resolved, telemetry shows stable fleet PHASE 3: Beta Live (public release) ``` ### What IS allowed - Bug fixes for existing features - Security hardening and testing - Beta telemetry / node reporting (TASK-12 — needed for user testing) - UI/layout rearrangements (moving things around, improving flow) - Boot screen completion (FEATURE-4 — already in progress) - Testing all features end-to-end on fresh installs - Performance and reliability improvements to existing code - ISO build hardening ### What is NOT allowed - New features (watch-only wallet, mesh balance check, etc. are POST-BETA) - New app integrations - New backend modules or RPC endpoints (unless fixing existing bugs or beta telemetry) - New dependencies (unless required for beta infrastructure) - Scope creep of any kind ### Status tracking - **Progress tracker**: `docs/BETA-PROGRESS.md` — updated every session - **Beta checklist**: `docs/BETA-RELEASE-CHECKLIST.md` — the acceptance criteria - **Master plan**: `docs/MASTER_PLAN.md` — phased roadmap (Phase 1/2/3) ### Session protocol 1. Read `docs/BETA-PROGRESS.md` at start of every session 2. Report current phase and status before starting work 3. Work only on current-phase items 4. Update `docs/BETA-PROGRESS.md` at end of every session with what changed --- ## Quick Reference ```bash # Frontend local dev (mock backend on :5959, Vite on :8100) cd neode-ui && npm start # Deploy to live server (frontend + backend + restart services) ./scripts/deploy-to-target.sh --live # Deploy to both servers ./scripts/deploy-to-target.sh --both # Frontend build (outputs to web/dist/neode-ui/) cd neode-ui && npm run build # Type-check frontend cd neode-ui && npm run type-check # Rust checks (run on dev server, NOT macOS) cargo clippy --all-targets --all-features cargo fmt --all cargo test --all-features ``` Dev server: `http://192.168.1.228` | Local frontend: `http://localhost:8100` (password: `password123`) ## Architecture ``` Debian 12 (Bookworm) ├── Podman (rootless containers) ├── Nginx (port 80 → proxies /rpc/, /ws/, /health to backend) ├── Rust Backend (core/) — binary on port 5678 │ ├── core/archipelago/ — Main binary, RPC endpoints │ ├── core/container/ — PodmanClient, manifest parser, dependency resolver, health monitor │ ├── core/security/ — AppArmor profiles, secrets manager, Cosign image verifier │ ├── core/performance/ — Resource manager │ └── core/parmanode/ — Parmanode compatibility layer └── Vue.js UI (neode-ui/) ├── src/api/ — RPC client (rpc-client.ts), WebSocket, container client ├── src/stores/ — Pinia stores ├── src/views/ — Page components ├── src/components/ — Reusable components ├── src/router/ — Vue Router ├── src/types/ — TypeScript type definitions └── src/style.css — Global styles + Tailwind utilities ``` ### Data Paths (Server) - App data: `/var/lib/archipelago/{app-id}/` - Secrets: `/var/lib/archipelago/secrets/{app-id}/` (encrypted) - Frontend: `/opt/archipelago/web-ui/` - Backend binary: `/usr/local/bin/archipelago` - Systemd service: `/etc/systemd/system/archipelago.service` - Nginx config: `/etc/nginx/sites-available/archipelago` ## CRITICAL Workflow Rules ### 1. NEVER Build Rust on macOS for Linux Always rsync source to the Linux dev server and build there. Building on macOS and copying the binary causes Exec format errors. ```bash # Deploy does this automatically: ./scripts/deploy-to-target.sh --live ``` ### 2. Always Deploy After Changes After editing code (frontend, backend, scripts, or configs), deploy to the live server. Do not leave deployment to the user. ### 3. Frontend Build Output Path Frontend builds to `web/dist/neode-ui/` — NOT `neode-ui/dist/`. ### 4. Deploy-Test-Fix Loop 1. Make the change 2. Deploy with `./scripts/deploy-to-target.sh --live` 3. Test at http://192.168.1.228 4. If broken, fix and redeploy — repeat until working 5. End loop only when everything works ### 5. SSH Access - **Primary**: `archipelago@192.168.1.228` — password: `EwPDR8q45l0Upx@` - **Secondary**: `archipelago@192.168.1.198` - Credentials stored in gitignored `scripts/deploy-config.sh` ```bash sshpass -p 'EwPDR8q45l0Upx@' ssh -o StrictHostKeyChecking=no archipelago@192.168.1.228 ``` ## Frontend Rules (Vue.js + TypeScript) ### Component Standards - **Always** `