diff --git a/BITCOIN_STANDALONE_UI_COMPLETE.md b/BITCOIN_STANDALONE_UI_COMPLETE.md new file mode 100644 index 00000000..8a2851cf --- /dev/null +++ b/BITCOIN_STANDALONE_UI_COMPLETE.md @@ -0,0 +1,112 @@ +# Bitcoin Core Standalone UI - Complete + +## What Was Built + +A beautiful, standalone Bitcoin Core UI that opens in a **separate browser tab** on its own port (18445), just like the other apps. + +## Features + +### Layout & Design +- **Improved Layout**: Better organized with distinct sections +- **Header Section**: Logo with animated gradient border, title, subtitle, and live status badge +- **Stats Grid**: 4-card responsive grid showing Network, RPC Port, P2P Port, and Block Height +- **Action Cards**: 3 interactive cards for Connection, Settings, and Logs +- **Connection Details**: Expandable section with copy-to-clipboard functionality +- **Modals**: Beautiful glass-morphism modals for Settings and Logs + +### Styling +- Full glassmorphism design matching your onboarding screens +- Gradient backgrounds and borders +- Smooth animations and hover effects +- Responsive design for all screen sizes +- Purple/blue gradient theme (#667eea to #764ba2) + +### Functionality +- **Connection Details**: Toggle to show/hide RPC credentials +- **Copy to Clipboard**: One-click copy for all connection strings +- **Live Block Height**: Simulated updates every 5 seconds +- **Settings Modal**: View node configuration +- **Logs Modal**: View node logs +- **Status Badge**: Shows running/stopped state + +## Files Created/Modified + +### New Files +1. `/Users/dorian/Projects/archy/docker/bitcoin-ui/index.html` + - Standalone HTML page with all CSS and JavaScript + - Self-contained, no external dependencies + - Beautiful Bitcoin logo (embedded SVG) + - Fully functional UI with modals and interactions + +### Modified Files +1. `/Users/dorian/Projects/archy/docker-compose.yml` + - Added `bitcoin-ui` service using nginx:alpine + - Serves the UI on port 18445 + - Maps to `./docker/bitcoin-ui` directory + +2. `/Users/dorian/Projects/archy/neode-ui/src/views/Apps.vue` + - Updated `launchApp()` to open Bitcoin Core in new tab on port 18445 + - Removed internal routing logic + +3. `/Users/dorian/Projects/archy/neode-ui/src/router/index.ts` + - Removed the `/apps/bitcoin-core` route (no longer needed) + +4. `/Users/dorian/Projects/archy/start-docker-apps.sh` + - Updated to show Bitcoin Core UI URL in the service list + +### Deleted Files +1. `/Users/dorian/Projects/archy/neode-ui/src/views/apps/BitcoinCore.vue` + - No longer needed since we have standalone UI + +## How It Works + +1. **Docker Container**: Nginx serves the static HTML page on port 18445 +2. **Launch Flow**: Click Bitcoin Core → Opens `http://localhost:18445` in new tab +3. **UI Updates**: JavaScript simulates block height updates and manages modals +4. **Connection Info**: Shows RPC credentials for connecting other apps + +## Access Points + +- **Main UI**: http://localhost:18445 +- **RPC Endpoint**: localhost:18443 +- **P2P Port**: 18444 +- **ZMQ Blocks**: tcp://localhost:28332 +- **ZMQ Transactions**: tcp://localhost:28333 + +## Credentials + +``` +RPC User: bitcoin +RPC Password: bitcoinpass +``` + +## Testing + +1. **Restart Docker containers** (if already running): + ```bash + cd /Users/dorian/Projects/archy + docker compose down + docker compose up -d + ``` + +2. **Access the UI**: + ```bash + open http://localhost:18445 + ``` + +3. **Test from Neode UI**: + - Go to My Apps + - Click Bitcoin Core + - Should open in new browser tab with beautiful UI + +## What You'll See + +- Large Bitcoin logo with animated glow effect +- "Bitcoin Core" title with gradient text +- Green "Running" status badge +- 4 stat cards showing network info and ports +- 3 action cards that open modals or toggle sections +- Connection details with copy buttons +- Full glassmorphism styling matching your design language + +Perfect integration with your existing glassmorphism aesthetic! diff --git a/DOCKER_HEALTH_CHECK_FIX.md b/DOCKER_HEALTH_CHECK_FIX.md new file mode 100644 index 00000000..13ebbf78 --- /dev/null +++ b/DOCKER_HEALTH_CHECK_FIX.md @@ -0,0 +1,111 @@ +# Docker Health Check Fix - Complete + +## Problem + +The `start-docker-apps.sh` script was failing because: +1. Health checks were too impatient (only 5 seconds wait) +2. The script exited with error if services weren't ready immediately +3. Services like Grafana and SearXNG need 30-60 seconds to fully start +4. Fedimint image had a platform mismatch warning on ARM64 Macs + +## Solutions Applied + +### 1. Improved Health Check Logic (`start-docker-apps.sh`) + +**Before:** +```bash +# Wait 5 seconds, check once, fail if not ready +sleep 5 +check_service "Grafana" "http://localhost:3000" +check_service "SearXNG" "http://localhost:8082" +# If not ready, exit with error +``` + +**After:** +```bash +# Wait up to 60 seconds with retries +MAX_ATTEMPTS=30 +ATTEMPT=0 + +while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do + READY_COUNT=0 + + check_service "Grafana" "http://localhost:3000" && ((READY_COUNT++)) || true + check_service "SearXNG" "http://localhost:8082" && ((READY_COUNT++)) || true + check_service "Endurain" "http://localhost:8084" && ((READY_COUNT++)) || true + check_service "MorphOS" "http://localhost:8081" && ((READY_COUNT++)) || true + + if [ $READY_COUNT -ge 2 ]; then + echo " ✅ Core services are ready!" + break + fi + + sleep 2 + ((ATTEMPT++)) +done + +# Non-blocking - informational only +if [ $READY_COUNT -lt 2 ]; then + echo " â„šī¸ Some services are still starting (this is normal)" + echo " 💡 They will be available shortly. Check with: docker compose ps" +fi +``` + +**Key improvements:** +- Retries up to 30 times (60 seconds total) +- Non-blocking (doesn't fail if services aren't ready) +- Informational messages to reassure users +- Continues startup even if services are still initializing + +### 2. Fixed Fedimint Platform Warning (`docker-compose.yml`) + +**Before:** +```yaml +fedimint: + image: fedimint/fedimintd:v0.3.0 + container_name: archy-fedimint + ports: + - "8173:8173" +``` + +**After:** +```yaml +fedimint: + image: fedimint/fedimintd:v0.3.0 + container_name: archy-fedimint + platform: linux/amd64 # Emulate x86 on ARM Macs + ports: + - "8173:8173" +``` + +This tells Docker to use x86 emulation for Fedimint on ARM Macs, eliminating the warning. + +## Testing + +Run the dev server again: + +```bash +cd scripts +bash dev-start.sh +# Choose option 2 (Full stack) +``` + +**Expected behavior:** +1. Docker containers create and start successfully +2. Health check waits patiently for services +3. Script continues even if some services are still initializing +4. No platform mismatch warnings +5. Backend and frontend start without errors + +## Files Modified + +- `/Users/dorian/Projects/archy/start-docker-apps.sh` - Improved health check logic +- `/Users/dorian/Projects/archy/docker-compose.yml` - Added platform specification for Fedimint + +## Next Steps + +Once you confirm this works: +1. Bitcoin Core should appear in the My Apps section +2. You should be able to launch it and see the custom UI +3. Stop/Start functionality should work +4. All 13 Docker apps should be running in the background diff --git a/FRONTEND_IMPORT_FIX.md b/FRONTEND_IMPORT_FIX.md new file mode 100644 index 00000000..afbf7711 --- /dev/null +++ b/FRONTEND_IMPORT_FIX.md @@ -0,0 +1,68 @@ +# Frontend Import Fix - Complete + +## Problem + +The frontend crashed on startup with this error: + +``` +Failed to resolve import "@/store/app" from "src/views/apps/BitcoinCore.vue". Does the file exist? +``` + +The Bitcoin Core UI couldn't load because of this import error. + +## Root Cause + +The `BitcoinCore.vue` component had an incorrect import path: +- **Wrong**: `import { useAppStore } from '@/store/app'` +- **Correct**: `import { useAppStore } from '@/stores/app'` + +The directory is named `stores` (plural), not `store` (singular). + +## Fix Applied + +Updated the import statement in `/Users/dorian/Projects/archy/neode-ui/src/views/apps/BitcoinCore.vue`: + +```typescript +// Before +import { useAppStore } from '@/store/app' + +// After +import { useAppStore } from '@/stores/app' +``` + +## Docker Health Check - Success! + +The Docker containers are now starting perfectly with the improved health check logic: +- All 17 services running ✅ +- Health checks pass with patient retry logic ✅ +- Fedimint platform warning suppressed ✅ +- Bitcoin Core running on ports 18443-18444 ✅ + +## What Should Work Now + +1. **Frontend should start without errors** +2. **Bitcoin Core UI accessible** at `/dashboard/apps/bitcoin-core` +3. **Launch button works** - clicking Bitcoin Core in My Apps will route to the custom UI +4. **All Docker containers running** in the background + +## Next Steps + +The dev server should now start cleanly. Try: + +```bash +# If the server is still running, it should hot-reload automatically +# If not, restart: +cd /Users/dorian/Projects/archy/scripts +bash dev-start.sh +# Choose option 2 (Full stack) +``` + +Then: +1. Go to `http://localhost:8100` +2. Navigate to My Apps +3. Click on Bitcoin Core +4. You should see the custom glassmorphism UI with network stats, connection details, and action cards + +## Files Modified + +- `/Users/dorian/Projects/archy/neode-ui/src/views/apps/BitcoinCore.vue` - Fixed store import path diff --git a/core/archipelago/src/container/docker_packages.rs b/core/archipelago/src/container/docker_packages.rs index 73805e0d..b61a65d0 100644 --- a/core/archipelago/src/container/docker_packages.rs +++ b/core/archipelago/src/container/docker_packages.rs @@ -29,6 +29,18 @@ impl DockerPackageScanner { let mut packages = HashMap::new(); + // Backend services that should not appear as apps + let excluded_services = [ + "btcpay-db", + "mempool-db", + "mempool-api", + "penpot-db", + "penpot-backend", + "penpot-redis", + "bitcoin-ui", + "lnd-ui", + ]; + for container in containers { // Only process archy-* containers from docker-compose if !container.name.starts_with("archy-") { @@ -40,6 +52,12 @@ impl DockerPackageScanner { .unwrap_or(&container.name) .to_string(); + // Skip backend services (databases, APIs, etc.) + if excluded_services.contains(&app_id.as_str()) { + debug!("Skipping backend service: {}", app_id); + continue; + } + // Get metadata for this app let metadata = get_app_metadata(&app_id); diff --git a/docker-compose.yml b/docker-compose.yml index 68e88645..85a04973 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,18 @@ services: networks: - archy-net + # Bitcoin Core UI - Web interface + bitcoin-ui: + image: nginx:alpine + container_name: archy-bitcoin-ui + ports: + - "18445:80" + volumes: + - ./docker/bitcoin-ui:/usr/share/nginx/html:ro + restart: unless-stopped + networks: + - archy-net + # BTCPay Server btcpay: image: btcpayserver/btcpayserver:1.13.5 @@ -89,6 +101,7 @@ services: fedimint: image: fedimint/fedimintd:v0.3.0 container_name: archy-fedimint + platform: linux/amd64 # Emulate x86 on ARM Macs ports: - "8173:8173" volumes: @@ -129,6 +142,18 @@ services: networks: - archy-net + # LND UI - Web interface + lnd-ui: + image: nginx:alpine + container_name: archy-lnd-ui + ports: + - "8085:80" + volumes: + - ./docker/lnd-ui:/usr/share/nginx/html:ro + restart: unless-stopped + networks: + - archy-net + # Mempool Explorer mempool-web: image: mempool/frontend:v2.5.0 diff --git a/docker/bitcoin-ui/index.html b/docker/bitcoin-ui/index.html new file mode 100644 index 00000000..b835f399 --- /dev/null +++ b/docker/bitcoin-ui/index.html @@ -0,0 +1,644 @@ + + + + + + Bitcoin Core - Archipelago + + + +
+ +
+
+ Bitcoin Core +
+

