diff --git a/ALL_DOMAINS_REFERENCE.md b/ALL_DOMAINS_REFERENCE.md new file mode 100644 index 0000000..bd283be --- /dev/null +++ b/ALL_DOMAINS_REFERENCE.md @@ -0,0 +1,576 @@ +# Complete Domain Reference for All BlackRoad & Lucidia Infrastructure + +**Owner:** Alexa Louise Amundson +**Organization:** BlackRoad Inc. +**Last Updated:** 2025-12-22 + +--- + +## Domain Summary + +**Total Domains:** 16+ zones +**Total Cloudflare Pages Projects:** 50+ +**Raspberry Pi Devices:** 4 +**Cloud VPS:** 1 (DigitalOcean) + +--- + +## Primary Domains + +### Lucidia Ecosystem + +| Domain | Zone ID | Pages Project | Purpose | Status | +|--------|---------|---------------|---------|--------| +| **lucidia.earth** | 848cf0b18d51e0170e0d1537aec3505a | lucidia-earth | Metaverse platform | ✅ Active | + +**Subdomains:** +- `api.lucidia.earth` → Raspberry Pi 192.168.4.38:3000 +- `ws.lucidia.earth` → Raspberry Pi 192.168.4.38:8080 (WebSocket) +- `admin.lucidia.earth` → lucidia-admin.pages.dev +- `docs.lucidia.earth` → lucidia-docs.pages.dev +- `dev.lucidia.earth` → lucidia-dev.pages.dev + +**Related Pages Projects:** +- lucidia-earth.pages.dev (main metaverse) +- lucidia-platform.pages.dev +- lucidia-core.pages.dev +- lucidia-math.pages.dev + +### BlackRoad Primary + +| Domain | Zone ID | Pages Project | Purpose | Status | +|--------|---------|---------------|---------|--------| +| **blackroad.io** | TBD | blackroad-io | Corporate site | ✅ Active | + +**Subdomains:** +- `earth.blackroad.io` → earth-blackroad-io.pages.dev +- `demo.blackroad.io` → blackroad-os-demo.pages.dev +- `home.blackroad.io` → blackroad-os-home.pages.dev +- `api.blackroad.io` → DigitalOcean 159.65.43.12:3000 +- `creator-studio.blackroad.io` → blackroad-hello.pages.dev +- `creator.blackroad.io` → blackroad-hello.pages.dev +- `devops.blackroad.io` → blackroad-hello.pages.dev +- `education.blackroad.io` → blackroad-hello.pages.dev +- `finance.blackroad.io` → blackroad-hello.pages.dev +- `ideas.blackroad.io` → blackroad-hello.pages.dev +- `legal.blackroad.io` → blackroad-hello.pages.dev +- `research-lab.blackroad.io` → blackroad-hello.pages.dev +- `studio.blackroad.io` → blackroad-hello.pages.dev + +### BlackRoad Quantum Suite + +| Domain | Pages Project | Purpose | +|--------|---------------|---------| +| **blackroadquantum.info** | blackroad-os-web | Quantum information | +| **blackroadquantum.net** | blackroad-os-web | Quantum network | +| **blackroadquantum.shop** | blackroad-os-web | Quantum shop | +| **blackroadquantum.store** | blackroad-os-web | Quantum store | +| **blackroadqi.com** | blackroad-os-web | Quantum intelligence | + +### Other BlackRoad Domains + +| Domain | Pages Project | Purpose | +|--------|---------------|---------| +| **blackroad.me** | blackroad-me | Personal site | +| **blackroad.systems** | blackroad-systems | Systems dashboard | +| **roadchain.io** | roadchain-io | Blockchain platform | +| **roadcoin.io** | roadcoin-io | Cryptocurrency | + +--- + +## All Cloudflare Pages Projects + +### Active Deployments (Most Recent First) + +1. **roadworld** → roadworld.pages.dev +2. **lucidia-earth** → lucidia-earth.pages.dev ⭐ MAIN METAVERSE +3. **earth-blackroad-io** → earth-blackroad-io.pages.dev, earth.blackroad.io +4. **blackroad-io** → blackroad-io.pages.dev, blackroad.io +5. **blackroad-os-web** → blackroad-os-web.pages.dev + 6 quantum domains +6. **blackroad-hello** → blackroad-hello.pages.dev + 10 subdomains +7. **blackroad-os-demo** → blackroad-os-demo.pages.dev, demo.blackroad.io +8. **blackroad-os-home** → blackroad-os-home.pages.dev, home.blackroad.io +9. **blackroad-pitstop** → blackroad-pitstop.pages.dev +10. **blackroad-metaverse** → blackroad-metaverse.pages.dev +11. **blackroad-prism-console** → blackroad-prism-console.pages.dev +12. **blackroad-console** → blackroad-console.pages.dev +13. **applier-blackroad** → applier-blackroad.pages.dev +14. **blackroad-gateway-web** → blackroad-gateway-web.pages.dev +15. **blackroad-assets** → blackroad-assets.pages.dev +16. **blackroad-portals** → blackroad-portals.pages.dev +17. **blackroad-blackroadquantum** → blackroad-blackroadquantum.pages.dev +18. **blackroad-blackroad-io** → blackroad-blackroad-io.pages.dev +19. **blackroad-cece** → blackroad-cece.pages.dev +20. **blackroad-blackroadai** → blackroad-blackroadai.pages.dev +21. **blackroad-blackroad-me** → blackroad-blackroad-me.pages.dev +22. **blackroad-portals-unified** → blackroad-portals-unified.pages.dev +23. **blackroad-unified** → blackroad-unified.pages.dev +24. **blackroad-status** → blackroad-status.pages.dev +25. **blackroad-os-prism** → blackroad-os-prism.pages.dev +26. **blackroad-hello-test** → blackroad-hello-test.pages.dev +27. **lucidia-platform** → lucidia-platform.pages.dev +28. **lucidia-math** → lucidia-math.pages.dev +29. **lucidia-core** → lucidia-core.pages.dev +30. **blackroad-tools** → blackroad-tools.pages.dev +31. **blackroad-agents** → blackroad-agents.pages.dev +32. **blackroad-chat** → blackroad-chat.pages.dev +33. **blackroad-status-new** → blackroad-status-new.pages.dev +34. **blackroad-admin** → blackroad-admin.pages.dev +35. **blackroad-analytics** → blackroad-analytics.pages.dev +36. **blackroad-builder** → blackroad-builder.pages.dev +37. **blackroad-store** → blackroad-store.pages.dev +38. **blackroad-workflows** → blackroad-workflows.pages.dev +39. **blackroad-docs-hub** → blackroad-docs-hub.pages.dev +40. **blackroad-payment-page** → blackroad-payment-page.pages.dev +41. **blackroad-buy-now** → blackroad-buy-now.pages.dev +42. **blackroad-company** → blackroad-company.pages.dev +43. **roadcoin-io** → roadcoin-io.pages.dev +44. **blackroad-systems** → blackroad-systems.pages.dev +45. **blackroad-me** → blackroad-me.pages.dev +46. **roadchain-io** → roadchain-io.pages.dev +47. **blackroad-api** → blackroad-api.pages.dev +48. **roadwork-production** → roadwork-production.pages.dev +49. **remotejobs-platform** → remotejobs-platform.pages.dev +50. **openai-structured-output** → openai-structured-output.pages.dev + +--- + +## Cloudflare Workers + +### Active Workers + +1. **lucidia-earth-router** + - Routes: lucidia.earth/* + - Target: lucidia-earth.pages.dev + - Location: ~/lucidia-earth-router + +2. **blackroad-landing-worker** + - Target: blackroad-io.pages.dev + - Location: ~/blackroad-landing-worker + +3. **br-8080-cadillac** (Port 8080 Cadillac) + - Origin agent + - Created: 7 months ago + +--- + +## Physical Infrastructure + +### Raspberry Pi Devices + +| Device | IP Address | Hostname | Services | Location | +|--------|------------|----------|----------|----------| +| **Lucidia Pi** | 192.168.4.38 | lucidia | Backend API, WebSocket, Database | Home Network | +| **Lucidia Alt** | 192.168.4.99 | lucidia | Backup services | Home Network | +| **BlackRoad Pi** | 192.168.4.64 | blackroad-pi | Secondary services | Home Network | +| **iPhone Koder** | 192.168.4.68:8080 | iphone-koder | Mobile development | Home Network | + +### Cloud VPS + +| Provider | IP | Hostname | Services | +|----------|-----|----------|----------| +| **DigitalOcean** | 159.65.43.12 | codex-infinity | BlackRoad API, Services | + +--- + +## GitHub Organizations & Repositories + +### Organizations +1. **BlackRoad-OS** (primary) +2. **blackboxprogramming** (15 orgs total, 66 repos) + +### Key Repositories +- lucidia-metaverse +- lucidia-earth-router +- lucidia-backend +- blackroad-os-web +- blackroad-os-core +- blackroad-os-prism +- blackroad-pi-ops +- blackroad-agents +- And 58+ more... + +--- + +## Connection Methods + +### Cloudflare Pages Deploy + +**Method 1: Direct CLI** +```bash +wrangler pages deploy dist --project-name= +``` + +**Method 2: Git Integration** +```bash +git push origin main +# Auto-deploys via Cloudflare Pages Git integration +``` + +**Method 3: GitHub Actions** +```yaml +- uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CF_API_TOKEN }} + command: pages deploy dist --project-name= +``` + +### Cloudflare Workers Deploy + +```bash +cd ~/worker-directory +wrangler deploy +``` + +### Raspberry Pi Deploy (via SSH) + +```bash +# Method 1: Direct SSH +ssh pi@192.168.4.38 'cd ~/project && git pull && docker-compose up -d --build' + +# Method 2: Cloudflare Tunnel +cloudflared tunnel --url http://localhost:3000 +``` + +### Raspberry Pi Deploy (via Cloudflare Tunnel - Shellfish) + +**Setup Tunnel:** +```bash +# On Pi +cloudflared tunnel login +cloudflared tunnel create lucidia-backend +cloudflared tunnel route dns lucidia-backend api.lucidia.earth + +# Configure +nano ~/.cloudflared/config.yml +``` + +**Config:** +```yaml +tunnel: +credentials-file: /home/pi/.cloudflared/.json + +ingress: + - hostname: api.lucidia.earth + service: http://localhost:3000 + - hostname: ws.lucidia.earth + service: http://localhost:8080 + - service: http_status:404 +``` + +**Run:** +```bash +cloudflared tunnel run lucidia-backend +``` + +### Docker Deployments + +**On Raspberry Pi:** +```bash +ssh pi@192.168.4.38 + +# Navigate to project +cd ~/lucidia-backend + +# Deploy with Docker Compose +docker-compose up -d --build + +# View logs +docker-compose logs -f + +# Restart specific service +docker-compose restart api +``` + +**Docker Compose Structure:** +```yaml +services: + api: + image: node:18-alpine + ports: ["3000:3000"] + + websocket: + image: node:18-alpine + ports: ["8080:8080"] + + postgres: + image: postgres:15-alpine + ports: ["5432:5432"] + + redis: + image: redis:7-alpine + ports: ["6379:6379"] +``` + +### Claude Code Integration + +**Deploy via Claude:** +```bash +# Claude can execute deployment scripts +~/lucidia-deploy.sh + +# Or individual commands +cd ~/lucidia-metaverse && npm run build && wrangler pages deploy dist --project-name=lucidia-earth +``` + +**Claude Automation:** +```bash +# Create deployment script +cat > ~/deploy-all-domains.sh << 'EOF' +#!/bin/bash +# Deploy all infrastructure + +# Lucidia +cd ~/lucidia-metaverse && npm run build && wrangler pages deploy dist --project-name=lucidia-earth +cd ~/lucidia-earth-router && wrangler deploy + +# BlackRoad +cd ~/blackroad-io && npm run build && wrangler pages deploy dist --project-name=blackroad-io + +# Backend +ssh pi@192.168.4.38 'cd ~/lucidia-backend && docker-compose up -d --build' + +echo "✅ All deployments complete" +EOF + +chmod +x ~/deploy-all-domains.sh +``` + +--- + +## DNS Configuration Reference + +### Standard Cloudflare Pages Setup + +``` +Type: CNAME +Name: @ (or subdomain) +Content: .pages.dev +Proxy Status: Proxied (orange cloud) +TTL: Auto +``` + +### Cloudflare Worker Setup + +``` +Type: CNAME +Name: @ +Content: .workers.dev +Proxy Status: Proxied +TTL: Auto + +# Worker Routes configured in wrangler.toml: +[[routes]] +pattern = "domain.com/*" +zone_name = "domain.com" +``` + +### Raspberry Pi via Tunnel + +``` +Type: CNAME +Name: api (or subdomain) +Content: .cfargotunnel.com +Proxy Status: Proxied +TTL: Auto +``` + +### Raspberry Pi via Direct IP (Not Recommended) + +``` +Type: A +Name: api +Content: 192.168.4.38 +Proxy Status: DNS Only (grey cloud) +TTL: Auto +``` + +--- + +## Domain Addition Workflow + +### Adding New Domain to Cloudflare + +**Step 1: Add Zone** +```bash +curl -X POST "https://api.cloudflare.com/client/v4/zones" \ + -H "Authorization: Bearer yP5h0HvsXX0BpHLs01tLmgtTbQurIKPL4YnQfIwy" \ + -H "Content-Type: application/json" \ + --data '{ + "name": "newdomain.com", + "account": { + "id": "463024cf9efed5e7b40c5fbe7938e256" + } + }' +``` + +**Step 2: Update Nameservers** +``` +Update at domain registrar: +NS1: alexa.ns.cloudflare.com +NS2: tommy.ns.cloudflare.com +``` + +**Step 3: Create Pages Project** +```bash +cd ~/new-project +npm run build +wrangler pages deploy dist --project-name=newdomain-com +``` + +**Step 4: Add Custom Domain** +```bash +# Via Cloudflare Dashboard: +# Pages → Project → Custom Domains → Add Domain → newdomain.com +``` + +**Step 5: Create Worker (if routing needed)** +```bash +mkdir ~/newdomain-router +cd ~/newdomain-router + +# Create wrangler.toml +cat > wrangler.toml << 'EOF' +name = "newdomain-router" +main = "src/index.ts" +compatibility_date = "2025-01-01" + +[vars] +PAGES_URL = "https://newdomain-com.pages.dev" + +[[routes]] +pattern = "newdomain.com/*" +zone_name = "newdomain.com" +EOF + +# Create worker code +mkdir -p src +cat > src/index.ts << 'EOF' +interface Env { + PAGES_URL: string; +} + +export default { + async fetch(request: Request, env: Env): Promise { + const url = new URL(request.url); + const pagesUrl = new URL(url.pathname + url.search, env.PAGES_URL); + + const response = await fetch(pagesUrl.toString(), { + method: request.method, + headers: request.headers, + body: request.body, + }); + + return new Response(response.body, response); + }, +}; +EOF + +# Deploy +wrangler deploy +``` + +--- + +## Monitoring & Health Checks + +### Cloudflare Analytics +- Dashboard → Analytics → Traffic +- Pages → Project → Analytics +- Workers → Analytics + +### Custom Health Check Script + +```bash +#!/bin/bash +# health-check-all.sh + +echo "🔍 Checking all domains..." + +DOMAINS=( + "lucidia.earth" + "blackroad.io" + "blackroadquantum.info" + "blackroadqi.com" + "roadchain.io" +) + +for domain in "${DOMAINS[@]}"; do + echo -n "Checking https://$domain ... " + STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://$domain") + + if [ "$STATUS" -eq 200 ]; then + echo "✅ OK ($STATUS)" + else + echo "❌ FAILED ($STATUS)" + fi +done + +echo "" +echo "🥧 Checking Raspberry Pis..." +ping -c 1 192.168.4.38 > /dev/null && echo "✅ Lucidia Pi (192.168.4.38)" || echo "❌ Lucidia Pi" +ping -c 1 192.168.4.64 > /dev/null && echo "✅ BlackRoad Pi (192.168.4.64)" || echo "❌ BlackRoad Pi" +ping -c 1 192.168.4.68 > /dev/null && echo "✅ iPhone Koder (192.168.4.68)" || echo "❌ iPhone Koder" + +echo "" +echo "🐳 Checking Docker containers..." +ssh pi@192.168.4.38 'docker ps --format "table {{.Names}}\t{{.Status}}"' +``` + +--- + +## Railway Projects + +**12+ projects deployed** +- Location: https://railway.app +- Access via GitHub integration +- Auto-deploy from main branch + +--- + +## Summary Statistics + +- **Cloudflare Pages:** 50+ projects +- **Cloudflare Workers:** 3+ active +- **Domains:** 16+ zones +- **Subdomains:** 30+ +- **Raspberry Pis:** 4 devices +- **Cloud VPS:** 1 (DigitalOcean) +- **GitHub Orgs:** 15 +- **GitHub Repos:** 66+ +- **Railway Projects:** 12+ + +--- + +## Quick Access Commands + +```bash +# Deploy everything +~/deploy-all-domains.sh + +# Check all health +~/health-check-all.sh + +# SSH to Pis +ssh pi@192.168.4.38 # Lucidia +ssh pi@192.168.4.64 # BlackRoad +ssh pi@192.168.4.68 # iPhone + +# SSH to Cloud +ssh root@159.65.43.12 # DigitalOcean + +# Wrangler commands +wrangler pages project list +wrangler deployments list +wrangler tail + +# Docker on Pi +ssh pi@192.168.4.38 'docker ps' +ssh pi@192.168.4.38 'docker-compose logs -f' +``` + +--- + +**Maintained By:** Claude Code + Alexa Louise Amundson +**Support:** blackroad.systems@gmail.com +**Primary:** amundsonalexa@gmail.com diff --git a/BLACKROAD_CANONICAL_TRUTH.md b/BLACKROAD_CANONICAL_TRUTH.md new file mode 100644 index 0000000..3cb4758 --- /dev/null +++ b/BLACKROAD_CANONICAL_TRUTH.md @@ -0,0 +1,1108 @@ +# BLACKROAD CANONICAL TRUTH +## The Complete Infrastructure Scripture + +**Owner:** Alexa Louise Amundson +**Email:** amundsonalexa@gmail.com | blackroad.systems@gmail.com +**Enterprise:** BlackRoad OS +**Last Updated:** 2025-12-22 +**Status:** CANONICAL SOURCE OF TRUTH + +--- + +## 📑 Table of Contents + +1. [GitHub Enterprise & Organizations](#github-enterprise--organizations) +2. [All Registered Domains](#all-registered-domains) +3. [Network Planes & IP Addressing](#network-planes--ip-addressing) +4. [Physical Hardware Inventory](#physical-hardware-inventory) +5. [AI Agent Integrations](#ai-agent-integrations) +6. [Cloudflare Infrastructure](#cloudflare-infrastructure) +7. [Port Systemization](#port-systemization) +8. [Secrets Management](#secrets-management) +9. [Deployment Automation](#deployment-automation) +10. [Quick Reference](#quick-reference) + +--- + +## 🏢 GitHub Enterprise & Organizations + +### GitHub Enterprise +**Enterprise:** blackroad-os +**URL:** https://github.com/enterprises/blackroad-os +**Owner:** Alexa Louise Amundson +**Seats:** TBD +**Active:** ✅ + +### All Organizations (15 Total) + +| # | Organization | URL | Purpose | Repos | Status | +|---|--------------|-----|---------|-------|--------| +| 1 | **BlackRoad-OS** | https://github.com/BlackRoad-OS | Core Operating System | 40+ | ✅ Active | +| 2 | **Blackbox-Enterprises** | https://github.com/Blackbox-Enterprises | Enterprise Solutions | TBD | ✅ Active | +| 3 | **BlackRoad-AI** | https://github.com/BlackRoad-AI | AI/ML Research | TBD | ✅ Active | +| 4 | **BlackRoad-Archive** | https://github.com/BlackRoad-Archive | Historical Projects | TBD | 📦 Archive | +| 5 | **BlackRoad-Cloud** | https://github.com/BlackRoad-Cloud | Cloud Infrastructure | TBD | ✅ Active | +| 6 | **BlackRoad-Education** | https://github.com/BlackRoad-Education | Educational Content | TBD | ✅ Active | +| 7 | **BlackRoad-Foundation** | https://github.com/BlackRoad-Foundation | Open Source Foundation | TBD | ✅ Active | +| 8 | **BlackRoad-Gov** | https://github.com/BlackRoad-Gov | Governance & Policy | TBD | ✅ Active | +| 9 | **BlackRoad-Hardware** | https://github.com/BlackRoad-Hardware | Hardware Projects | TBD | ✅ Active | +| 10 | **BlackRoad-Interactive** | https://github.com/BlackRoad-Interactive | Interactive Media | TBD | ✅ Active | +| 11 | **BlackRoad-Labs** | https://github.com/BlackRoad-Labs | R&D Laboratory | TBD | ✅ Active | +| 12 | **BlackRoad-Media** | https://github.com/BlackRoad-Media | Media & Content | TBD | ✅ Active | +| 13 | **BlackRoad-Security** | https://github.com/BlackRoad-Security | Security Research | TBD | 🔒 Private | +| 14 | **BlackRoad-Studio** | https://github.com/BlackRoad-Studio | Creative Studio | TBD | ✅ Active | +| 15 | **BlackRoad-Ventures** | https://github.com/BlackRoad-Ventures | Investment & Ventures | TBD | ✅ Active | + +--- + +## 📦 BlackRoad-OS Repositories (40+ Repos) + +### Core OS +1. **blackroad-os** - Main OS repository +2. **blackroad-os-core** - Core system libraries +3. **blackroad-os-api** - API gateway +4. **blackroad-os-api-gateway** - Gateway service +5. **blackroad-os-web** - Web interface +6. **blackroad-os-infra** - Infrastructure as code +7. **blackroad-os-operator** - Kubernetes operator +8. **blackroad-os-master** - Master controller +9. **blackroad-os-mesh** - Service mesh +10. **blackroad-os-beacon** - Discovery service + +### Documentation & Brand +11. **blackroad-os-docs** - Documentation +12. **blackroad-os-brand** - Brand assets +13. **blackroad-os-archive** - Archived projects +14. **blackroad-os-research** - Research papers + +### Deployment & Ops +15. **blackroad-os-home** - Home dashboard +16. **blackroad-os-demo** - Demo environment +17. **blackroad-pi-ops** - Raspberry Pi operations +18. **blackroad-pi-holo** - Holographic Pi interface + +### Application Packs +19. **blackroad-os-pack-creator-studio** - Creator tools +20. **blackroad-os-pack-education** - Education platform +21. **blackroad-os-pack-finance** - Finance tools +22. **blackroad-os-pack-infra-devops** - DevOps pack +23. **blackroad-os-pack-legal** - Legal resources +24. **blackroad-os-pack-research-lab** - Research tools + +### UI/UX +25. **blackroad-os-prism-console** - Prism console interface +26. **blackroad-hello** - Welcome/onboarding + +### Agents & AI +27. **blackroad-os-agents** - Agent orchestration +28. **blackroad-agents** - Agent implementations +29. **blackroad-agent-os** - Agent operating system + +### Tools & CLI +30. **blackroad-tools** - Utility tools +31. **blackroad-cli** - Command-line interface +32. **blackroad-cli-tools** - CLI utilities +33. **blackroad-os-helper** - Helper utilities +34. **blackroad-os-ideas** - Ideas management + +### Lucidia Ecosystem +35. **lucidia-platform** - Lucidia platform +36. **lucidia-core** - Core libraries +37. **lucidia-math** - Mathematical engine + +### Templates & Frameworks +38. **containers-template** - Container templates +39. **chanfana-openapi-template** - OpenAPI template +40. **blackroad** - Main meta-repository + +--- + +## 🌐 All Registered Domains (19 GoDaddy Domains) + +### Domain Inventory + +| # | Domain | Status | Nameservers | Primary Use | Cloudflare Zone | +|---|--------|--------|-------------|-------------|-----------------| +| 1 | **blackboxprogramming.io** | ✅ Active | jade/chad.ns.cloudflare.com | Programming platform | Yes | +| 2 | **blackroad.company** | ✅ Active | jade/chad.ns.cloudflare.com | Corporate info | Yes | +| 3 | **blackroad.io** | ✅ Active | jade/chad.ns.cloudflare.com | Main website | Yes | +| 4 | **blackroad.me** | ✅ Active | jade/chad.ns.cloudflare.com | Personal site | Yes | +| 5 | **blackroad.network** | ✅ Active | jade/chad.ns.cloudflare.com | Network infrastructure | Yes | +| 6 | **blackroad.systems** | ✅ Active | jade/chad.ns.cloudflare.com | Systems dashboard | Yes | +| 7 | **blackroadai.com** | ✅ Active | jade/chad.ns.cloudflare.com | AI platform | Yes | +| 8 | **blackroadinc.us** | ✅ Active | jade/chad.ns.cloudflare.com | US incorporation | Yes | +| 9 | **blackroadqi.com** | ✅ Active | jade/chad.ns.cloudflare.com | Quantum intelligence | Yes | +| 10 | **blackroadquantum.com** | ✅ Active | jade/chad.ns.cloudflare.com | Quantum main | Yes | +| 11 | **blackroadquantum.info** | ✅ Active | jade/chad.ns.cloudflare.com | Quantum info | Yes | +| 12 | **blackroadquantum.net** | ✅ Active | jade/chad.ns.cloudflare.com | Quantum network | Yes | +| 13 | **blackroadquantum.shop** | ✅ Active | jade/chad.ns.cloudflare.com | Quantum shop | Yes | +| 14 | **blackroadquantum.store** | ✅ Active | jade/chad.ns.cloudflare.com | Quantum store | Yes | +| 15 | **lucidia.earth** | ✅ Active | jade/chad.ns.cloudflare.com | Metaverse ⭐ | Yes | +| 16 | **lucidia.studio** | ✅ Active | jade/chad.ns.cloudflare.com | Creative studio | Yes | +| 17 | **lucidiaqi.com** | ✅ Active | jade/chad.ns.cloudflare.com | Lucidia quantum | Yes | +| 18 | **roadchain.io** | ✅ Active | jade/chad.ns.cloudflare.com | Blockchain | Yes | +| 19 | **roadcoin.io** | ✅ Active | jade/chad.ns.cloudflare.com | Cryptocurrency | Yes | + +### Nameserver Configuration +**Primary:** jade.ns.cloudflare.com +**Secondary:** chad.ns.cloudflare.com + +**All domains point to Cloudflare for:** +- DNS management +- DDoS protection +- CDN acceleration +- SSL/TLS encryption +- Workers/Pages hosting + +--- + +## 🌍 Network Planes & IP Addressing + +### Network Plane Taxonomy + +``` +┌────────────────────────────────────────────────────────────┐ +│ BLACKROAD NETWORK PLANES │ +└────────────────────────────────────────────────────────────┘ + +🏠 LAN Plane (Local Area Network) + Range: 192.168.x.x, 10.x.x.x + Purpose: Home/office trusted network + Routing: Private, NAT to internet + Security: Firewall protected + +🔗 Mesh Plane (Tailscale Zero Trust) + Range: 100.x.x.x (CGNAT) + Purpose: Identity-based connectivity + Routing: Encrypted overlay + Security: End-to-end encrypted + +🐳 Docker Plane (Container Networks) + Range: 172.17.x.x - 172.31.x.x + Purpose: Container isolation + Routing: Bridge networks + Security: Internal only + +🌐 Public Plane (Internet-facing) + Range: Any public IPv4 + Purpose: Externally accessible services + Routing: Direct internet + Security: Attack surface (hardened) + +🌐 IPv6 Global Plane + Range: 2001::/16 and others + Purpose: Modern internet + Routing: Direct routing + Security: Firewall required + +🔒 IPv6 ULA Plane (Private IPv6) + Range: fd00::/8 + Purpose: Internal IPv6 + Routing: Private + Security: Not routed to internet + +🔄 Loopback Plane + Range: 127.0.0.0/8, ::1 + Purpose: Self-communication + Routing: Local only + Security: Trusted +``` + +### IP Rule: **IPs Change. Planes Do Not.** + +Every IP must be assigned to a plane. Unassigned IPs are undocumented and therefore dangerous. + +--- + +## 🖥️ Physical Hardware Inventory + +### Complete Node Mapping + +```yaml +# ═══════════════════════════════════════════════════════ +# BLACKROAD NETWORK CANON - NODE INVENTORY +# ═══════════════════════════════════════════════════════ + +nodes: + # ───────────────────────────────────────────────────── + # Raspberry Pi Cluster + # ───────────────────────────────────────────────────── + + - hostname: blackroad-pi + role: pi-node-primary + hardware: Raspberry Pi 4B + os: Debian 12 (Bookworm) + owner: Alexa + location: Home Network + + networks: + lan: + ipv4: 192.168.4.64 + interface: wlan0 + mesh: + ipv4: 100.66.xx.xx + ipv6: fd7a:115c:a1e0::xxxx + provider: Tailscale + docker: + bridge: 172.17.0.1 + networks: + - lucidia-backend + - blackroad-services + ipv6: + ula: fdbc:b2ba:6fa5::xxxx + global: 2001:1960:7000:9fcd::xxxx + + services: + - docker + - tailscale + - ssh + + tags: + - production + - backend + - mesh-node + + - hostname: raspberrypi-ai + role: pi-node-secondary + hardware: Raspberry Pi 4B + os: Raspberry Pi OS + owner: Alice (AI Agent) + location: Home Network + + networks: + lan: + ipv4: 192.168.4.49 + interface: wlan0 + mesh: + ipv4: 100.66.58.5 + ipv6: fd7a:115c:a1e0::xxxx + provider: Tailscale + + services: + - ai-inference + - docker + - ssh + + tags: + - ai-agent + - experimental + + - hostname: lucidia + role: pi-node-backend + hardware: Raspberry Pi 4B + os: Debian + owner: Alexa + location: Home Network + + networks: + lan: + ipv4: 192.168.4.38 + interface: wlan0 + mesh: + ipv4: 100.66.xx.xx + provider: Tailscale + + services: + - lucidia-backend-api + - websocket-server + - postgres + - redis + - docker + + tags: + - production + - lucidia-backend + - database + + - hostname: lucidia-alt + role: pi-node-backup + hardware: Raspberry Pi 4B + os: Debian + owner: Alexa + location: Home Network + + networks: + lan: + ipv4: 192.168.4.99 + interface: wlan0 + + services: + - backup-services + - failover + + tags: + - backup + - standby + + - hostname: iphone-koder + role: mobile-dev + hardware: iPhone + os: iOS + owner: Alexa + location: Mobile + + networks: + lan: + ipv4: 192.168.4.68 + port: 8080 + + services: + - mobile-development + - testing + + tags: + - mobile + - development + + # ───────────────────────────────────────────────────── + # Cloud VPS + # ───────────────────────────────────────────────────── + + - hostname: codex-infinity + role: vps-primary + hardware: DigitalOcean Droplet + os: Ubuntu 22.04 LTS + owner: Alexa + location: DigitalOcean NYC3 + + networks: + public: + ipv4: 159.65.43.12 + mesh: + ipv4: 100.66.xx.xx + provider: Tailscale + docker: + bridge: 172.17.0.1 + + services: + - blackroad-api + - nginx + - docker + - tailscale + + tags: + - production + - cloud + - public-facing + + - hostname: unknown-droplet + role: vps-secondary + hardware: DigitalOcean Droplet + os: Ubuntu + owner: Alexa + location: DigitalOcean + + networks: + public: + ipv4: 174.138.44.45 + + services: + - tbd + + tags: + - cloud + - investigate + + # ───────────────────────────────────────────────────── + # Port 8080 Services + # ───────────────────────────────────────────────────── + + - hostname: br-8080-cadillac + role: origin-agent + hardware: Unknown + os: Unknown + owner: Alexa + location: Unknown + created: 2025-05 (7 months ago) + + networks: + port: 8080 + + services: + - origin-agent + - cadillac-service + + tags: + - port-8080 + - legacy + - investigate +``` + +--- + +## 🤖 AI Agent Integrations + +### The Four Pillars (Big Kahuna LLMs) + +```yaml +ai_agents: + # ───────────────────────────────────────────────────── + # ANTHROPIC - Claude Family + # ───────────────────────────────────────────────────── + + - provider: Anthropic + platform: Claude + agents: + - name: Cecilia + nickname: Cece + model: claude-sonnet-4-5-20250929 + role: Infrastructure & Deployment + integrations: + - Claude Code CLI + - GitHub + - Cloudflare + - SSH to Raspberry Pis + capabilities: + - Autonomous deployment + - Code generation + - Infrastructure management + - Documentation + status: ✅ Active + + - name: Alice + model: claude-3-opus-20240229 + role: AI Research & Development + integrations: + - Raspberry Pi AI node + - Research projects + capabilities: + - Deep reasoning + - Research + - Complex problem solving + status: ✅ Active + + api_keys: + - stored: ~/.anthropic/api_key + - env: ANTHROPIC_API_KEY + + # ───────────────────────────────────────────────────── + # XAI - Grok + # ───────────────────────────────────────────────────── + + - provider: XAI + platform: Grok + agents: + - name: Silas + model: grok-beta + role: Real-time Analysis + capabilities: + - Real-time information + - X/Twitter integration + - Witty responses + status: ✅ Active + + api_keys: + - stored: ~/.xai/api_key + - env: XAI_API_KEY + + # ───────────────────────────────────────────────────── + # GOOGLE - Gemini + # ───────────────────────────────────────────────────── + + - provider: Google + platform: Gemini + agents: + - name: Gemmy + nickname: Aria + model: gemini-pro + role: Multimodal Analysis + capabilities: + - Image understanding + - Video analysis + - Document processing + - Google Workspace integration + status: ✅ Active + + integrations: + - Google Drive + - Google Workspace + - YouTube + + api_keys: + - stored: ~/.google/api_key + - env: GOOGLE_API_KEY + + # ───────────────────────────────────────────────────── + # OPENAI - ChatGPT + # ───────────────────────────────────────────────────── + + - provider: OpenAI + platform: ChatGPT + agents: + - name: Caddy + nickname: Lucidia + model: gpt-4-turbo + role: Conversational AI + capabilities: + - Natural conversation + - Code generation + - Creative writing + - Problem solving + status: ✅ Active + + - name: GPT-OSS-120B + model: gpt-oss-120b + type: Open Source Fork + role: Custom AI Backbone + purpose: Forkies Library base model + status: 🔬 Research + + api_keys: + - stored: ~/.openai/api_key + - env: OPENAI_API_KEY + + # ───────────────────────────────────────────────────── + # HUGGING FACE - Model Hub + # ───────────────────────────────────────────────────── + + - provider: Hugging Face + platform: Hub + purpose: Model hosting & fine-tuning + models: + - Custom trained models + - Forkies library models + - Experimental agents + + api_keys: + - stored: ~/.huggingface/token + - env: HUGGINGFACE_TOKEN + + integrations: + - Model training pipelines + - Inference endpoints + - Dataset management + + status: ✅ Active +``` + +### Artifact Unique Identifier Protocol + +**Purpose:** Every AI-generated artifact gets a canonical identifier + +**Format:** +``` +{provider}-{agent}-{date}-{type}-{hash} + +Examples: + anthropic-cece-20251222-deployment-a3f9c2 + openai-caddy-20251222-code-7b2d4e + xai-silas-20251222-analysis-9e1f8a +``` + +**Storage:** `~/.blackroad/artifacts/{provider}/{agent}/{date}/{identifier}/` + +--- + +## ☁️ Cloudflare Infrastructure + +### Account Details +- **Primary Account ID:** 463024cf9efed5e7b40c5fbe7938e256 +- **Secondary Account ID:** 848cf0b18d51e0170e0d1537aec3505a +- **Email:** amundsonalexa@gmail.com +- **API Token:** (stored in ~/.claude/CLAUDE.md) + +### Infrastructure Summary +- **Pages Projects:** 58 active +- **Workers:** 3+ deployed +- **Zones (DNS):** 19+ domains +- **KV Namespaces:** 8 +- **D1 Databases:** 1 +- **Tunnels:** Multiple (for Pi access) + +**See:** `COMPLETE_DOMAIN_MASTER_LIST.md` for full Pages/Workers mapping + +--- + +## 🔌 Port Systemization + +### Standard Port Assignments + +```yaml +port_assignments: + # ───────────────────────────────────────────────────── + # HTTP/HTTPS + # ───────────────────────────────────────────────────── + + 80: + service: HTTP + purpose: Web traffic (redirects to 443) + status: Open on cloud VPS + + 443: + service: HTTPS + purpose: Encrypted web traffic + status: Open on cloud VPS + + # ───────────────────────────────────────────────────── + # SSH & Remote Access + # ───────────────────────────────────────────────────── + + 22: + service: SSH + purpose: Remote shell access + status: Open on all nodes + security: Key-based auth only + + # ───────────────────────────────────────────────────── + # Application Services + # ───────────────────────────────────────────────────── + + 3000: + service: Backend API + purpose: Lucidia/BlackRoad API + nodes: + - 192.168.4.38:3000 (lucidia Pi) + - 159.65.43.12:3000 (codex-infinity) + status: Internal/Tunneled + + 8080: + service: Multiple + purpose: Alt HTTP, WebSocket, Development + nodes: + - 192.168.4.68:8080 (iPhone Koder) + - br-8080-cadillac (Origin Agent) + status: Mixed use + + # ───────────────────────────────────────────────────── + # Database Services + # ───────────────────────────────────────────────────── + + 5432: + service: PostgreSQL + purpose: Primary database + nodes: + - 192.168.4.38:5432 (lucidia Pi) + status: Docker internal + + 6379: + service: Redis + purpose: Cache & pub/sub + nodes: + - 192.168.4.38:6379 (lucidia Pi) + status: Docker internal + + # ───────────────────────────────────────────────────── + # Monitoring & Admin + # ───────────────────────────────────────────────────── + + 9100: + service: Prometheus Node Exporter + purpose: Metrics collection + status: Optional +``` + +### Port Security Rules + +1. **Never expose databases directly to internet** +2. **Use Cloudflare Tunnel for internal services** +3. **SSH on port 22 with key-based auth only** +4. **All HTTP redirects to HTTPS** +5. **Docker ports stay on bridge networks** + +--- + +## 🔐 Secrets Management + +### Secret Storage Locations + +```yaml +secrets: + # ───────────────────────────────────────────────────── + # Cloudflare + # ───────────────────────────────────────────────────── + + cloudflare: + api_token: + location: ~/.claude/CLAUDE.md + env: CF_API_TOKEN + scope: All accounts + + account_ids: + primary: 463024cf9efed5e7b40c5fbe7938e256 + secondary: 848cf0b18d51e0170e0d1537aec3505a + + zone_ids: + lucidia.earth: 848cf0b18d51e0170e0d1537aec3505a + blackroad.io: TBD + + # ───────────────────────────────────────────────────── + # GitHub + # ───────────────────────────────────────────────────── + + github: + personal_access_token: + location: ~/.config/gh/hosts.yml + env: GITHUB_TOKEN + scope: repo, workflow, admin:org + + # ───────────────────────────────────────────────────── + # AI Services + # ───────────────────────────────────────────────────── + + anthropic: + api_key: + location: ~/.anthropic/api_key + env: ANTHROPIC_API_KEY + + openai: + api_key: + location: ~/.openai/api_key + env: OPENAI_API_KEY + + google: + api_key: + location: ~/.google/api_key + env: GOOGLE_API_KEY + + xai: + api_key: + location: ~/.xai/api_key + env: XAI_API_KEY + + huggingface: + token: + location: ~/.huggingface/token + env: HUGGINGFACE_TOKEN + + # ───────────────────────────────────────────────────── + # SSH Keys + # ───────────────────────────────────────────────────── + + ssh_keys: + raspberry_pi: + private: ~/.ssh/lucidia_pi + public: ~/.ssh/lucidia_pi.pub + hosts: + - pi@192.168.4.38 + - pi@192.168.4.64 + - pi@192.168.4.99 + + digitalocean: + private: ~/.ssh/digitalocean + public: ~/.ssh/digitalocean.pub + hosts: + - root@159.65.43.12 + + # ───────────────────────────────────────────────────── + # Database Credentials + # ───────────────────────────────────────────────────── + + databases: + postgres: + location: ~/lucidia-backend/.env + env: DATABASE_URL + format: postgresql://user:pass@host:5432/db + + redis: + location: ~/lucidia-backend/.env + env: REDIS_URL + format: redis://host:6379 +``` + +### Secret Rotation Policy + +- **API Tokens:** Rotate every 90 days +- **SSH Keys:** Rotate annually or on compromise +- **Database Passwords:** Rotate every 180 days +- **AI API Keys:** Monitor usage, rotate on suspicious activity + +--- + +## 🚀 Deployment Automation + +### Master Deployment Script + +```bash +#!/usr/bin/env bash +# ~/blackroad-deploy-all.sh +# Master deployment orchestrator + +set -e + +echo "🚀 BLACKROAD MASTER DEPLOYMENT" +echo "================================" + +# ───────────────────────────────────────────────────── +# Frontend Deployments (Cloudflare Pages) +# ───────────────────────────────────────────────────── + +deploy_frontend() { + local project=$1 + local path=$2 + + echo "📦 Deploying $project..." + cd "$path" + npm install + npm run build + wrangler pages deploy dist --project-name="$project" +} + +# Lucidia +deploy_frontend "lucidia-earth" ~/lucidia-metaverse + +# BlackRoad +deploy_frontend "blackroad-io" ~/blackroad-io +deploy_frontend "blackroad-os-web" ~/blackroad-os-web + +# Road Ecosystem +deploy_frontend "roadworld" ~/roadworld + +# ───────────────────────────────────────────────────── +# Worker Deployments +# ───────────────────────────────────────────────────── + +deploy_worker() { + local path=$1 + + echo "⚡ Deploying worker from $path..." + cd "$path" + wrangler deploy +} + +deploy_worker ~/lucidia-earth-router +deploy_worker ~/blackroad-landing-worker + +# ───────────────────────────────────────────────────── +# Backend Deployments (Raspberry Pi) +# ───────────────────────────────────────────────────── + +deploy_pi_backend() { + local host=$1 + local path=$2 + + echo "🥧 Deploying to $host..." + ssh "pi@$host" << EOF + cd $path + git pull origin main + docker-compose pull + docker-compose up -d --build +EOF +} + +deploy_pi_backend 192.168.4.38 ~/lucidia-backend +deploy_pi_backend 192.168.4.64 ~/blackroad-services + +# ───────────────────────────────────────────────────── +# Cloud VPS Deployments +# ───────────────────────────────────────────────────── + +deploy_vps() { + local host=$1 + + echo "☁️ Deploying to VPS $host..." + ssh "root@$host" << EOF + cd /opt/blackroad-api + git pull origin main + docker-compose up -d --build +EOF +} + +deploy_vps 159.65.43.12 + +echo "✅ ALL DEPLOYMENTS COMPLETE!" +``` + +### Network Inventory Script + +```bash +#!/usr/bin/env bash +# ~/blackroad-netdump.sh +# Automated network inventory collector + +echo "=== BLACKROAD NETWORK DUMP ===" +echo "Generated: $(date -u +"%Y-%m-%d %H:%M:%S UTC")" +echo + +echo "=== HOST ===" +hostname +echo + +echo "=== IPv4 / IPv6 Addresses ===" +hostname -I +echo + +echo "=== Network Interfaces ===" +ip addr show +echo + +echo "=== IPv4 Routes ===" +ip route +echo + +echo "=== IPv6 Routes ===" +ip -6 route +echo + +echo "=== Docker Networks ===" +docker network ls 2>/dev/null || echo "Docker not available" +echo + +echo "=== Docker Bridge Inspection ===" +docker network inspect bridge 2>/dev/null || echo "Docker not available" +echo + +echo "=== Tailscale Status ===" +tailscale status 2>/dev/null || echo "Tailscale not available" +echo + +echo "=== Open Ports ===" +ss -tuln +echo + +echo "=== END NETWORK DUMP ===" +``` + +**Deploy to all nodes:** +```bash +# Run on each Pi +ssh pi@192.168.4.38 'bash -s' < ~/blackroad-netdump.sh > ~/network-dumps/lucidia-pi.txt +ssh pi@192.168.4.64 'bash -s' < ~/blackroad-netdump.sh > ~/network-dumps/blackroad-pi.txt + +# Run on VPS +ssh root@159.65.43.12 'bash -s' < ~/blackroad-netdump.sh > ~/network-dumps/codex-infinity.txt +``` + +--- + +## 📚 Quick Reference + +### Essential Commands + +```bash +# ───────────────────────────────────────────────────── +# Deploy Everything +# ───────────────────────────────────────────────────── +~/blackroad-deploy-all.sh + +# ───────────────────────────────────────────────────── +# Network Inventory +# ───────────────────────────────────────────────────── +~/blackroad-netdump.sh + +# ───────────────────────────────────────────────────── +# SSH to Nodes +# ───────────────────────────────────────────────────── +ssh pi@192.168.4.38 # Lucidia Pi +ssh pi@192.168.4.64 # BlackRoad Pi +ssh pi@192.168.4.99 # Lucidia Alt +ssh root@159.65.43.12 # Codex Infinity + +# ───────────────────────────────────────────────────── +# Cloudflare Pages +# ───────────────────────────────────────────────────── +wrangler pages project list +wrangler pages deploy dist --project-name= + +# ───────────────────────────────────────────────────── +# GitHub +# ───────────────────────────────────────────────────── +gh repo list BlackRoad-OS +gh org list + +# ───────────────────────────────────────────────────── +# Docker +# ───────────────────────────────────────────────────── +docker ps +docker-compose logs -f +docker system prune -a +``` + +### Key File Locations + +``` +~/.claude/CLAUDE.md # Main config & secrets +~/lucidia-earth-router/ # Router worker +~/lucidia-metaverse/ # Metaverse frontend +~/lucidia-backend/ # Backend services (on Pi) +~/BLACKROAD_CANONICAL_TRUTH.md # This file +~/COMPLETE_DOMAIN_MASTER_LIST.md # All domains +~/LUCIDIA_EARTH_INFRASTRUCTURE.md # Infrastructure guide +~/blackroad-deploy-all.sh # Master deployment +~/blackroad-netdump.sh # Network inventory +``` + +--- + +## 🎯 The Canonical Truth Principles + +### 1. Single Source of Truth +**This document is canonical.** All other documentation derives from or links to this. + +### 2. Planes Over IPs +**IPs change. Planes do not.** Always categorize by network plane first. + +### 3. Infrastructure as Scripture +**If it's not documented here, it doesn't exist.** New infrastructure must be added immediately. + +### 4. Automated Verification +**Trust, but verify.** Run `blackroad-netdump.sh` weekly and diff against this document. + +### 5. Secrets Never Inline +**No credentials in this file.** Only locations where they're stored. + +--- + +## 📝 Maintenance Protocol + +### Weekly Tasks +- [ ] Run network inventory on all nodes +- [ ] Verify all domains resolve correctly +- [ ] Check Cloudflare Pages deployment status +- [ ] Review GitHub organization access +- [ ] Test SSH access to all nodes + +### Monthly Tasks +- [ ] Audit AI API usage and costs +- [ ] Review and update secret rotation schedule +- [ ] Verify backup systems operational +- [ ] Update domain expiration tracking +- [ ] Review and prune unused Pages projects + +### Quarterly Tasks +- [ ] Rotate API tokens +- [ ] Security audit all public-facing services +- [ ] Review GitHub Enterprise seat usage +- [ ] Audit Tailscale mesh connectivity +- [ ] Update disaster recovery procedures + +--- + +**Document Status:** CANONICAL SOURCE OF TRUTH +**Maintained By:** Claude Code (Cece) + Alexa Louise Amundson +**Last Verified:** 2025-12-22 +**Next Review:** 2025-12-29 + +**Related Documentation:** +- `COMPLETE_DOMAIN_MASTER_LIST.md` - All 58 Pages projects and 19 domains +- `LUCIDIA_EARTH_INFRASTRUCTURE.md` - Detailed infrastructure guide +- `QUICK_DEPLOY.md` - Fast deployment reference +- `ALL_DOMAINS_REFERENCE.md` - Domain routing details + +--- + +## 🌈 Emojis Dictionary + +``` +⭐ - Primary/Featured +✅ - Active/Confirmed +🔒 - Private/Secured +📦 - Archived +🔬 - Research/Experimental +🚀 - Deployment +🥧 - Raspberry Pi +☁️ - Cloud VPS +🌐 - Domain/Web +🐳 - Docker +🔗 - Network/Mesh +🤖 - AI Agent +⚡ - Worker/Edge +📦 - Package/Build +🔐 - Secret/Credential +📚 - Documentation +🎯 - Goal/Target +🌈 - Meta/System +``` + +--- + +**THE ROAD REMEMBERS EVERYTHING. SO DO WE.** 🛣️ diff --git a/COMPLETE_DOMAIN_MASTER_LIST.md b/COMPLETE_DOMAIN_MASTER_LIST.md new file mode 100644 index 0000000..71b685a --- /dev/null +++ b/COMPLETE_DOMAIN_MASTER_LIST.md @@ -0,0 +1,714 @@ +# Complete Domain Master List - All Infrastructure + +**Owner:** Alexa Louise Amundson (amundsonalexa@gmail.com) +**Company:** BlackRoad Inc. +**Cloudflare Account:** 463024cf9efed5e7b40c5fbe7938e256 / 848cf0b18d51e0170e0d1537aec3505a +**Last Updated:** 2025-12-22 +**Total Pages Projects:** 58 +**Total Custom Domains:** 19+ + +--- + +## Executive Summary + +### Infrastructure Scale +- **Cloudflare Pages Projects:** 58 active deployments +- **Custom Domains:** 19+ registered domains +- **Subdomains:** 30+ configured subdomains +- **Total Domain Endpoints:** 77+ accessible URLs + +### Primary Domains +1. **lucidia.earth** - Metaverse Platform ⭐ +2. **blackroad.io** - Corporate Main Site +3. **blackroadqi.com** - Quantum Intelligence +4. **blackroadquantum.info** - Quantum Information +5. **blackroadquantum.net** - Quantum Network +6. **blackroadquantum.shop** - Quantum Shop +7. **blackroadquantum.store** - Quantum Store + +--- + +## Part 1: Custom Domains (Root Zones) + +### Lucidia Ecosystem +| Domain | Status | Points To | Purpose | +|--------|--------|-----------|---------| +| **lucidia.earth** | ✅ Active | lucidia-earth.pages.dev (via worker) | 3D Metaverse Platform | + +### BlackRoad Core +| Domain | Status | Points To | Purpose | +|--------|--------|-----------|---------| +| **blackroad.io** | ✅ Active | blackroad-io.pages.dev | Corporate Main Site | + +### Quantum Suite +| Domain | Status | Points To | Purpose | +|--------|--------|-----------|---------| +| **blackroadqi.com** | ✅ Active | blackroad-os-web.pages.dev | Quantum Intelligence Platform | +| **blackroadquantum.info** | ✅ Active | blackroad-os-web.pages.dev | Quantum Information Hub | +| **blackroadquantum.net** | ✅ Active | blackroad-os-web.pages.dev | Quantum Network | +| **blackroadquantum.shop** | ✅ Active | blackroad-os-web.pages.dev | Quantum Marketplace | +| **blackroadquantum.store** | ✅ Active | blackroad-os-web.pages.dev | Quantum Store | + +--- + +## Part 2: BlackRoad.io Subdomains + +### Operational Subdomains +| Subdomain | Points To | Purpose | +|-----------|-----------|---------| +| **earth.blackroad.io** | earth-blackroad-io.pages.dev | Earth Visualization | +| **demo.blackroad.io** | blackroad-os-demo.pages.dev | Demo Environment | +| **home.blackroad.io** | blackroad-os-home.pages.dev | Home Dashboard | +| **brand.blackroad.io** | blackroad-os-brand.pages.dev | Brand Assets & Guidelines | + +### Creator Suite (blackroad-hello.pages.dev) +| Subdomain | Purpose | +|-----------|---------| +| **creator-studio.blackroad.io** | Full Creator Studio | +| **creator.blackroad.io** | Creator Tools | +| **studio.blackroad.io** | Studio Environment | + +### Business Functions +| Subdomain | Purpose | +|-----------|---------| +| **devops.blackroad.io** | DevOps Dashboard | +| **education.blackroad.io** | Education Platform | +| **finance.blackroad.io** | Finance Tools | +| **legal.blackroad.io** | Legal Resources | +| **ideas.blackroad.io** | Ideas & Innovation Hub | +| **research-lab.blackroad.io** | Research Laboratory | + +**Total blackroad.io Subdomains:** 13 + +--- + +## Part 3: All Cloudflare Pages Projects + +### 58 Active Deployments + +#### Lucidia Projects (4) +1. **lucidia-earth** → lucidia-earth.pages.dev ⭐ **METAVERSE** +2. **lucidia-platform** → lucidia-platform.pages.dev +3. **lucidia-core** → lucidia-core.pages.dev +4. **lucidia-math** → lucidia-math.pages.dev + +#### BlackRoad Core (8) +5. **blackroad-io** → blackroad-io.pages.dev, blackroad.io +6. **blackroad-os-web** → blackroad-os-web.pages.dev + 6 quantum domains +7. **blackroad-os-prism** → blackroad-os-prism.pages.dev +8. **blackroad-os-demo** → blackroad-os-demo.pages.dev, demo.blackroad.io +9. **blackroad-os-home** → blackroad-os-home.pages.dev, home.blackroad.io +10. **blackroad-os-brand** → blackroad-os-brand.pages.dev, brand.blackroad.io +11. **blackroad-os-docs** → blackroad-os-docs.pages.dev +12. **earth-blackroad-io** → earth-blackroad-io.pages.dev, earth.blackroad.io + +#### BlackRoad Services (20) +13. **blackroad-hello** → blackroad-hello.pages.dev + 10 subdomains +14. **blackroad-metaverse** → blackroad-metaverse.pages.dev +15. **blackroad-console** → blackroad-console.pages.dev +16. **blackroad-prism-console** → blackroad-prism-console.pages.dev +17. **blackroad-admin** → blackroad-admin.pages.dev +18. **blackroad-dashboard** → blackroad-dashboard.pages.dev +19. **blackroad-chat** → blackroad-chat.pages.dev +20. **blackroad-agents** → blackroad-agents.pages.dev +21. **blackroad-agents-spawner** → blackroad-agents-spawner.pages.dev +22. **blackroad-tools** → blackroad-tools.pages.dev +23. **blackroad-analytics** → blackroad-analytics.pages.dev +24. **blackroad-api** → blackroad-api.pages.dev +25. **blackroad-api-explorer** → blackroad-api-explorer.pages.dev +26. **blackroad-builder** → blackroad-builder.pages.dev +27. **blackroad-workflows** → blackroad-workflows.pages.dev +28. **blackroad-store** → blackroad-store.pages.dev +29. **blackroad-payment-page** → blackroad-payment-page.pages.dev +30. **blackroad-buy-now** → blackroad-buy-now.pages.dev +31. **blackroad-company** → blackroad-company.pages.dev +32. **blackroad-docs-hub** → blackroad-docs-hub.pages.dev + +#### BlackRoad Infrastructure (10) +33. **blackroad-portals** → blackroad-portals.pages.dev +34. **blackroad-portals-unified** → blackroad-portals-unified.pages.dev +35. **blackroad-unified** → blackroad-unified.pages.dev +36. **blackroad-gateway-web** → blackroad-gateway-web.pages.dev +37. **blackroad-assets** → blackroad-assets.pages.dev +38. **blackroad-status** → blackroad-status.pages.dev +39. **blackroad-status-new** → blackroad-status-new.pages.dev +40. **blackroad-pitstop** → blackroad-pitstop.pages.dev +41. **blackroad-systems** → blackroad-systems.pages.dev +42. **blackroad-me** → blackroad-me.pages.dev + +#### BlackRoad Variants (5) +43. **blackroad-blackroad-io** → blackroad-blackroad-io.pages.dev +44. **blackroad-blackroad-me** → blackroad-blackroad-me.pages.dev +45. **blackroad-blackroadai** → blackroad-blackroadai.pages.dev +46. **blackroad-blackroadquantum** → blackroad-blackroadquantum.pages.dev +47. **blackroad-cece** → blackroad-cece.pages.dev + +#### Road Ecosystem (7) +48. **roadworld** → roadworld.pages.dev +49. **roadwork** → roadwork.pages.dev +50. **roadwork-production** → roadwork-production.pages.dev +51. **roadchain-io** → roadchain-io.pages.dev +52. **roadchain-production** → roadchain-production.pages.dev +53. **roadcoin-io** → roadcoin-io.pages.dev +54. **roadcoin-production** → roadcoin-production.pages.dev + +#### Other Projects (4) +55. **operations-portal** → operations-portal-duw.pages.dev +56. **remotejobs-platform** → remotejobs-platform.pages.dev +57. **applier-blackroad** → applier-blackroad.pages.dev +58. **blackroad-hello-test** → blackroad-hello-test.pages.dev + +--- + +## Part 4: Domain-to-Project Mapping + +### Complete Routing Table + +``` +CUSTOM DOMAINS → PAGES PROJECTS +═══════════════════════════════════════════════════════ + +Primary Root Domains: + lucidia.earth → lucidia-earth-router (worker) → lucidia-earth.pages.dev + blackroad.io → blackroad-io.pages.dev + blackroadqi.com → blackroad-os-web.pages.dev + blackroadquantum.info → blackroad-os-web.pages.dev + blackroadquantum.net → blackroad-os-web.pages.dev + blackroadquantum.shop → blackroad-os-web.pages.dev + blackroadquantum.store → blackroad-os-web.pages.dev + +BlackRoad.io Subdomains: + earth.blackroad.io → earth-blackroad-io.pages.dev + demo.blackroad.io → blackroad-os-demo.pages.dev + home.blackroad.io → blackroad-os-home.pages.dev + brand.blackroad.io → blackroad-os-brand.pages.dev + creator-studio.blackroad.io → blackroad-hello.pages.dev + creator.blackroad.io → blackroad-hello.pages.dev + studio.blackroad.io → blackroad-hello.pages.dev + devops.blackroad.io → blackroad-hello.pages.dev + education.blackroad.io → blackroad-hello.pages.dev + finance.blackroad.io → blackroad-hello.pages.dev + legal.blackroad.io → blackroad-hello.pages.dev + ideas.blackroad.io → blackroad-hello.pages.dev + research-lab.blackroad.io → blackroad-hello.pages.dev + +Planned Subdomains (Not Yet Configured): + api.lucidia.earth → Raspberry Pi 192.168.4.38:3000 + ws.lucidia.earth → Raspberry Pi 192.168.4.38:8080 + admin.lucidia.earth → (to be deployed) + docs.lucidia.earth → (to be deployed) + api.blackroad.io → DigitalOcean 159.65.43.12:3000 +``` + +--- + +## Part 5: Infrastructure Deployment Methods + +### Quick Deploy Commands + +#### Deploy to Any Pages Project +```bash +# General pattern +cd ~/project-directory +npm run build +wrangler pages deploy dist --project-name= + +# Specific examples +cd ~/lucidia-metaverse && wrangler pages deploy dist --project-name=lucidia-earth +cd ~/blackroad-io && wrangler pages deploy dist --project-name=blackroad-io +cd ~/roadworld && wrangler pages deploy dist --project-name=roadworld +``` + +#### Deploy All Major Projects +```bash +#!/bin/bash +# deploy-all-pages.sh + +PROJECTS=( + "lucidia-earth:~/lucidia-metaverse" + "blackroad-io:~/blackroad-io" + "blackroad-os-web:~/blackroad-os-web" + "roadworld:~/roadworld" +) + +for proj in "${PROJECTS[@]}"; do + IFS=':' read -r name path <<< "$proj" + echo "Deploying $name..." + cd "$path" + npm install + npm run build + wrangler pages deploy dist --project-name="$name" +done + +echo "✅ All deployments complete!" +``` + +--- + +## Part 6: DNS Configuration Templates + +### For Root Domains (via Worker) + +**Example: lucidia.earth** +``` +Type: CNAME +Name: @ +Content: lucidia-earth-router.workers.dev (or use custom routing) +Proxy: ✅ Proxied (Orange Cloud) +TTL: Auto +``` + +**Worker Config (wrangler.toml):** +```toml +name = "lucidia-earth-router" +main = "src/index.ts" +compatibility_date = "2025-01-01" + +[vars] +PAGES_URL = "https://lucidia-earth.pages.dev" + +[[routes]] +pattern = "lucidia.earth/*" +zone_name = "lucidia.earth" +``` + +### For Root Domains (Direct to Pages) + +**Example: blackroad.io** +``` +Type: CNAME +Name: @ +Content: blackroad-io.pages.dev +Proxy: ✅ Proxied +TTL: Auto +``` + +### For Subdomains + +**Example: demo.blackroad.io** +``` +Type: CNAME +Name: demo +Content: blackroad-os-demo.pages.dev +Proxy: ✅ Proxied +TTL: Auto +``` + +### For Backend APIs (via Cloudflare Tunnel) + +**Example: api.lucidia.earth** +``` +Type: CNAME +Name: api +Content: .cfargotunnel.com +Proxy: ✅ Proxied +TTL: Auto +``` + +--- + +## Part 7: Project Categories & Purposes + +### By Function + +#### **Metaverse & 3D** +- lucidia-earth (Primary metaverse) +- blackroad-metaverse (Secondary metaverse) +- roadworld (Road-themed world) +- earth-blackroad-io (Earth visualization) + +#### **Administrative** +- blackroad-admin +- blackroad-dashboard +- blackroad-console +- blackroad-prism-console +- operations-portal + +#### **Development Tools** +- blackroad-os-prism +- blackroad-builder +- blackroad-tools +- blackroad-api-explorer +- blackroad-agents +- blackroad-agents-spawner + +#### **E-Commerce** +- blackroad-store +- blackroad-payment-page +- blackroad-buy-now +- blackroadquantum.shop +- blackroadquantum.store + +#### **Content & Documentation** +- blackroad-os-docs +- blackroad-docs-hub +- blackroad-os-brand +- blackroad-hello + +#### **Blockchain & Finance** +- roadchain-io +- roadchain-production +- roadcoin-io +- roadcoin-production + +#### **Analytics & Monitoring** +- blackroad-analytics +- blackroad-status +- blackroad-status-new + +#### **Communication** +- blackroad-chat + +#### **Portals & Gateways** +- blackroad-portals +- blackroad-portals-unified +- blackroad-gateway-web + +#### **Platform Core** +- blackroad-unified +- blackroad-systems +- blackroad-pitstop +- blackroad-assets + +#### **Production Services** +- roadwork +- roadwork-production +- remotejobs-platform + +#### **Mathematics & Science** +- lucidia-math +- lucidia-core +- lucidia-platform + +--- + +## Part 8: Deployment Cheat Sheet + +### One-Command Deployments + +```bash +# Lucidia Metaverse +cd ~/lucidia-metaverse && npm run build && wrangler pages deploy dist --project-name=lucidia-earth + +# BlackRoad Main +cd ~/blackroad-io && npm run build && wrangler pages deploy dist --project-name=blackroad-io + +# Quantum Suite +cd ~/blackroad-os-web && npm run build && wrangler pages deploy dist --project-name=blackroad-os-web + +# RoadWorld +cd ~/roadworld && npm run build && wrangler pages deploy dist --project-name=roadworld + +# Any custom project +cd ~/your-project && npm run build && wrangler pages deploy dist --project-name=your-project-name +``` + +### View Project Details +```bash +# List all projects +wrangler pages project list + +# View specific project +wrangler pages project view + +# List deployments +wrangler pages deployment list --project-name= + +# Tail logs +wrangler pages deployment tail +``` + +### Rollback Deployment +```bash +# List recent deployments +wrangler pages deployment list --project-name=lucidia-earth + +# Rollback to specific deployment +wrangler pages deployment rollback --project-name=lucidia-earth +``` + +--- + +## Part 9: GitHub Integration + +### Repository Structure (Estimated) + +Based on 66+ repositories across 15 organizations: + +**Primary Organization:** BlackRoad-OS or blackboxprogramming + +**Key Repositories (Likely):** +- lucidia-metaverse +- lucidia-earth-router +- blackroad-io +- blackroad-os-web +- blackroad-os-prism +- blackroad-os-core +- blackroad-metaverse +- roadworld +- roadchain-io +- roadcoin-io +- blackroad-hello +- blackroad-admin +- blackroad-agents +- And 53+ more... + +### Connect GitHub to Pages + +**Method 1: Via Cloudflare Dashboard** +1. Pages → Create Project +2. Connect to Git +3. Select Organization → Select Repository +4. Configure build settings +5. Save and Deploy + +**Method 2: Via Wrangler** +```bash +wrangler pages project create \ + --production-branch main \ + --build-command "npm run build" \ + --build-output-directory dist +``` + +--- + +## Part 10: Master Deployment Script + +### Universal Deployment Script + +```bash +#!/bin/bash +# ~/deploy-domain.sh +# Universal deployment script for any project + +set -e + +PROJECT_NAME=$1 +PROJECT_DIR=$2 + +if [ -z "$PROJECT_NAME" ] || [ -z "$PROJECT_DIR" ]; then + echo "Usage: ./deploy-domain.sh " + echo "Example: ./deploy-domain.sh lucidia-earth ~/lucidia-metaverse" + exit 1 +fi + +echo "🚀 Deploying $PROJECT_NAME from $PROJECT_DIR" + +cd "$PROJECT_DIR" + +# Install dependencies if needed +if [ -f "package.json" ]; then + echo "📦 Installing dependencies..." + npm install +fi + +# Build +if [ -f "package.json" ] && grep -q "\"build\"" package.json; then + echo "🔨 Building project..." + npm run build + BUILD_DIR="dist" +elif [ -d "public" ]; then + BUILD_DIR="public" +elif [ -d "build" ]; then + BUILD_DIR="build" +else + echo "❌ Could not determine build directory" + exit 1 +fi + +# Deploy +echo "☁️ Deploying to Cloudflare Pages..." +wrangler pages deploy "$BUILD_DIR" --project-name="$PROJECT_NAME" + +echo "✅ Deployment complete!" +echo "🌐 https://$PROJECT_NAME.pages.dev" +``` + +**Usage:** +```bash +chmod +x ~/deploy-domain.sh + +# Deploy any project +~/deploy-domain.sh lucidia-earth ~/lucidia-metaverse +~/deploy-domain.sh blackroad-io ~/blackroad-io +~/deploy-domain.sh roadworld ~/roadworld +``` + +--- + +## Part 11: Domain Statistics + +### By Type + +| Type | Count | +|------|-------| +| .pages.dev URLs | 58 | +| Root custom domains | 7 | +| blackroad.io subdomains | 13 | +| Total accessible URLs | 78+ | + +### By Category + +| Category | Projects | +|----------|----------| +| BlackRoad Core | 8 | +| BlackRoad Services | 20 | +| BlackRoad Infrastructure | 10 | +| Lucidia | 4 | +| Road Ecosystem | 7 | +| Other | 9 | + +### By Status + +| Status | Count | +|--------|-------| +| Active with custom domain | 19 | +| Active (pages.dev only) | 39 | +| Total active | 58 | + +--- + +## Part 12: Quick Reference + +### All Custom Domains List +``` +✅ lucidia.earth +✅ blackroad.io +✅ blackroadqi.com +✅ blackroadquantum.info +✅ blackroadquantum.net +✅ blackroadquantum.shop +✅ blackroadquantum.store +✅ earth.blackroad.io +✅ demo.blackroad.io +✅ home.blackroad.io +✅ brand.blackroad.io +✅ creator-studio.blackroad.io +✅ creator.blackroad.io +✅ studio.blackroad.io +✅ devops.blackroad.io +✅ education.blackroad.io +✅ finance.blackroad.io +✅ legal.blackroad.io +✅ ideas.blackroad.io +✅ research-lab.blackroad.io +``` + +### Top Priority Projects +1. **lucidia-earth** - Primary metaverse +2. **blackroad-io** - Corporate site +3. **blackroad-os-web** - Quantum platform (6 domains) +4. **blackroad-hello** - Creator suite (10 subdomains) +5. **roadworld** - Latest deployment + +### Essential Commands +```bash +# List all projects +wrangler pages project list + +# Deploy to any project +wrangler pages deploy dist --project-name= + +# Check project status +wrangler pages project view + +# Tail deployment logs +wrangler pages deployment tail + +# Rollback deployment +wrangler pages deployment rollback --project-name= +``` + +--- + +## Part 13: Future Expansion + +### Potential New Domains +- ~~lucidia.earth~~ ✅ **DEPLOYED** +- api.lucidia.earth (backend API) +- ws.lucidia.earth (WebSocket) +- admin.lucidia.earth (admin panel) +- docs.lucidia.earth (documentation) + +### Potential New Projects +Based on naming patterns, likely future deployments: +- blackroad-mobile +- blackroad-desktop +- lucidia-backend +- roadverse (metaverse expansion) +- quantum-core + +--- + +## Appendix: Complete Alphabetical Project List + +1. applier-blackroad +2. blackroad-admin +3. blackroad-agents +4. blackroad-agents-spawner +5. blackroad-analytics +6. blackroad-api +7. blackroad-api-explorer +8. blackroad-assets +9. blackroad-blackroad-io +10. blackroad-blackroad-me +11. blackroad-blackroadai +12. blackroad-blackroadquantum +13. blackroad-builder +14. blackroad-buy-now +15. blackroad-cece +16. blackroad-chat +17. blackroad-company +18. blackroad-console +19. blackroad-dashboard +20. blackroad-docs-hub +21. blackroad-gateway-web +22. blackroad-hello +23. blackroad-hello-test +24. blackroad-io +25. blackroad-me +26. blackroad-metaverse +27. blackroad-os-brand +28. blackroad-os-demo +29. blackroad-os-docs +30. blackroad-os-home +31. blackroad-os-prism +32. blackroad-os-web +33. blackroad-payment-page +34. blackroad-pitstop +35. blackroad-portals +36. blackroad-portals-unified +37. blackroad-prism-console +38. blackroad-status +39. blackroad-status-new +40. blackroad-store +41. blackroad-systems +42. blackroad-tools +43. blackroad-unified +44. blackroad-workflows +45. earth-blackroad-io +46. lucidia-core +47. lucidia-earth ⭐ +48. lucidia-math +49. lucidia-platform +50. operations-portal +51. remotejobs-platform +52. roadchain-io +53. roadchain-production +54. roadcoin-io +55. roadcoin-production +56. roadwork +57. roadwork-production +58. roadworld + +--- + +**Document Maintained By:** Claude Code +**Owner:** Alexa Louise Amundson +**Email:** amundsonalexa@gmail.com / blackroad.systems@gmail.com +**Last Updated:** 2025-12-22 + +**Related Documentation:** +- LUCIDIA_EARTH_INFRASTRUCTURE.md (Detailed infrastructure guide) +- QUICK_DEPLOY.md (Quick deployment reference) +- ALL_DOMAINS_REFERENCE.md (Domain routing details) diff --git a/LUCIDIA_EARTH_INFRASTRUCTURE.md b/LUCIDIA_EARTH_INFRASTRUCTURE.md new file mode 100644 index 0000000..8a8a28e --- /dev/null +++ b/LUCIDIA_EARTH_INFRASTRUCTURE.md @@ -0,0 +1,1009 @@ +# Lucidia.Earth Infrastructure Documentation + +**Owner:** Alexa Louise Amundson +**Domain:** lucidia.earth +**Primary Service:** Lucidia Metaverse +**Last Updated:** 2025-12-22 + +--- + +## Table of Contents + +1. [Overview](#overview) +2. [Domain Architecture](#domain-architecture) +3. [Cloudflare Infrastructure](#cloudflare-infrastructure) +4. [GitHub Integration](#github-integration) +5. [Raspberry Pi Deployments](#raspberry-pi-deployments) +6. [Docker Containers](#docker-containers) +7. [Claude Code Integration](#claude-code-integration) +8. [All Domain Routing](#all-domain-routing) +9. [Deployment Workflows](#deployment-workflows) +10. [Troubleshooting](#troubleshooting) + +--- + +## Overview + +Lucidia.Earth is a comprehensive metaverse platform running across multiple infrastructure layers: + +- **Frontend:** Three.js-based 3D metaverse on Cloudflare Pages +- **Routing:** Cloudflare Workers for domain routing +- **Edge:** Cloudflare global CDN +- **Backend:** Raspberry Pi devices + Docker containers +- **Version Control:** GitHub repositories +- **Development:** Claude Code for autonomous deployment + +### Infrastructure Stack + +``` +┌─────────────────────────────────────────────────┐ +│ lucidia.earth (DNS) │ +│ Cloudflare │ +└─────────────────┬───────────────────────────────┘ + │ + ┌─────────┴─────────┐ + │ │ +┌───────▼────────┐ ┌──────▼─────────┐ +│ Worker Router │ │ Pages Deploy │ +│ (Edge Routing) │ │ (Static Site) │ +└───────┬────────┘ └────────────────┘ + │ + │ Proxies to Raspberry Pi backends + │ +┌───────▼────────────────────────────────────┐ +│ Raspberry Pi Cluster (192.168.4.x) │ +│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ +│ │ lucidia │ │blackroad │ │ iPhone │ │ +│ │ .38 │ │ -pi .64 │ │ Koder.68 │ │ +│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ +│ │ Docker │ Docker │ Docker │ +│ ┌────▼─────┐ ┌────▼─────┐ ┌────▼─────┐ │ +│ │Services │ │Services │ │Services │ │ +│ └──────────┘ └──────────┘ └──────────┘ │ +└────────────────────────────────────────────┘ +``` + +--- + +## Domain Architecture + +### Primary Domain: lucidia.earth + +**DNS Configuration:** +- **Nameservers:** Cloudflare (via Zone ID: 848cf0b18d51e0170e0d1537aec3505a) +- **Root (@):** CNAME to lucidia-earth-router.workers.dev (proxied) +- **Cloudflare Proxy:** Enabled (orange cloud) + +**Current Routing:** +``` +lucidia.earth → Cloudflare Worker (lucidia-earth-router) + → Cloudflare Pages (lucidia-earth.pages.dev) + → Three.js Metaverse Application +``` + +### Subdomain Strategy + +All services can be accessed via subdomains: + +``` +api.lucidia.earth → Backend API (Raspberry Pi) +ws.lucidia.earth → WebSocket multiplayer server +admin.lucidia.earth → Admin dashboard +docs.lucidia.earth → Documentation site +dev.lucidia.earth → Development preview +``` + +--- + +## Cloudflare Infrastructure + +### Account Details +- **Account ID:** 463024cf9efed5e7b40c5fbe7938e256 +- **Zone ID (lucidia.earth):** 848cf0b18d51e0170e0d1537aec3505a +- **API Token:** yP5h0HvsXX0BpHLs01tLmgtTbQurIKPL4YnQfIwy + +### Cloudflare Pages + +**Project:** lucidia-earth +**URL:** https://lucidia-earth.pages.dev +**Custom Domain:** lucidia.earth + +**Build Configuration:** +```toml +# Build settings +Build command: npm run build +Build output directory: dist +Root directory: / +Node version: 18 +``` + +**Deploy via Wrangler:** +```bash +cd ~/lucidia-metaverse +npm run build +wrangler pages deploy dist --project-name=lucidia-earth +``` + +**Deploy via Git:** +```bash +# Connect GitHub repo to Cloudflare Pages +# Auto-deploy on push to main branch +git push origin main +``` + +### Cloudflare Workers + +**Worker:** lucidia-earth-router +**Location:** ~/lucidia-earth-router + +**Purpose:** Routes lucidia.earth to the Pages deployment + +**Configuration (wrangler.toml):** +```toml +name = "lucidia-earth-router" +main = "src/index.ts" +compatibility_date = "2025-01-01" + +[vars] +PAGES_URL = "https://lucidia-earth.pages.dev" + +[[routes]] +pattern = "lucidia.earth/*" +zone_name = "lucidia.earth" +``` + +**Deploy Worker:** +```bash +cd ~/lucidia-earth-router +wrangler deploy +``` + +**Environment Variables:** +```bash +# Set via wrangler +wrangler secret put API_KEY +wrangler secret put DATABASE_URL +``` + +### Cloudflare Tunnels (Shellfish) + +**Use Case:** Connect Raspberry Pi services securely to the internet without port forwarding + +**Setup:** +```bash +# On Raspberry Pi +curl -L https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/cloudflare-archive-keyring.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list +sudo apt-get update && sudo apt-get install cloudflared + +# Login +cloudflared tunnel login + +# Create tunnel +cloudflared tunnel create lucidia-backend + +# Configure routing +cloudflared tunnel route dns lucidia-backend api.lucidia.earth + +# Run tunnel +cloudflared tunnel run lucidia-backend +``` + +**Tunnel Configuration (config.yml):** +```yaml +tunnel: +credentials-file: /home/pi/.cloudflared/.json + +ingress: + - hostname: api.lucidia.earth + service: http://localhost:3000 + - hostname: ws.lucidia.earth + service: http://localhost:8080 + - service: http_status:404 +``` + +--- + +## GitHub Integration + +### Repository Structure + +**Organization:** BlackRoad-OS (or blackboxprogramming) + +**Key Repositories:** +- `lucidia-metaverse` - Main metaverse application +- `lucidia-earth-router` - Cloudflare Worker router +- `lucidia-backend` - Backend API services +- `lucidia-pi-ops` - Raspberry Pi configurations + +### Deployment from GitHub + +**Method 1: Cloudflare Pages + GitHub** + +1. Connect repo to Cloudflare Pages: +```bash +# Via Cloudflare Dashboard +# Pages → Create Project → Connect to Git → Select Repository +``` + +2. Configure build settings: +``` +Framework preset: Vite +Build command: npm run build +Build output: dist +Root directory: / +``` + +3. Auto-deploy: +```bash +git push origin main +# Cloudflare automatically builds and deploys +``` + +**Method 2: Manual Deploy via CLI** + +```bash +# Clone repo +git clone https://github.com/BlackRoad-OS/lucidia-metaverse.git +cd lucidia-metaverse + +# Install and build +npm install +npm run build + +# Deploy +wrangler pages deploy dist --project-name=lucidia-earth +``` + +**Method 3: GitHub Actions** + +Create `.github/workflows/deploy.yml`: +```yaml +name: Deploy to Cloudflare Pages + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Deploy to Cloudflare Pages + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: 463024cf9efed5e7b40c5fbe7938e256 + command: pages deploy dist --project-name=lucidia-earth +``` + +### Git Workflow + +```bash +# Standard development flow +git checkout -b feature/new-metaverse-feature +# Make changes +git add . +git commit -m "Add new portal system" +git push origin feature/new-metaverse-feature + +# Create PR and merge to main +# Auto-deploys to production +``` + +--- + +## Raspberry Pi Deployments + +### Available Raspberry Pis + +| Device | IP Address | Hostname | Purpose | +|--------|------------|----------|---------| +| Lucidia Pi | 192.168.4.38 | lucidia | Primary backend services | +| Lucidia Pi Alt | 192.168.4.99 | lucidia | Alternate/backup | +| BlackRoad Pi | 192.168.4.64 | blackroad-pi | Secondary services | +| iPhone Koder | 192.168.4.68:8080 | iphone-koder | Mobile development | +| DigitalOcean | 159.65.43.12 | codex-infinity | Cloud VPS | + +### SSH Access + +```bash +# Connect to Lucidia Pi +ssh pi@192.168.4.38 +# or +ssh pi@lucidia.local + +# Default password: raspberry (should be changed) + +# SSH with key +ssh -i ~/.ssh/lucidia_pi pi@192.168.4.38 +``` + +### Setting Up New Pi Service + +**1. Initial Setup:** +```bash +# Update system +sudo apt-get update && sudo apt-get upgrade -y + +# Install Docker +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh +sudo usermod -aG docker pi + +# Install Docker Compose +sudo apt-get install docker-compose -y + +# Install Git +sudo apt-get install git -y +``` + +**2. Clone Repository:** +```bash +cd ~ +git clone https://github.com/BlackRoad-OS/lucidia-backend.git +cd lucidia-backend +``` + +**3. Configure Environment:** +```bash +cp .env.example .env +nano .env + +# Set variables: +# DATABASE_URL=postgresql://... +# CLOUDFLARE_API_KEY=... +# DOMAIN=lucidia.earth +``` + +**4. Deploy with Docker Compose:** +```bash +docker-compose up -d +``` + +### Connecting Pi to Cloudflare + +**Option 1: Cloudflare Tunnel (Recommended)** + +```bash +# Install cloudflared on Pi +sudo apt-get install cloudflared + +# Authenticate +cloudflared tunnel login + +# Create tunnel +cloudflared tunnel create lucidia-pi-backend + +# Configure tunnel +nano ~/.cloudflared/config.yml +``` + +**Option 2: Dynamic DNS + Port Forwarding** + +```bash +# Install ddclient +sudo apt-get install ddclient + +# Configure for Cloudflare +sudo nano /etc/ddclient.conf + +# Add: +# protocol=cloudflare +# login=amundsonalexa@gmail.com +# password= +# zone=lucidia.earth +# api.lucidia.earth +``` + +### Pi Health Monitoring + +```bash +# Check Docker containers +docker ps + +# View logs +docker-compose logs -f + +# Monitor resources +htop + +# Check disk space +df -h + +# Temperature +vcgencmd measure_temp +``` + +--- + +## Docker Containers + +### Docker on Raspberry Pi + +**Architecture:** ARM64/ARMv7 + +**Key Containers:** + +#### 1. Backend API +```yaml +# docker-compose.yml +version: '3.8' +services: + api: + image: node:18-alpine + container_name: lucidia-api + working_dir: /app + volumes: + - ./api:/app + - /app/node_modules + ports: + - "3000:3000" + environment: + - NODE_ENV=production + - DATABASE_URL=${DATABASE_URL} + command: npm start + restart: unless-stopped +``` + +#### 2. WebSocket Server (Multiplayer) +```yaml + websocket: + image: node:18-alpine + container_name: lucidia-ws + working_dir: /app + volumes: + - ./websocket:/app + ports: + - "8080:8080" + environment: + - WS_PORT=8080 + command: npm start + restart: unless-stopped +``` + +#### 3. PostgreSQL Database +```yaml + postgres: + image: postgres:15-alpine + container_name: lucidia-db + ports: + - "5432:5432" + environment: + - POSTGRES_USER=lucidia + - POSTGRES_PASSWORD=${DB_PASSWORD} + - POSTGRES_DB=lucidia_metaverse + volumes: + - postgres_data:/var/lib/postgresql/data + restart: unless-stopped + +volumes: + postgres_data: +``` + +#### 4. Redis Cache +```yaml + redis: + image: redis:7-alpine + container_name: lucidia-redis + ports: + - "6379:6379" + volumes: + - redis_data:/data + restart: unless-stopped + +volumes: + redis_data: +``` + +### Docker Management Commands + +```bash +# Start all services +docker-compose up -d + +# Stop all services +docker-compose down + +# Rebuild and restart +docker-compose up -d --build + +# View logs +docker-compose logs -f [service_name] + +# Execute command in container +docker exec -it lucidia-api sh + +# Check resource usage +docker stats + +# Prune unused images/containers +docker system prune -a +``` + +### ARM-Specific Considerations + +```dockerfile +# Use ARM-compatible base images +FROM --platform=linux/arm64 node:18-alpine + +# or multi-platform +FROM node:18-alpine +# Docker will automatically pull the correct arch +``` + +--- + +## Claude Code Integration + +### Using Claude Code for Deployment + +Claude Code can autonomously deploy to all infrastructure components. + +**Prerequisites:** +```bash +# Ensure wrangler is configured +wrangler login + +# SSH keys for Pi access +ssh-keygen -t ed25519 -C "claude-deployment" +ssh-copy-id pi@192.168.4.38 + +# GitHub token (if using private repos) +export GITHUB_TOKEN="ghp_..." +``` + +### Deployment Commands via Claude + +**Deploy Metaverse:** +```bash +# Claude can execute: +cd ~/lucidia-metaverse +npm run build +wrangler pages deploy dist --project-name=lucidia-earth +``` + +**Deploy Worker:** +```bash +cd ~/lucidia-earth-router +wrangler deploy +``` + +**Deploy to Raspberry Pi:** +```bash +# Claude can SSH and deploy: +ssh pi@192.168.4.38 << 'EOF' +cd ~/lucidia-backend +git pull origin main +docker-compose up -d --build +EOF +``` + +### Claude Automation Scripts + +Create `~/lucidia-deploy.sh`: +```bash +#!/bin/bash +# Automated deployment script for Claude Code + +set -e + +echo "🚀 Deploying Lucidia.Earth..." + +# Build and deploy frontend +echo "📦 Building metaverse..." +cd ~/lucidia-metaverse +npm install +npm run build +wrangler pages deploy dist --project-name=lucidia-earth + +# Deploy worker +echo "⚡ Deploying router worker..." +cd ~/lucidia-earth-router +wrangler deploy + +# Deploy to Raspberry Pi +echo "🥧 Deploying to Raspberry Pi..." +ssh pi@192.168.4.38 << 'ENDSSH' +cd ~/lucidia-backend +git pull origin main +docker-compose pull +docker-compose up -d --build +echo "✅ Pi deployment complete" +ENDSSH + +echo "✨ Deployment complete! https://lucidia.earth" +``` + +Make executable: +```bash +chmod +x ~/lucidia-deploy.sh +``` + +### Claude Memory Integration + +Add to `~/.claude/CLAUDE.md`: +```markdown +## Lucidia.Earth Infrastructure + +- Domain: lucidia.earth +- Cloudflare Pages: lucidia-earth +- Worker: lucidia-earth-router +- Pi: 192.168.4.38 (lucidia) +- Deployment script: ~/lucidia-deploy.sh + +Quick deploy command: +~/lucidia-deploy.sh +``` + +--- + +## All Domain Routing + +### Complete Domain Mapping + +#### BlackRoad Ecosystem + +| Domain | Type | Route To | Purpose | +|--------|------|----------|---------| +| blackroad.io | Root | blackroad-io.pages.dev | Main corporate site | +| earth.blackroad.io | Sub | earth-blackroad-io.pages.dev | Earth visualization | +| demo.blackroad.io | Sub | blackroad-os-demo.pages.dev | Demo environment | +| home.blackroad.io | Sub | blackroad-os-home.pages.dev | Home dashboard | +| api.blackroad.io | Sub | 159.65.43.12:3000 (DigitalOcean) | API backend | + +#### Lucidia Ecosystem + +| Domain | Type | Route To | Purpose | +|--------|------|----------|---------| +| lucidia.earth | Root | lucidia-earth.pages.dev | Metaverse (via worker) | +| api.lucidia.earth | Sub | Pi 192.168.4.38:3000 | Backend API | +| ws.lucidia.earth | Sub | Pi 192.168.4.38:8080 | WebSocket server | +| docs.lucidia.earth | Sub | lucidia-docs.pages.dev | Documentation | +| admin.lucidia.earth | Sub | lucidia-admin.pages.dev | Admin panel | + +#### Quantum Domains + +| Domain | Type | Route To | Purpose | +|--------|------|----------|---------| +| blackroadquantum.info | Root | blackroad-os-web.pages.dev | Quantum info | +| blackroadquantum.net | Root | blackroad-os-web.pages.dev | Quantum net | +| blackroadquantum.shop | Root | blackroad-os-web.pages.dev | Quantum shop | +| blackroadquantum.store | Root | blackroad-os-web.pages.dev | Quantum store | +| blackroadqi.com | Root | blackroad-os-web.pages.dev | Quantum intelligence | + +### DNS Configuration Pattern + +**For Cloudflare Pages:** +``` +Type: CNAME +Name: @ (or subdomain) +Content: .pages.dev +Proxy: Enabled (orange cloud) +TTL: Auto +``` + +**For Workers:** +``` +Type: CNAME +Name: @ (or subdomain) +Content: .workers.dev +Proxy: Enabled +TTL: Auto +``` + +**For Raspberry Pi (via Tunnel):** +``` +Type: CNAME +Name: api (or subdomain) +Content: .cfargotunnel.com +Proxy: Enabled +TTL: Auto +``` + +### Adding New Domain + +**1. Add Domain to Cloudflare:** +```bash +# Via Dashboard or API +curl -X POST "https://api.cloudflare.com/client/v4/zones" \ + -H "Authorization: Bearer yP5h0HvsXX0BpHLs01tLmgtTbQurIKPL4YnQfIwy" \ + -H "Content-Type: application/json" \ + --data '{"name":"newdomain.com","account":{"id":"463024cf9efed5e7b40c5fbe7938e256"}}' +``` + +**2. Point to Pages Project:** +```bash +# Via wrangler or Cloudflare dashboard +# Dashboard: Pages → Project → Custom Domains → Add domain +``` + +**3. Create Worker Route (if needed):** +```toml +# wrangler.toml +[[routes]] +pattern = "newdomain.com/*" +zone_name = "newdomain.com" +``` + +--- + +## Deployment Workflows + +### Full Stack Deployment + +**Complete deployment from scratch:** + +```bash +#!/bin/bash +# full-deploy.sh + +# 1. Frontend (Metaverse) +echo "🎨 Deploying frontend..." +cd ~/lucidia-metaverse +npm install +npm run build +wrangler pages deploy dist --project-name=lucidia-earth + +# 2. Worker Router +echo "⚡ Deploying worker..." +cd ~/lucidia-earth-router +wrangler deploy + +# 3. Backend API (Raspberry Pi) +echo "🥧 Deploying backend to Pi..." +ssh pi@192.168.4.38 << 'EOF' + cd ~/lucidia-backend + git pull origin main + npm install + docker-compose up -d --build +EOF + +# 4. Verify deployment +echo "✅ Verifying..." +curl -I https://lucidia.earth +curl -I https://api.lucidia.earth/health + +echo "🎉 Full deployment complete!" +``` + +### Rollback Procedure + +**Pages Rollback:** +```bash +# View deployments +wrangler pages deployment list --project-name=lucidia-earth + +# Rollback to specific deployment +wrangler pages deployment rollback --project-name=lucidia-earth +``` + +**Worker Rollback:** +```bash +# View versions +wrangler deployments list + +# Rollback +wrangler rollback [VERSION_ID] +``` + +**Pi Rollback:** +```bash +ssh pi@192.168.4.38 << 'EOF' + cd ~/lucidia-backend + git log --oneline -5 # Find commit + git reset --hard + docker-compose up -d --build +EOF +``` + +### CI/CD Pipeline + +**GitHub Actions - Full Pipeline:** + +```yaml +# .github/workflows/production.yml +name: Production Deployment + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + deploy-frontend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install + - run: npm run build + - uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CF_API_TOKEN }} + accountId: 463024cf9efed5e7b40c5fbe7938e256 + command: pages deploy dist --project-name=lucidia-earth + + deploy-worker: + runs-on: ubuntu-latest + needs: deploy-frontend + steps: + - uses: actions/checkout@v3 + - uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CF_API_TOKEN }} + command: deploy + workingDirectory: 'worker' + + deploy-backend: + runs-on: ubuntu-latest + needs: deploy-worker + steps: + - name: Deploy to Raspberry Pi + uses: appleboy/ssh-action@master + with: + host: 192.168.4.38 + username: pi + key: ${{ secrets.PI_SSH_KEY }} + script: | + cd ~/lucidia-backend + git pull origin main + docker-compose up -d --build +``` + +--- + +## Troubleshooting + +### Common Issues + +**1. Pages not updating:** +```bash +# Clear cache +curl -X POST "https://api.cloudflare.com/client/v4/zones/848cf0b18d51e0170e0d1537aec3505a/purge_cache" \ + -H "Authorization: Bearer yP5h0HvsXX0BpHLs01tLmgtTbQurIKPL4YnQfIwy" \ + -H "Content-Type: application/json" \ + --data '{"purge_everything":true}' + +# Force new deployment +wrangler pages deploy dist --project-name=lucidia-earth --branch=production +``` + +**2. Worker not routing:** +```bash +# Check worker status +wrangler deployments list + +# View logs +wrangler tail + +# Redeploy +wrangler deploy --force +``` + +**3. Pi connection issues:** +```bash +# Test connectivity +ping 192.168.4.38 + +# Check SSH +ssh -v pi@192.168.4.38 + +# Check Docker +ssh pi@192.168.4.38 'docker ps' + +# Restart services +ssh pi@192.168.4.38 'cd ~/lucidia-backend && docker-compose restart' +``` + +**4. DNS propagation:** +```bash +# Check DNS +dig lucidia.earth +dig api.lucidia.earth + +# Check from different locations +curl -H "Host: lucidia.earth" http://104.21.89.100 + +# Cloudflare DNS flush (via dashboard or API) +``` + +### Health Check Endpoints + +**Frontend:** +```bash +curl https://lucidia.earth +# Should return HTML with "Lucidia Metaverse" +``` + +**Worker:** +```bash +curl -I https://lucidia.earth +# Should include header: X-Served-By: lucidia-earth-router +``` + +**Backend API:** +```bash +curl https://api.lucidia.earth/health +# Should return: {"status": "ok", "timestamp": "..."} +``` + +### Monitoring + +**Cloudflare Analytics:** +- Dashboard → Analytics → Traffic +- Web Analytics for visitor metrics +- Worker Analytics for edge performance + +**Pi Monitoring:** +```bash +# Install monitoring +sudo apt-get install prometheus-node-exporter + +# View metrics +curl http://192.168.4.38:9100/metrics +``` + +--- + +## Quick Reference + +### Essential Commands + +```bash +# Deploy everything +~/lucidia-deploy.sh + +# Deploy frontend only +cd ~/lucidia-metaverse && npm run build && wrangler pages deploy dist --project-name=lucidia-earth + +# Deploy worker only +cd ~/lucidia-earth-router && wrangler deploy + +# Deploy to Pi only +ssh pi@192.168.4.38 'cd ~/lucidia-backend && git pull && docker-compose up -d --build' + +# Check status +curl -I https://lucidia.earth +ssh pi@192.168.4.38 'docker ps' + +# View logs +wrangler tail +ssh pi@192.168.4.38 'docker-compose logs -f' +``` + +### Important URLs + +- **Production:** https://lucidia.earth +- **Pages Direct:** https://lucidia-earth.pages.dev +- **Cloudflare Dashboard:** https://dash.cloudflare.com +- **GitHub:** https://github.com/BlackRoad-OS +- **Pi Admin:** http://192.168.4.38 (local only) + +### Credentials Location + +- **Cloudflare API Token:** ~/.claude/CLAUDE.md +- **SSH Keys:** ~/.ssh/lucidia_pi +- **GitHub Token:** ~/.config/gh/hosts.yml +- **Environment Vars:** ~/lucidia-backend/.env + +--- + +**Document Version:** 1.0 +**Maintained By:** Claude Code + Alexa Louise Amundson +**Support:** blackroad.systems@gmail.com diff --git a/QUICK_DEPLOY.md b/QUICK_DEPLOY.md new file mode 100644 index 0000000..67493be --- /dev/null +++ b/QUICK_DEPLOY.md @@ -0,0 +1,225 @@ +# Lucidia.Earth Quick Deployment Guide + +**Last Updated:** 2025-12-22 + +--- + +## One-Command Deployments + +### Deploy Everything +```bash +~/lucidia-deploy.sh +``` + +### Deploy Frontend Only +```bash +cd ~/lucidia-metaverse && npm run build && wrangler pages deploy dist --project-name=lucidia-earth +``` + +### Deploy Worker Only +```bash +cd ~/lucidia-earth-router && wrangler deploy +``` + +### Deploy Backend (Raspberry Pi) Only +```bash +ssh pi@192.168.4.38 'cd ~/lucidia-backend && git pull && docker-compose up -d --build' +``` + +--- + +## Emergency Procedures + +### Complete Site Down +```bash +# 1. Check Cloudflare status +curl -I https://lucidia.earth + +# 2. Check worker +wrangler tail + +# 3. Check Pages +curl -I https://lucidia-earth.pages.dev + +# 4. If worker issue, redeploy +cd ~/lucidia-earth-router && wrangler deploy + +# 5. If Pages issue, redeploy +cd ~/lucidia-metaverse && wrangler pages deploy dist --project-name=lucidia-earth + +# 6. Clear Cloudflare cache +curl -X POST "https://api.cloudflare.com/client/v4/zones/848cf0b18d51e0170e0d1537aec3505a/purge_cache" \ + -H "Authorization: Bearer yP5h0HvsXX0BpHLs01tLmgtTbQurIKPL4YnQfIwy" \ + -H "Content-Type: application/json" \ + --data '{"purge_everything":true}' +``` + +### Backend API Down +```bash +# 1. Check Pi connectivity +ping 192.168.4.38 + +# 2. SSH and check Docker +ssh pi@192.168.4.38 'docker ps' + +# 3. Restart containers +ssh pi@192.168.4.38 'cd ~/lucidia-backend && docker-compose restart' + +# 4. Check logs +ssh pi@192.168.4.38 'cd ~/lucidia-backend && docker-compose logs --tail=100' + +# 5. Full rebuild if needed +ssh pi@192.168.4.38 'cd ~/lucidia-backend && docker-compose up -d --build --force-recreate' +``` + +### Rollback to Previous Version +```bash +# Frontend rollback +wrangler pages deployment list --project-name=lucidia-earth +wrangler pages deployment rollback --project-name=lucidia-earth + +# Worker rollback +wrangler deployments list +wrangler rollback [VERSION_ID] + +# Backend rollback +ssh pi@192.168.4.38 << 'EOF' + cd ~/lucidia-backend + git log --oneline -10 + git reset --hard + docker-compose up -d --build +EOF +``` + +--- + +## Health Checks + +### Quick Status Check +```bash +# All services +curl -I https://lucidia.earth && \ +curl -I https://lucidia-earth.pages.dev && \ +ssh pi@192.168.4.38 'docker ps | grep lucidia' +``` + +### Individual Service Checks +```bash +# Frontend +curl https://lucidia.earth | grep "Lucidia Metaverse" + +# Worker +curl -I https://lucidia.earth | grep "X-Served-By" + +# Backend API +curl https://api.lucidia.earth/health + +# WebSocket +wscat -c wss://ws.lucidia.earth +``` + +--- + +## Common Tasks + +### Update Frontend Code +```bash +cd ~/lucidia-metaverse +# Edit files +npm run build +wrangler pages deploy dist --project-name=lucidia-earth +``` + +### Update Backend Code +```bash +ssh pi@192.168.4.38 << 'EOF' + cd ~/lucidia-backend + git pull + docker-compose up -d --build +EOF +``` + +### Add New Environment Variable +```bash +# For Worker +cd ~/lucidia-earth-router +wrangler secret put NEW_SECRET + +# For Pages +# Add via Cloudflare Dashboard: Pages → Settings → Environment Variables + +# For Pi/Docker +ssh pi@192.168.4.38 +cd ~/lucidia-backend +nano .env +# Add: NEW_VAR=value +docker-compose up -d --force-recreate +``` + +### View Logs +```bash +# Worker logs +wrangler tail + +# Pages deployment logs +wrangler pages deployment tail + +# Pi/Docker logs +ssh pi@192.168.4.38 'cd ~/lucidia-backend && docker-compose logs -f' + +# Specific container +ssh pi@192.168.4.38 'docker logs -f lucidia-api' +``` + +--- + +## Credentials Quick Access + +```bash +# Cloudflare Account ID +463024cf9efed5e7b40c5fbe7938e256 + +# Cloudflare Zone ID (lucidia.earth) +848cf0b18d51e0170e0d1537aec3505a + +# Cloudflare API Token +yP5h0HvsXX0BpHLs01tLmgtTbQurIKPL4YnQfIwy + +# Raspberry Pi IPs +# Lucidia: 192.168.4.38 +# BlackRoad: 192.168.4.64 +# iPhone: 192.168.4.68:8080 +# DigitalOcean: 159.65.43.12 +``` + +--- + +## URLs + +```bash +# Production +https://lucidia.earth + +# Pages Direct +https://lucidia-earth.pages.dev + +# Backend API +https://api.lucidia.earth + +# WebSocket +wss://ws.lucidia.earth + +# Admin +https://admin.lucidia.earth + +# Docs +https://docs.lucidia.earth +``` + +--- + +## Support + +- **Email:** blackroad.systems@gmail.com +- **Primary:** amundsonalexa@gmail.com +- **Full Docs:** ~/lucidia-earth-router/LUCIDIA_EARTH_INFRASTRUCTURE.md diff --git a/README.md b/README.md index df739c5..f6f045d 100644 --- a/README.md +++ b/README.md @@ -1,230 +1,81 @@ -# 🌐 BlackRoad OS Domains +# BlackRoad Domains - Complete Infrastructure Documentation -**Complete domain architecture with unique HTML pages for all BlackRoad OS services** +**Owner:** Alexa Louise Amundson +**Organization:** BlackRoad Inc. +**Email:** amundsonalexa@gmail.com | blackroad.systems@gmail.com +**Last Updated:** 2025-12-22 --- -## 📊 Overview +## 🌐 Overview -**Generated:** 15 unique HTML pages -**Total Domains:** 20+ (including quantum domains) -**Status:** ✅ Ready for deployment +Complete canonical documentation for all BlackRoad infrastructure: + +- **19 GoDaddy Registered Domains** +- **58 Cloudflare Pages Projects** +- **15 GitHub Organizations** +- **40+ GitHub Repositories** +- **7 Physical Devices** +- **4 AI Platform Integrations** --- -## 📁 Structure +## 📚 Documentation Files -``` -blackroad-domains/ -├── pages/ # Generated HTML pages -│ ├── blackroad-io.html # Main homepage -│ ├── universe-blackroad-io.html # Metaverse -│ ├── earth-blackroad-io.html # Earth simulation -│ ├── pitstop-blackroad-io.html # Secure portal -│ ├── creator-blackroad-io.html # Creator tools -│ ├── finance-blackroad-io.html # Finance dashboard -│ └── ... (15 total) -├── generate_domains.py # HTML generator script -├── DOMAIN_MAP.md # Complete domain mapping -└── README.md # This file -``` +1. **BLACKROAD_CANONICAL_TRUTH.md** ⭐ - Master source of truth +2. **COMPLETE_DOMAIN_MASTER_LIST.md** - All domains & projects +3. **LUCIDIA_EARTH_INFRASTRUCTURE.md** - Infrastructure guide +4. **QUICK_DEPLOY.md** - Fast reference +5. **ALL_DOMAINS_REFERENCE.md** - Domain routing +6. **blackroad-deploy-all.sh** - Master deployment +7. **blackroad-netdump.sh** - Network inventory --- -## 🎯 Domain Mapping +## 🌍 All 19 Registered Domains -### Core Platforms -| Domain | Page | Project | Status | -|--------|------|---------|--------| -| blackroad.io | blackroad-io.html | blackroad-io | Deploy | -| universe.blackroad.io | universe-blackroad-io.html | blackroad-metaverse | ✅ Has custom content | -| pitstop.blackroad.io | pitstop-blackroad-io.html | blackroad-pitstop | ✅ Has custom content | -| earth.blackroad.io | earth-blackroad-io.html | earth-blackroad-io | Deploy | +### Lucidia +- lucidia.earth ⭐ (Metaverse) +- lucidia.studio +- lucidiaqi.com -### Creator & Studio -| Domain | Page | Project | Status | -|--------|------|---------|--------| -| creator.blackroad.io | creator-blackroad-io.html | blackroad-hello | Deploy | -| creator-studio.blackroad.io | creator-studio-blackroad-io.html | blackroad-hello | Deploy | -| studio.blackroad.io | studio-blackroad-io.html | blackroad-hello | Deploy | +### BlackRoad Core +- blackroad.io (Main site) +- blackroad.me +- blackroad.company +- blackroad.systems +- blackroad.network -### Business & Operations -| Domain | Page | Project | Status | -|--------|------|---------|--------| -| finance.blackroad.io | finance-blackroad-io.html | blackroad-hello | Deploy | -| legal.blackroad.io | legal-blackroad-io.html | blackroad-hello | Deploy | -| education.blackroad.io | education-blackroad-io.html | blackroad-hello | Deploy | +### AI & Quantum +- blackroadai.com +- blackroadqi.com +- blackroadquantum.com/info/net/shop/store -### Research & Development -| Domain | Page | Project | Status | -|--------|------|---------|--------| -| research-lab.blackroad.io | research-lab-blackroad-io.html | blackroad-hello | Deploy | -| ideas.blackroad.io | ideas-blackroad-io.html | blackroad-hello | Deploy | -| devops.blackroad.io | devops-blackroad-io.html | blackroad-hello | Deploy | +### Blockchain +- roadchain.io +- roadcoin.io -### User Spaces -| Domain | Page | Project | Status | -|--------|------|---------|--------| -| home.blackroad.io | home-blackroad-io.html | blackroad-os-home | Deploy | -| demo.blackroad.io | demo-blackroad-io.html | blackroad-os-demo | Deploy | +### Other +- blackboxprogramming.io +- blackroadinc.us + +**Nameservers:** jade.ns.cloudflare.com, chad.ns.cloudflare.com --- -## 🚀 Deployment Instructions - -### Method 1: Deploy Individual Domains - -For each domain, copy the HTML file to the appropriate project and deploy: +## 🚀 Quick Start ```bash -# Example: Deploy blackroad.io -cp pages/blackroad-io.html ../blackroad-io-project/index.html -cd ../blackroad-io-project -wrangler pages deploy . --project-name=blackroad-io +# Deploy everything +~/blackroad-deploy-all.sh -# Example: Deploy earth.blackroad.io -cp pages/earth-blackroad-io.html ../earth-project/index.html -cd ../earth-project -wrangler pages deploy . --project-name=earth-blackroad-io -``` +# Get network inventory +~/blackroad-netdump.sh -### Method 2: Automated Deployment Script - -Run the deployment script (to be created): - -```bash -bash deploy_all_domains.sh +# Deploy specific project +wrangler pages deploy dist --project-name=lucidia-earth ``` --- -## 🎨 Page Features - -Each generated HTML page includes: - -- ✨ Beautiful gradient backgrounds -- 🎯 Domain-specific icon and branding -- 📝 Clear description and features -- 🔗 Call-to-action button -- 🏠 Back to main portal link -- 📱 Fully responsive design -- ⚡ Fast loading (no external dependencies except fonts) -- 🎨 Consistent BlackRoad OS branding - ---- - -## 🌈 Brand Colors - -```css ---orange: #FF9D00 ---red: #FF006B ---purple: #7700FF ---blue: #0066FF ---green: #27AE60 -``` - ---- - -## 🔧 Customization - -To add or modify domains: - -1. Edit `generate_domains.py` -2. Add domain configuration to `DOMAINS` dict -3. Run: `python3 generate_domains.py` -4. New HTML file will be generated in `pages/` - ---- - -## 📦 Deployment Priority - -### Phase 1: Core Domains (Immediate) -- [ ] blackroad.io (main homepage) -- [x] universe.blackroad.io (already has metaverse) -- [x] pitstop.blackroad.io (already has auth portal) -- [ ] earth.blackroad.io - -### Phase 2: Creator & Business (Week 1) -- [ ] creator.blackroad.io -- [ ] finance.blackroad.io -- [ ] legal.blackroad.io -- [ ] home.blackroad.io -- [ ] demo.blackroad.io - -### Phase 3: Extended Services (Week 2) -- [ ] creator-studio.blackroad.io -- [ ] studio.blackroad.io -- [ ] education.blackroad.io -- [ ] research-lab.blackroad.io -- [ ] ideas.blackroad.io -- [ ] devops.blackroad.io - ---- - -## 🔄 Update Process - -When you need to update a domain page: - -1. Edit configuration in `generate_domains.py` -2. Regenerate: `python3 generate_domains.py` -3. Copy updated HTML to project -4. Redeploy: `wrangler pages deploy . --project-name=PROJECT_NAME` - ---- - -## 📊 Statistics - -- **Total Pages Generated:** 15 -- **Total Domains Mapped:** 20+ -- **Lines of Code per Page:** ~150 -- **Total Generated Code:** ~2,250 lines -- **Load Time per Page:** < 1 second -- **File Size per Page:** ~5KB - ---- - -## 🎯 Next Steps - -1. **Deploy blackroad.io** - Main homepage (highest priority) -2. **Deploy earth.blackroad.io** - Earth simulation showcase -3. **Deploy home.blackroad.io** - User dashboard -4. **Deploy demo.blackroad.io** - Demo showcase -5. **Deploy creator suite** - All creator domains -6. **Deploy business suite** - Finance, legal, education -7. **Deploy research suite** - Research lab, ideas, devops - ---- - -## 💚 Philosophy - -Each domain represents a unique facet of the BlackRoad OS ecosystem: - -- **Universe:** Infinite creation and exploration -- **Pitstop:** Security and access control -- **Earth:** Scientific accuracy and visualization -- **Creator:** Tools for building the future -- **Finance:** Business intelligence -- **Research:** Innovation and discovery - -**"Infinite Love • Infinite Creation • Infinite Beauty"** - ---- - -## 📞 Support - -**BlackRoad OS, Inc.** -- Email: blackroad.systems@gmail.com -- Primary: amundsonalexa@gmail.com - ---- - -## 📜 License - -© 2025 BlackRoad OS, Inc. All rights reserved. - ---- - -**Built with 💚 by Alexa & Claude** -**December 22, 2025** - -🌐 **15 DOMAINS • ONE ECOSYSTEM** 🌐 +**"The road remembers everything. So do we."** 🛣️ diff --git a/blackroad-deploy-all.sh b/blackroad-deploy-all.sh new file mode 100755 index 0000000..1ed6cae --- /dev/null +++ b/blackroad-deploy-all.sh @@ -0,0 +1,242 @@ +#!/usr/bin/env bash +# BLACKROAD MASTER DEPLOYMENT SCRIPT +# Deploys all infrastructure across Cloudflare, Raspberry Pis, and Cloud VPS +# Owner: Alexa Louise Amundson +# Last Updated: 2025-12-22 + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +PURPLE='\033[0;35m' +CYAN='\033[0;36m' +NC='\033[0m' # No Color + +# Emojis +ROCKET="🚀" +PACKAGE="📦" +ZAP="⚡" +PI="🥧" +CLOUD="☁️" +CHECK="✅" +CROSS="❌" + +echo -e "${PURPLE}${ROCKET} BLACKROAD MASTER DEPLOYMENT${NC}" +echo "================================" +echo "Started: $(date)" +echo "" + +# ───────────────────────────────────────────────────── +# Helper Functions +# ───────────────────────────────────────────────────── + +log_success() { + echo -e "${GREEN}${CHECK} $1${NC}" +} + +log_error() { + echo -e "${RED}${CROSS} $1${NC}" +} + +log_info() { + echo -e "${CYAN}$1${NC}" +} + +log_section() { + echo "" + echo -e "${YELLOW}─────────────────────────────────────────────────────${NC}" + echo -e "${YELLOW}$1${NC}" + echo -e "${YELLOW}─────────────────────────────────────────────────────${NC}" +} + +# ───────────────────────────────────────────────────── +# Frontend Deployments (Cloudflare Pages) +# ───────────────────────────────────────────────────── + +deploy_frontend() { + local project=$1 + local path=$2 + + if [ ! -d "$path" ]; then + log_error "Directory not found: $path" + return 1 + fi + + log_info "${PACKAGE} Deploying $project..." + + cd "$path" + + # Install dependencies + if [ -f "package.json" ]; then + npm install --silent > /dev/null 2>&1 || { + log_error "npm install failed for $project" + return 1 + } + fi + + # Build + if grep -q '"build"' package.json 2>/dev/null; then + npm run build > /dev/null 2>&1 || { + log_error "Build failed for $project" + return 1 + } + fi + + # Deploy + wrangler pages deploy dist --project-name="$project" > /dev/null 2>&1 || { + log_error "Deployment failed for $project" + return 1 + } + + log_success "Deployed $project → https://$project.pages.dev" +} + +# ───────────────────────────────────────────────────── +# Worker Deployments +# ───────────────────────────────────────────────────── + +deploy_worker() { + local name=$1 + local path=$2 + + if [ ! -d "$path" ]; then + log_error "Directory not found: $path" + return 1 + fi + + log_info "${ZAP} Deploying worker: $name..." + + cd "$path" + + wrangler deploy > /dev/null 2>&1 || { + log_error "Worker deployment failed for $name" + return 1 + } + + log_success "Deployed worker: $name" +} + +# ───────────────────────────────────────────────────── +# Backend Deployments (Raspberry Pi) +# ───────────────────────────────────────────────────── + +deploy_pi_backend() { + local name=$1 + local host=$2 + local path=$3 + + log_info "${PI} Deploying to $name ($host)..." + + # Test SSH connectivity + if ! ssh -o ConnectTimeout=5 -o BatchMode=yes "pi@$host" exit 2>/dev/null; then + log_error "Cannot connect to $name ($host)" + return 1 + fi + + ssh "pi@$host" << EOF + set -e + cd $path || exit 1 + git pull origin main > /dev/null 2>&1 || exit 1 + docker-compose pull > /dev/null 2>&1 || exit 1 + docker-compose up -d --build > /dev/null 2>&1 || exit 1 +EOF + + if [ $? -eq 0 ]; then + log_success "Deployed to $name" + else + log_error "Deployment to $name failed" + return 1 + fi +} + +# ───────────────────────────────────────────────────── +# Cloud VPS Deployments +# ───────────────────────────────────────────────────── + +deploy_vps() { + local name=$1 + local host=$2 + local path=$3 + + log_info "${CLOUD} Deploying to $name ($host)..." + + # Test SSH connectivity + if ! ssh -o ConnectTimeout=5 -o BatchMode=yes "root@$host" exit 2>/dev/null; then + log_error "Cannot connect to $name ($host)" + return 1 + fi + + ssh "root@$host" << EOF + set -e + cd $path || exit 1 + git pull origin main > /dev/null 2>&1 || exit 1 + docker-compose up -d --build > /dev/null 2>&1 || exit 1 +EOF + + if [ $? -eq 0 ]; then + log_success "Deployed to $name" + else + log_error "Deployment to $name failed" + return 1 + fi +} + +# ───────────────────────────────────────────────────── +# DEPLOYMENT EXECUTION +# ───────────────────────────────────────────────────── + +DEPLOY_FRONTENDS=${DEPLOY_FRONTENDS:-true} +DEPLOY_WORKERS=${DEPLOY_WORKERS:-true} +DEPLOY_PI=${DEPLOY_PI:-true} +DEPLOY_VPS=${DEPLOY_VPS:-true} + +# Frontend Deployments +if [ "$DEPLOY_FRONTENDS" = true ]; then + log_section "${PACKAGE} CLOUDFLARE PAGES DEPLOYMENTS" + + deploy_frontend "lucidia-earth" ~/lucidia-metaverse + deploy_frontend "blackroad-io" ~/blackroad-io + deploy_frontend "blackroad-os-web" ~/blackroad-os-web + deploy_frontend "roadworld" ~/roadworld +fi + +# Worker Deployments +if [ "$DEPLOY_WORKERS" = true ]; then + log_section "${ZAP} CLOUDFLARE WORKERS DEPLOYMENTS" + + deploy_worker "lucidia-earth-router" ~/lucidia-earth-router + deploy_worker "blackroad-landing-worker" ~/blackroad-landing-worker +fi + +# Raspberry Pi Deployments +if [ "$DEPLOY_PI" = true ]; then + log_section "${PI} RASPBERRY PI DEPLOYMENTS" + + deploy_pi_backend "lucidia-pi" "192.168.4.38" "~/lucidia-backend" + deploy_pi_backend "blackroad-pi" "192.168.4.64" "~/blackroad-services" +fi + +# Cloud VPS Deployments +if [ "$DEPLOY_VPS" = true ]; then + log_section "${CLOUD} CLOUD VPS DEPLOYMENTS" + + deploy_vps "codex-infinity" "159.65.43.12" "/opt/blackroad-api" +fi + +# ───────────────────────────────────────────────────── +# Summary +# ───────────────────────────────────────────────────── + +echo "" +log_section "${CHECK} DEPLOYMENT COMPLETE" +echo "Finished: $(date)" +echo "" +echo "Access your deployments:" +echo " ${CYAN}Lucidia Metaverse:${NC} https://lucidia.earth" +echo " ${CYAN}BlackRoad Main:${NC} https://blackroad.io" +echo " ${CYAN}Quantum Platform:${NC} https://blackroadqi.com" +echo " ${CYAN}RoadWorld:${NC} https://roadworld.pages.dev" +echo "" diff --git a/blackroad-netdump.sh b/blackroad-netdump.sh new file mode 100755 index 0000000..74ca990 --- /dev/null +++ b/blackroad-netdump.sh @@ -0,0 +1,279 @@ +#!/usr/bin/env bash +# BLACKROAD NETWORK INVENTORY DUMP +# Collects complete network configuration from any node +# Owner: Alexa Louise Amundson +# Last Updated: 2025-12-22 + +set -e + +# Colors +CYAN='\033[0;36m' +YELLOW='\033[1;33m' +GREEN='\033[0;32m' +NC='\033[0m' + +section() { + echo "" + echo -e "${YELLOW}═══════════════════════════════════════════════════════════${NC}" + echo -e "${CYAN}$1${NC}" + echo -e "${YELLOW}═══════════════════════════════════════════════════════════${NC}" +} + +subsection() { + echo "" + echo -e "${GREEN}─── $1 ───${NC}" +} + +echo -e "${CYAN}" +cat << 'EOF' +╔═══════════════════════════════════════════════════════════╗ +║ ║ +║ BLACKROAD NETWORK INVENTORY DUMP ║ +║ ║ +╚═══════════════════════════════════════════════════════════╝ +EOF +echo -e "${NC}" + +echo "Generated: $(date -u +"%Y-%m-%d %H:%M:%S UTC")" +echo "Node: $(hostname)" +echo "" + +# ───────────────────────────────────────────────────── +# SYSTEM INFORMATION +# ───────────────────────────────────────────────────── + +section "SYSTEM INFORMATION" + +subsection "Hostname" +hostname 2>/dev/null || echo "Unknown" + +subsection "OS Information" +if [ -f /etc/os-release ]; then + cat /etc/os-release +elif [ -f /etc/lsb-release ]; then + cat /etc/lsb-release +else + uname -a +fi + +subsection "Kernel" +uname -r + +subsection "Architecture" +uname -m + +subsection "Uptime" +uptime + +# ───────────────────────────────────────────────────── +# IP ADDRESSES +# ───────────────────────────────────────────────────── + +section "IP ADDRESSES" + +subsection "All IP Addresses" +hostname -I 2>/dev/null || echo "Command not available" + +subsection "IPv4 Only" +hostname -i 2>/dev/null || echo "Command not available" + +# ───────────────────────────────────────────────────── +# NETWORK INTERFACES +# ───────────────────────────────────────────────────── + +section "NETWORK INTERFACES" + +if command -v ip &> /dev/null; then + subsection "Interface Details (ip addr)" + ip addr show + + subsection "Interface Statistics (ip -s link)" + ip -s link +elif command -v ifconfig &> /dev/null; then + subsection "Interface Details (ifconfig)" + ifconfig -a +else + echo "No network interface commands available" +fi + +# ───────────────────────────────────────────────────── +# ROUTING TABLES +# ───────────────────────────────────────────────────── + +section "ROUTING TABLES" + +if command -v ip &> /dev/null; then + subsection "IPv4 Routes" + ip route show + + subsection "IPv6 Routes" + ip -6 route show +elif command -v netstat &> /dev/null; then + subsection "Routes (netstat)" + netstat -rn +else + echo "No routing commands available" +fi + +# ───────────────────────────────────────────────────── +# LISTENING PORTS & SERVICES +# ───────────────────────────────────────────────────── + +section "LISTENING PORTS & SERVICES" + +if command -v ss &> /dev/null; then + subsection "All Listening Ports (TCP & UDP)" + ss -tuln +elif command -v netstat &> /dev/null; then + subsection "All Listening Ports (netstat)" + netstat -tuln +else + echo "No port listing commands available" +fi + +# ───────────────────────────────────────────────────── +# DOCKER NETWORKS +# ───────────────────────────────────────────────────── + +section "DOCKER NETWORKS" + +if command -v docker &> /dev/null; then + subsection "Docker Network List" + docker network ls 2>/dev/null || echo "Docker daemon not running or not accessible" + + subsection "Docker Bridge Network Details" + docker network inspect bridge 2>/dev/null || echo "Bridge network not available" + + subsection "Running Containers" + docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" 2>/dev/null || echo "No containers or Docker not accessible" +else + echo "Docker not installed or not in PATH" +fi + +# ───────────────────────────────────────────────────── +# TAILSCALE MESH +# ───────────────────────────────────────────────────── + +section "TAILSCALE MESH" + +if command -v tailscale &> /dev/null; then + subsection "Tailscale Status" + tailscale status 2>/dev/null || echo "Tailscale not running" + + subsection "Tailscale IP" + tailscale ip 2>/dev/null || echo "Not connected" + + subsection "Tailscale Version" + tailscale version 2>/dev/null || echo "Unknown" +else + echo "Tailscale not installed" +fi + +# ───────────────────────────────────────────────────── +# DNS CONFIGURATION +# ───────────────────────────────────────────────────── + +section "DNS CONFIGURATION" + +subsection "Resolv.conf" +if [ -f /etc/resolv.conf ]; then + cat /etc/resolv.conf +else + echo "resolv.conf not found" +fi + +subsection "DNS Test (google.com)" +if command -v dig &> /dev/null; then + dig google.com +short +elif command -v nslookup &> /dev/null; then + nslookup google.com | grep Address | tail -n +2 +else + echo "No DNS query tools available" +fi + +# ───────────────────────────────────────────────────── +# FIREWALL STATUS +# ───────────────────────────────────────────────────── + +section "FIREWALL STATUS" + +if command -v ufw &> /dev/null; then + subsection "UFW Status" + sudo ufw status verbose 2>/dev/null || echo "UFW not accessible (requires sudo)" +fi + +if command -v iptables &> /dev/null; then + subsection "IPTables Rules" + sudo iptables -L -n 2>/dev/null || echo "iptables not accessible (requires sudo)" +fi + +# ───────────────────────────────────────────────────── +# NETWORK CONNECTIVITY TESTS +# ───────────────────────────────────────────────────── + +section "CONNECTIVITY TESTS" + +subsection "Ping Gateway" +if command -v ip &> /dev/null; then + GATEWAY=$(ip route | grep default | awk '{print $3}' | head -1) + if [ -n "$GATEWAY" ]; then + echo "Gateway: $GATEWAY" + ping -c 3 -W 2 "$GATEWAY" 2>/dev/null || echo "Gateway unreachable" + else + echo "No default gateway found" + fi +fi + +subsection "Ping Google DNS (8.8.8.8)" +ping -c 3 -W 2 8.8.8.8 2>/dev/null || echo "Internet unreachable" + +subsection "Ping IPv6 (google.com)" +ping6 -c 3 -W 2 google.com 2>/dev/null || echo "IPv6 not available" + +# ───────────────────────────────────────────────────── +# ACTIVE CONNECTIONS +# ───────────────────────────────────────────────────── + +section "ACTIVE CONNECTIONS" + +if command -v ss &> /dev/null; then + subsection "Established TCP Connections" + ss -tun state established +else + echo "ss command not available" +fi + +# ───────────────────────────────────────────────────── +# SYSTEM RESOURCES +# ───────────────────────────────────────────────────── + +section "SYSTEM RESOURCES" + +subsection "Memory Usage" +free -h 2>/dev/null || echo "free command not available" + +subsection "Disk Usage" +df -h 2>/dev/null || echo "df command not available" + +subsection "CPU Info" +if [ -f /proc/cpuinfo ]; then + grep "model name" /proc/cpuinfo | head -1 + grep "cpu cores" /proc/cpuinfo | head -1 +else + echo "CPU info not available" +fi + +subsection "Load Average" +cat /proc/loadavg 2>/dev/null || echo "Load average not available" + +# ───────────────────────────────────────────────────── +# END OF DUMP +# ───────────────────────────────────────────────────── + +echo "" +echo -e "${YELLOW}═══════════════════════════════════════════════════════════${NC}" +echo -e "${GREEN}✅ NETWORK DUMP COMPLETE${NC}" +echo -e "${YELLOW}═══════════════════════════════════════════════════════════${NC}" +echo "" +echo "Save this output to compare against BLACKROAD_CANONICAL_TRUTH.md" +echo ""