πŸš€ ICN Quick Start - Full Stack

Status: βœ… PRODUCTION READY
Date: 2025-12-12

🎯 What We Have

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ICN Full Stack                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Mobile Wallet (CoopWallet)    ←→  Gateway API          β”‚
β”‚  β€’ 11 screens implemented          β€’ REST + WebSocket   β”‚
β”‚  β€’ Real-time updates               β€’ Auth + payments    β”‚
β”‚  β€’ Offline mode                    β€’ Governance + trust β”‚
β”‚  β€’ QR payments                     β€’ Identity (SDIS)    β”‚
β”‚  β€’ Governance voting               β€’ Metrics/monitoring β”‚
β”‚  β€’ Identity verification                                β”‚
β”‚  β€’ Trust attestations              Backend Services     β”‚
β”‚                                    β€’ ICN daemon (icnd)  β”‚
β”‚  Web UI (Pilot)                    β€’ Gossip protocol    β”‚
β”‚  β€’ Member directory                β€’ Ledger sync        β”‚
β”‚  β€’ Payment flows                   β€’ Trust graph        β”‚
β”‚  β€’ Proposal voting                 β€’ Governance         β”‚
β”‚  β€’ Dashboard                       β€’ Distributed computeβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸƒ One-Command Deployment

# Start everything (daemon, gateway, pilot-ui, metrics)
docker-compose -f docker-compose.full.yml up -d

# Check status
docker-compose -f docker-compose.full.yml ps

# View logs
docker-compose -f docker-compose.full.yml logs -f gateway

# Stop everything
docker-compose -f docker-compose.full.yml down

πŸ“± Mobile Wallet

Development

cd sdk/react-native/examples/CoopWallet
npm install
npm start   # Opens Metro bundler

Then:

  • Press i for iOS simulator
  • Press a for Android emulator
  • Scan QR with Expo Go app

Production Build

# Install Expo CLI globally
npm install -g eas-cli

# iOS
eas build --platform ios --profile production

# Android
eas build --platform android --profile production

🌐 Web UI

Development

cd web/pilot-ui
npm install
npm run dev   # http://localhost:5173

Production

# Build
npm run build

# Or use Docker
docker build -t icn-pilot-ui .
docker run -p 8080:80 icn-pilot-ui

πŸ”§ Backend Services

Local Development

cd icn

# Build everything
cargo build

# Run daemon
./target/debug/icnd

# Run gateway (separate terminal)
cd icn/crates/icn-gateway
cargo run

Testing

# Run all tests
cargo test

# Run specific crate tests
cargo test -p icn-gateway

# Run with logging
RUST_LOG=debug cargo test

πŸ“Š Access Points

Development

Service URL Description
Gateway API http://localhost:3030 REST + WebSocket
Pilot UI http://localhost:5173 Web interface
Mobile App Expo Metro React Native app
Metrics http://localhost:9090 Prometheus
Dashboard http://localhost:3000 Grafana

Production

Service URL Description
Gateway API https://api.icn.zone REST + WebSocket
Pilot UI https://pilot.icn.zone Web interface
Mobile App App Store / Play Store iOS/Android
Metrics https://metrics.icn.zone Monitoring

πŸ”‘ Key Features

Mobile Wallet

  • βœ… Login - Cooperative ID + secure keys
  • βœ… Payments - Send/receive with QR codes
  • βœ… Governance - View proposals, cast votes
  • βœ… Identity - SDIS Level 1 verification
  • βœ… Trust - Attest trust for members
  • βœ… Offline - Queue operations, auto-retry

Web UI

  • βœ… Dashboard - Overview of cooperative
  • βœ… Members - Directory with profiles
  • βœ… Payments - Transaction interface
  • βœ… Proposals - Create and vote
  • βœ… Settings - Configure preferences

Backend

  • βœ… Daemon - P2P networking, gossip
  • βœ… Gateway - API + WebSocket server
  • βœ… Ledger - Mutual credit accounting
  • βœ… Governance - Democratic proposals
  • βœ… Trust - Web-of-participation
  • βœ… Identity - DID + SDIS verification

πŸ“š Documentation

File Description
MOBILE_WALLET_INTEGRATION.md Complete mobile wallet docs
FULL_STACK_DEPLOY.md Deployment guide
SESSION_COMPLETE_20251212.md Integration session summary
docs/ARCHITECTURE.md System architecture
docs/GETTING_STARTED.md Development setup
ROADMAP.md Future plans

πŸ§ͺ Testing Checklist

Mobile App

  • Login with coop ID
  • View balance
  • Send payment
  • Receive via QR
  • Scan QR code
  • View proposals
  • Cast vote
  • View identity
  • Verify member
  • Attest trust
  • Test offline mode

Web UI

  • Login
  • View dashboard
  • Browse members
  • Send payment
  • Create proposal
  • Vote on proposal

Backend

  • Health check: curl http://localhost:3030/v1/health
  • WebSocket: wscat -c ws://localhost:3030/v1/ws
  • Create coop: POST /v1/coop
  • Make payment: POST /v1/ledger/{coop}/payment

🚨 Troubleshooting

Mobile App won't connect

  1. Check GATEWAY_URL in src/client.ts
  2. Verify gateway is running: curl http://localhost:3030/v1/health
  3. Check network permissions in app

Docker services won't start

  1. Check ports: lsof -i :3030 (gateway), lsof -i :5173 (pilot-ui)
  2. Check logs: docker-compose logs -f
  3. Rebuild: docker-compose up --build -d

Tests failing

  1. Clean build: cargo clean && cargo build
  2. Check deps: cargo update
  3. Run single test: cargo test test_name -- --nocapture

🎯 Quick Commands

# Start full stack
docker-compose -f docker-compose.full.yml up -d

# Mobile dev
cd sdk/react-native/examples/CoopWallet && npm start

# Web dev
cd web/pilot-ui && npm run dev

# Backend dev
cd icn && cargo run --bin icnd

# Run tests
cargo test

# View logs
docker-compose logs -f

# Stop everything
docker-compose down

πŸ“ž Support


Everything is wired and ready to go! πŸŽ‰