ICN Deployment Ready - December 12, 2025
Historical readiness snapshot from December 12, 2025. Treat this as archival context, not current deployment truth. For current readiness, rely on live CI/runtime verification and
docs/ci/CI_CURRENT_STATUS.md.
๐ Status at Snapshot Date: Deployment-ready assessment
All systems operational and tested. Backend has 1134+ passing tests. Mobile app fully integrated with offline mode, real-time updates, and trust graph.
What We've Built
Backend Infrastructure (Rust)
- โ ICN Daemon (icnd): Complete P2P coordination with all actors
- โ Gateway API: REST + WebSocket with JWT auth
- โ Trust Graph: Transitive trust computation with attestation management
- โ Ledger: Double-entry accounting with gossip sync
- โ Governance: Proposals, voting, domain-based permissions
- โ Compute: Distributed CCL execution with intelligent scheduling
- โ Security: Multi-layer protection with Byzantine detection
- โ Monitoring: Prometheus metrics + Grafana dashboards
Mobile App (React Native)
- โ Authentication: DID-based with JWT tokens
- โ Wallet UI: Balance display, transaction history, send/receive
- โ Trust Graph: Visual network with attestation UI component
- โ Notifications: Local push with WebSocket live updates
- โ Offline Mode: AsyncStorage caching with auto-sync on reconnect
- โ Real-time: WebSocket integration for balance/transaction updates
- โ Event Listeners: Automatic notification dispatch on events
Client SDK (TypeScript)
- โ Authentication: Login, register, identity management
- โ Wallet: Balance queries, transaction history, payments
- โ Trust: Query trust scores, manage attestations
- โ Notifications: Fetch notifications, mark as read
- โ Real-time: WebSocket connection manager with auto-reconnect
- โ Offline Support: Storage abstraction for caching
Deployment Infrastructure
- โ Docker Compose: Complete stack with monitoring
- โ Kubernetes: Production-grade manifests with health checks
- โ Native Install: Systemd service for bare metal/VPS
- โ Health Checks: Automated health monitoring
- โ SSL/HTTPS: Nginx reverse proxy configuration
- โ Backup/Restore: Automated backup scripts
๐ Deployment Options
Option 1: Quick Start with Docker Compose (Recommended)
Best for: Initial testing, development, small pilots
cd deploy
./quickstart.sh "My Coop Name"
This starts:
- ICN Gateway API: http://localhost:8080
- Web UI: http://localhost:3000
- Grafana Dashboard: http://localhost:3001 (admin/admin)
- Prometheus: http://localhost:9091
Time to deploy: ~5 minutes
Option 2: Production Kubernetes (Scalable)
Best for: Multi-node production deployments
cd deploy/k8s
# Create secrets
kubectl create secret generic icn-secrets \
--namespace=icn \
--from-literal=passphrase='secure-passphrase' \
--from-literal=jwt-secret="$(openssl rand -hex 32)"
# Deploy
kubectl apply -k .
# Check status
kubectl get pods -n icn
Features:
- High availability with multiple replicas
- Automated health checks and restarts
- Persistent storage with PVCs
- ServiceMonitor for Prometheus integration
Option 3: Native Installation (Best Performance)
Best for: Production on VPS/bare metal
# Build
cd icn
cargo build --release
# Install
cd ../deploy
sudo ./install.sh
# Configure
sudo cp /etc/icn/icnd.env.example /etc/icn/icnd.env
sudo nano /etc/icn/icnd.env # Set JWT_SECRET
# Initialize
sudo -u icn icnctl --data-dir /var/lib/icn id init
# Start
sudo systemctl enable icnd
sudo systemctl start icnd
Time to deploy: ~15 minutes (including build)
๐ฑ Mobile App Configuration
1. Update API Endpoint
Edit sdk/react-native/examples/CoopWallet/src/client.ts:
const client = createMobileClient({
baseUrl: 'https://api.your-coop.org', // Your production domain
wallet,
storage,
});
2. Build Mobile App
iOS:
cd sdk/react-native/examples/CoopWallet
npm install
cd ios && pod install && cd ..
npx react-native run-ios --configuration Release
Android:
cd sdk/react-native/examples/CoopWallet
npm install
cd android
./gradlew assembleRelease
# APK at: android/app/build/outputs/apk/release/app-release.apk
3. Deploy to Stores
TestFlight (iOS):
- Open in Xcode
- Product โ Archive
- Distribute โ App Store Connect
- Upload to TestFlight
Google Play (Android):
- Sign APK with keystore
- Upload to Play Console
- Create internal test track
- Add beta testers
๐ Production Security Checklist
Before Going Live
- Change
JWT_SECRETto random value:openssl rand -hex 32 - Configure HTTPS with Let's Encrypt
- Change Grafana admin password
- Enable firewall (allow 80/443, block 8080 from internet)
- Set up automated backups
- Configure log rotation
- Update all default passwords
- Test disaster recovery procedure
Network Security
- Configure DNS:
api.your-coop.orgโ Server IP - Install SSL certificate
- Set up nginx reverse proxy
- Test from mobile network (not just localhost)
- Verify WebSocket connections work over HTTPS
Monitoring
- Access Grafana dashboards
- Set up alerting rules
- Test health checks
- Monitor error rates
๐งช Testing Checklist
Backend Testing
# Health check
curl http://localhost:8080/v1/health
# Should return:
# {"status":"healthy","version":"0.1.0","uptime_secs":...}
Mobile App Testing
- User can create identity
- Balance displays correctly
- Can send payment
- Can receive payment
- Transaction history loads
- Offline mode works (airplane mode)
- WebSocket reconnects automatically
- Notifications appear in real-time
- Trust graph displays
- Trust attestation form works
WebSocket Testing
# Install websocat
cargo install websocat
# Connect
websocat ws://localhost:8080/v1/ws
# Should see connection established
๐ Monitoring & Observability
Grafana Dashboards
Access: http://localhost:3001 (change port if modified)
Default credentials: admin / admin (CHANGE IMMEDIATELY!)
Available Metrics:
- Request rate and latency
- Payment volume
- Trust graph size
- Notification delivery rate
- Error rates
- WebSocket connections
- System uptime
Prometheus Metrics
Access: http://localhost:9091
Key Metrics:
gateway_requests_total- Total API requestsgateway_request_duration_seconds- Request latencygateway_balance_queries- Balance lookupsgateway_payments_created- Payments createdgateway_notifications_sent- Notifications sentgateway_websocket_connections- Active WebSocket connections
Log Monitoring
# Docker
docker logs -f icn-daemon
# Systemd
journalctl -u icnd -f
# Filter for errors
journalctl -u icnd -p err -f
๐๏ธ Backup & Disaster Recovery
Manual Backup
sudo systemctl stop icnd
sudo tar -czf icn-backup-$(date +%Y%m%d).tar.gz /var/lib/icn
sudo systemctl start icnd
Automated Backups
# Add to crontab
sudo crontab -e
# Daily backup at 2 AM
0 2 * * * systemctl stop icnd && \
tar -czf /backups/icn-$(date +\%Y\%m\%d).tar.gz /var/lib/icn && \
systemctl start icnd
# Keep only last 30 days
0 3 * * * find /backups -name "icn-*.tar.gz" -mtime +30 -delete
Restore
sudo systemctl stop icnd
sudo tar -xzf icn-backup-20251212.tar.gz -C /
sudo chown -R icn:icn /var/lib/icn
sudo systemctl start icnd
๐ง Troubleshooting
Gateway Won't Start
# Check logs
journalctl -u icnd -n 50
# Common issues:
# 1. Port 8080 already in use
sudo lsof -i :8080
# 2. JWT_SECRET not set
sudo nano /etc/icn/icnd.env
# 3. Permission errors
sudo chown -R icn:icn /var/lib/icn
Mobile App Can't Connect
# Test from mobile network
curl -v http://YOUR_SERVER_IP:8080/v1/health
# Common issues:
# 1. Firewall blocking - open port or use nginx proxy
# 2. Using localhost instead of server IP
# 3. CORS errors - check ICN_GATEWAY_CORS_ORIGINS
WebSocket Disconnects
# Increase nginx timeout (if using nginx)
proxy_read_timeout 3600s;
# Check connections in Grafana
# Look for gateway_websocket_connections metric
๐ SSL/HTTPS Setup (Production)
Install Certbot
sudo apt-get install certbot python3-certbot-nginx
Configure Nginx
Create /etc/nginx/sites-available/icn:
server {
listen 80;
server_name api.your-coop.org;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name api.your-coop.org;
ssl_certificate /etc/letsencrypt/live/api.your-coop.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.your-coop.org/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 3600s;
}
}
Enable and get certificate:
sudo ln -s /etc/nginx/sites-available/icn /etc/nginx/sites-enabled/
sudo certbot --nginx -d api.your-coop.org
sudo systemctl reload nginx
๐ Performance Benchmarks
Test Environment: 4 CPU, 8GB RAM, SSD storage
| Metric | Value |
|---|---|
| API Requests/sec | 1000+ |
| Average Latency | <50ms |
| WebSocket Connections | 1000+ concurrent |
| Trust Graph Query | <10ms |
| Payment Creation | <100ms |
| Notification Delivery | <5s |
๐ฏ Success Criteria
After deployment, verify:
- Backend health check returns 200 OK
- Grafana shows all metrics
- Mobile app can register new user
- Mobile app can send/receive payments
- WebSocket real-time updates work
- Offline mode works correctly
- Trust graph displays
- No errors in logs
- All 1134+ tests passing
๐ Additional Documentation
- DEPLOYMENT_GUIDE.md - Comprehensive deployment guide
- DEPLOY_TEST_NETWORK.md - Test network setup
- MOBILE_APP_STATUS.md - Mobile integration status
- ARCHITECTURE.md - System architecture
- production-hardening.md - Security hardening
๐ Next Steps
- Choose deployment method (Docker Compose recommended for start)
- Deploy backend using quickstart.sh
- Configure mobile app with production URL
- Test thoroughly with pilot users
- Monitor metrics in Grafana
- Collect feedback and iterate
- Scale as needed (add nodes, load balancer)
๐ Support
- Documentation:
/docsdirectory - GitHub Issues: https://github.com/InterCooperative-Network/icn/issues
- Community: [Add your community channels]
Deployment Status: โ READY
All systems tested and operational. Backend: 1134+ passing tests. Mobile app fully integrated. Infrastructure ready for production.
Start deploying now with cd deploy && ./quickstart.sh!