archy/neode-ui
archipelago a8158b1ef5 fix(ui): single-button lifecycle control with transitional labels
The app card and details view previously used a pair of Start/Stop
buttons whose labels were driven off isAppLoading(), a client-side
"I just clicked the button" flag. When the backend's graceful stop
took longer than the RPC round-trip (up to 600s on bitcoin-core),
the flag cleared while the container was still shutting down, the
UI flipped back to "Running" as soon as the next 10s scan saw the
still-alive container, and the user had no indication the stop was
still in flight.

Now that the backend flips PackageState to Stopping / Starting /
Restarting / Installing / Updating / Removing for the duration of
each lifecycle operation and the scan loop preserves those states,
the UI can drive its label off the container state itself. A single
full-width primary button replaces the Start/Stop pair. Its label,
color, and disabled state come from getAppVisualState(), which
collapses resting states (exited/created/paused/installed) into
"stopped" and passes transitional states through untouched.

Changes:

- container-client.ts: widen ContainerStatus.state union to include
  the six transitional variants plus "installed". Add
  restartContainer() calling the new container-restart RPC.
- stores/container.ts: add getAppVisualState() computed and the
  restartContainer() action.
- ContainerApps.vue: single primary button (Start / Stop / Starting
  / Stopping / Restarting etc.) plus a separate circular Restart
  button visible only when running. Critically, handleStartApp and
  handleStopApp now route through store.startContainer and
  stopContainer (which call container-start / container-stop, the
  async RPCs) instead of the legacy synchronous bundled-app-start /
  bundled-app-stop path. Transitional-state polling widened from
  just "created" to the full set of transitional variants.
- ContainerAppDetails.vue: same single-button pattern, Restart
  button now calls container-restart instead of the old
  stop-sleep-start sequence, added 2s polling interval for
  transitional states.
- components/ContainerStatus.vue: widen state prop to match the
  shared union, render transitional labels with a trailing ellipsis
  and a yellow dot.

No new tests — this is presentation logic. Manual verification on
.228 will confirm the end-to-end async path: click Stop on LND,
button becomes "Stopping" in under a second, stays that way for
roughly 5 minutes, then flips to "Start" with a grey dot. The UI
must never revert to "Running" mid-stop.
2026-04-23 05:20:15 -04:00
..
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-04-11 13:38:01 +01:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00
2026-01-24 22:59:20 +00:00

Archipelago Web UI

Vue 3 + TypeScript + Vite + Tailwind CSS + Pinia

The web interface for Archipelago — a self-sovereign Bitcoin Node OS.

Quick Start

cd neode-ui
npm install
npm start

Visit http://localhost:8100 — login with password: password123

This starts:

  • Mock backend on port 5959 (no Docker required)
  • Vite dev server on port 8100 with HMR

Stop with npm stop.

Architecture

neode-ui/
├── src/
│   ├── api/              # RPC client (rpc-client.ts), WebSocket, container client
│   ├── stores/           # Pinia stores (app, container, appLauncher, monitoring)
│   ├── views/            # Page components (Dashboard, Marketplace, Settings, etc.)
│   ├── components/       # Reusable components (SplashScreen, AppSession, etc.)
│   ├── router/           # Vue Router configuration
│   ├── types/            # TypeScript type definitions
│   └── style.css         # Global styles + Tailwind utilities
├── public/assets/        # Static assets (images, fonts, app icons, audio)
├── mock-backend.js       # Mock backend server (simulates Rust backend)
├── docker/               # Docker configs (nginx, entrypoint)
└── vite.config.ts        # Vite config with backend proxy

Dev Modes

The mock backend supports multiple startup modes via VITE_DEV_MODE:

Mode Command Behavior
default npm start Fully set up, login screen
existing VITE_DEV_MODE=existing npm run dev:mock Same as default
setup VITE_DEV_MODE=setup npm run dev:mock First-time password setup flow
onboarding VITE_DEV_MODE=onboarding npm run dev:mock Post-setup onboarding flow
boot npm run dev:boot 25s simulated boot sequence

Mock Backend

The mock backend (mock-backend.js) simulates the full Rust backend for local development:

Pre-installed apps (always visible in My Apps):

  • Bitcoin Core, LND, Electrs, Mempool, FileBrowser, LoraBell, ThunderHub, Fedimint

Marketplace: 30+ curated apps with Docker images, install/uninstall simulation

Features simulated:

  • Authentication (login, password change, TOTP 2FA)
  • System metrics (CPU, memory, disk — randomized for realism)
  • Node identity (DID, Nostr pubkey, Tor address)
  • Federation (3 mock nodes with apps, metrics, trust levels)
  • Mesh networking (4 LoRa peers, encrypted messaging, invoices)
  • Peer-to-peer messaging
  • FileBrowser API (mock file system with Music, Documents, Photos, Videos)
  • DWN sync status
  • Transport layer (mesh/LAN/Tor routing)
  • Notifications (5 realistic entries)
  • Claude AI chat proxy (requires ANTHROPIC_API_KEY)

Container runtime: If Docker/Podman is available, the mock backend will run real containers for installed apps. Otherwise, it simulates them.

Demo Deployment (Portainer)

Deploy the demo via Docker Compose for showcasing:

docker compose -f docker-compose.demo.yml build
docker compose -f docker-compose.demo.yml up -d

Or deploy through Portainer Stacks:

  1. Stacks > Add stack > name: archy-demo
  2. Web editor: paste docker-compose.demo.yml contents
  3. Add environment variable: ANTHROPIC_API_KEY (for Claude chat)
  4. Deploy

Access at http://your-host:4848 — password: password123

Development Commands

npm start              # Start mock backend + Vite (recommended)
npm stop               # Stop all servers
npm run dev:mock       # Same as start, without port cleanup
npm run dev:boot       # Boot mode (simulated startup delay)
npm run backend:mock   # Mock backend only
npm run dev            # Vite only (needs backend running separately)
npm run dev:real       # Vite with real Rust backend

npm run build          # Production build (outputs to ../web/dist/neode-ui/)
npm run build:docker   # Build for Docker (no type checking)
npm run type-check     # TypeScript type checking
npm test               # Run tests

Design System

Glass Classes

Class Use
.glass-card Content containers, modals, panels
.glass-button ALL buttons (primary and secondary)
.path-option-card Interactive cards with hover lift
.info-card Status badges, metric displays

Tokens

  • Font: Avenir Next (primary), Montserrat (font-archipelago)
  • Glass: bg: rgba(0,0,0,0.60), blur: 24px, border: rgba(255,255,255,0.22)
  • Accent: #fb923c (Bitcoin orange), #4ade80 (green), #ef4444 (red)
  • Text: rgba(255,255,255,0.9) primary, rgba(255,255,255,0.6) muted

Rules

  • Global CSS classes in style.css only — never inline Tailwind in components
  • .gradient-button is banned — use .glass-button
  • All components use <script setup lang="ts">

API

import { rpcClient } from '@/api/rpc-client'

await rpcClient.login('password')
await rpcClient.startPackage('bitcoin')
const metrics = await rpcClient.getMetrics()

State management via Pinia stores. WebSocket patches applied automatically.

Build Output

  • Dev build: ../web/dist/neode-ui/
  • Docker build: dist/ (deployed to nginx)
  • Production deploy: via scripts/deploy-to-target.sh --live

License

MIT