Bitcoin Core

+

Full Bitcoin node implementation

+
+ + + Running + + v27.0 +
+
+
+ + +
+
+
+ + +
+ +
+ +
+

Network Status

+
+
+ Network + Regtest +
+
+ Block Height + 0 +
+
+ RPC Port + 18443 +
+
+ P2P Port + 18444 +
+
+
+ + +
+

Connection Details

+
+
🌐
+
+
RPC Host
+
localhost:18443
+
+ +
+
+
👤
+
+
RPC User
+
bitcoin
+
+ +
+
+
🔑
+
+
RPC Password
+
bitcoinpass
+
+ +
+
+
📡
+
+
ZMQ Block
+
tcp://localhost:28332
+
+ +
+
+
+ + +
+

About Bitcoin Core

+

+ Bitcoin Core is the reference implementation of the Bitcoin protocol. It includes a transaction verification engine and connects to the Bitcoin network as a full node. +

+ +

Features

+
    +
  • + + + + Full node verification +
  • +
  • + + + + RPC API access +
  • +
  • + + + + ZMQ notifications +
  • +
  • + + + + Transaction indexing +
  • +
+ +
+
+ Version + 27.0 +
+
+ License + MIT +
+
+ Developer + Bitcoin Core +
+
+
+
+
+ + + + + + + + + + diff --git a/docker/lnd-ui/index.html b/docker/lnd-ui/index.html new file mode 100644 index 00000000..ee785cda --- /dev/null +++ b/docker/lnd-ui/index.html @@ -0,0 +1,601 @@ + + + + + + Lightning Network - Archipelago + + + +
+
+
+
+ + + +
+
+

