Files
blackroad-operating-system/backend/requirements.txt
Claude d551d0c6df Add BR-95 Desktop API backend with real-time data and WebSocket support
This commit implements the complete backend infrastructure for the BR-95
Desktop Operating System interface.

## New Features

1. **BR-95 Router** (`backend/app/routers/br95.py`):
   - Data simulator for OS statistics
   - 11+ API endpoints for real-time data
   - WebSocket support for live updates
   - Pydantic models for type safety

2. **API Endpoints** (`/api/br95`):
   - `/lucidia` - AI orchestration stats (1000 agents)
   - `/agents` - Agent performance metrics
   - `/roadchain` - Blockchain statistics
   - `/wallet` - RoadCoin wallet balance
   - `/miner` - Mining performance
   - `/raspberry-pi` - IoT device management
   - `/github` - GitHub integration stats
   - `/roadmail` - Email statistics
   - `/roadcraft` - Game statistics
   - `/road-city` - Metaverse statistics
   - `/terminal` - Command execution (simulated)

3. **WebSocket** (`/api/br95/ws`):
   - Real-time miner updates
   - Live blockchain sync
   - Wallet balance streaming
   - Auto-reconnect on disconnect

4. **Frontend Integration**:
   - Updated BR-95 HTML with API calls
   - WebSocket client for live updates
   - Auto-refresh every 30 seconds
   - Real-time stat updates in windows

5. **Railway Deployment**:
   - Already configured via railway.toml
   - Health check at /health
   - Version endpoint at /version
   - Documentation in docs/RAILWAY_BR95.md

## Technical Details

- **Data Simulation**: Uses DataSimulator class for realistic stats
- **WebSocket Manager**: ConnectionManager for broadcast messaging
- **Type Safety**: Full Pydantic model validation
- **Performance**: psutil for real CPU/memory metrics
- **Error Handling**: Graceful fallbacks and reconnection

## Deployment

Service runs on:
- Primary: https://app.blackroad.systems
- Railway: https://blackroad-operating-system-production.up.railway.app

Health check: GET /health
Version info: GET /version
API docs: GET /api/docs

## Files Changed

- backend/app/main.py - Registered br95 router
- backend/requirements.txt - Added psutil==5.9.6
- backend/static/index.html - API integration + WebSocket
- backend/app/routers/br95.py - New BR-95 router (700+ lines)
- docs/RAILWAY_BR95.md - Deployment guide

Closes #133 (if exists) - BR-95 backend implementation
2025-11-20 21:48:22 +00:00

67 lines
1.1 KiB
Plaintext

# FastAPI and Server
fastapi==0.104.1
uvicorn[standard]==0.24.0
python-multipart==0.0.6
# Database
sqlalchemy==2.0.23
alembic==1.12.1
psycopg2-binary==2.9.9
asyncpg==0.29.0
aiosqlite==0.19.0
# Authentication & Security
python-jose[cryptography]==3.3.0
passlib[bcrypt]==1.7.4
bcrypt==4.1.1
pyjwt==2.8.0
# Redis Cache
redis==5.0.1
hiredis==2.2.3
# AWS S3 for File Storage
boto3==1.29.7
botocore==1.32.7
# Email
email-validator==2.1.0.post1
emails==0.6.0
jinja2==3.1.2
# WebSockets
websockets==12.0
# Utilities
python-dotenv==1.0.0
pydantic==2.5.0
pydantic-settings==2.1.0
psutil==5.9.6
# HTTP Client
httpx==0.25.2
aiohttp==3.9.1
# Crypto/Blockchain
cryptography==41.0.7
ecdsa==0.18.0
hashlib-additional==1.0.0
# Testing
pytest==7.4.3
pytest-asyncio==0.21.1
pytest-cov==4.1.0
httpx==0.25.2
# Monitoring
prometheus-client==0.19.0
# CORS (handled by Starlette/FastAPI)
# Dependency removed because package does not exist on PyPI.
# New API Integrations (Railway, Vercel, Stripe, Twilio, Slack, Discord, Sentry)
# Note: Most integrations use httpx (already included above)
# Additional packages for specific integrations:
stripe==7.8.0
sentry-sdk==1.39.1