Lightning Network (LND)

+

Lightning Network Daemon for instant Bitcoin payments

+
+ + + Running + + v0.17.4-beta +
+
+
+ + +
+
+
+ +
+
+
+

Node Status

+
+
+ Network + Regtest +
+
+ Channels + 0 +
+
+ gRPC Port + 10009 +
+
+ REST Port + 8080 +
+
+
+ +
+

Connection Details

+
+
🌐
+
+
REST API
+
http://localhost:8080
+
+ +
+
+
📡
+
+
gRPC Host
+
localhost:10009
+
+ +
+
+
⚡
+
+
P2P Port
+
9735
+
+ +
+
+
🔗
+
+
Bitcoin Backend
+
bitcoin:18443
+
+ +
+
+
+ +
+

About LND

+

+ The Lightning Network Daemon (LND) is a complete implementation of a Lightning Network node. It enables instant, low-fee Bitcoin transactions through payment channels. +

+ +

Features

+
    +
  • + + + + Instant payments +
  • +
  • + + + + Low transaction fees +
  • +
  • + + + + REST & gRPC APIs +
  • +
  • + + + + Channel management +
  • +
+ +
+
+ Version + 0.17.4-beta +
+
+ License + MIT +
+
+ Developer + Lightning Labs +
+
+
+
+
+ + + + + + + + diff --git a/neode-ui/dev-dist/sw.js b/neode-ui/dev-dist/sw.js index e05a3c4a..ae943c56 100644 --- a/neode-ui/dev-dist/sw.js +++ b/neode-ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-21a80088'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.c834l92akjo" + "revision": "0.okiiuc1577o" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/neode-ui/src/router/index.ts b/neode-ui/src/router/index.ts index 1b5d21d3..16a8058f 100644 --- a/neode-ui/src/router/index.ts +++ b/neode-ui/src/router/index.ts @@ -97,11 +97,6 @@ const router = createRouter({ name: 'app-details', component: () => import('../views/AppDetails.vue'), }, - { - path: 'apps/bitcoin-core', - name: 'bitcoin-core', - component: () => import('../views/apps/BitcoinCore.vue'), - }, { path: 'marketplace', name: 'marketplace', diff --git a/neode-ui/src/views/Apps.vue b/neode-ui/src/views/Apps.vue index 8162b1ed..f1f03161 100644 --- a/neode-ui/src/views/Apps.vue +++ b/neode-ui/src/views/Apps.vue @@ -185,9 +185,9 @@ function launchApp(id: string) { const isDev = import.meta.env.DEV const pkg = packages.value[id] - // Special handling for Bitcoin Core - route to custom UI + // Special handling for Bitcoin Core - open in new tab on port 18445 if (id === 'bitcoin') { - router.push('/dashboard/apps/bitcoin-core') + window.open('http://localhost:18445', '_blank', 'noopener,noreferrer') return } diff --git a/neode-ui/src/views/apps/BitcoinCore.vue b/neode-ui/src/views/apps/BitcoinCore.vue deleted file mode 100644 index ec1fa8ce..00000000 --- a/neode-ui/src/views/apps/BitcoinCore.vue +++ /dev/null @@ -1,317 +0,0 @@ - - - - - diff --git a/start-docker-apps.sh b/start-docker-apps.sh index 1af7aaf8..2ce386dc 100755 --- a/start-docker-apps.sh +++ b/start-docker-apps.sh @@ -42,32 +42,13 @@ if ! docker images | grep -q "lncm/bitcoind\|homeassistant/home-assistant\|grafa fi fi -if [ "$FIRST_RUN" = true ]; then +if [ "$FIRST_RUN" = "true" ]; then echo "đŸ“Ļ Pulling Docker images (this will take a while)..." echo " 💡 Tip: You can monitor progress in Docker Desktop" echo "" - # Pull all images quietly - $COMPOSE_CMD pull --quiet & - PULL_PID=$! - - # Show a simple spinner while pulling - spin='-\|/' - i=0 - echo -n " Downloading images... " - while kill -0 $PULL_PID 2>/dev/null; do - i=$(( (i+1) %4 )) - printf "\r Downloading images... ${spin:$i:1}" - sleep 0.2 - done - - wait $PULL_PID - PULL_EXIT=$? - printf "\r Downloading images... ✅\n" - - if [ $PULL_EXIT -ne 0 ]; then - echo "❌ Failed to pull some images. Continuing anyway..." - fi + # Pull quietly to avoid terminal flooding + $COMPOSE_CMD pull --quiet echo "" echo "✅ All images downloaded!" @@ -81,30 +62,56 @@ echo "🚀 Starting all containers..." $COMPOSE_CMD up -d echo "" -echo "âŗ Waiting for services to be ready..." -sleep 5 - -# Check health of key services +echo "âŗ Waiting for services to initialize..." echo "" -echo "🔍 Checking service health..." + +# Give containers time to start +sleep 3 + +# Check health of key services (non-blocking, just for info) +echo "🔍 Checking service health (this may take 30-60 seconds)..." READY_COUNT=0 -TOTAL_SERVICES=13 +MAX_ATTEMPTS=30 +ATTEMPT=0 check_service() { local name=$1 local url=$2 if curl -sf "$url" > /dev/null 2>&1; then echo " ✅ $name is ready" - ((READY_COUNT++)) + return 0 else - echo " âŗ $name is starting..." + return 1 fi } -check_service "Grafana" "http://localhost:3000" -check_service "SearXNG" "http://localhost:8082" -check_service "Endurain" "http://localhost:8084" -check_service "MorphOS" "http://localhost:8081" +# Check services with retries +while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do + READY_COUNT=0 + + check_service "Grafana" "http://localhost:3000" && ((READY_COUNT++)) || true + check_service "SearXNG" "http://localhost:8082" && ((READY_COUNT++)) || true + check_service "Endurain" "http://localhost:8084" && ((READY_COUNT++)) || true + check_service "MorphOS" "http://localhost:8081" && ((READY_COUNT++)) || true + + if [ $READY_COUNT -ge 2 ]; then + echo " ✅ Core services are ready!" + break + fi + + if [ $ATTEMPT -eq 0 ]; then + echo " âŗ Services are starting (this is normal)..." + fi + + sleep 2 + ((ATTEMPT++)) +done + +if [ $READY_COUNT -lt 2 ]; then + echo "" + echo " â„šī¸ Some services are still starting (this is normal)" + echo " 💡 They will be available shortly. Check with: docker compose ps" +fi echo "" echo "📊 Container Status:" @@ -114,7 +121,8 @@ echo "" echo "🌐 Apps are available at:" echo "" echo " 💰 Bitcoin & Lightning:" -echo " â€ĸ Bitcoin Core (regtest): RPC at localhost:18443" +echo " â€ĸ Bitcoin Core UI: http://localhost:18445" +echo " â€ĸ Bitcoin Core RPC: localhost:18443" echo " â€ĸ Lightning (LND REST): http://localhost:8080" echo " â€ĸ BTCPay Server: http://localhost:14142" echo " â€ĸ Mempool Explorer: http://localhost:4080"