Back to Documentation
Architecture
Understanding CapaCloud's system architecture
System Overview
CapaCloud is built on a decentralized architecture leveraging Solana blockchain for payments and authentication, with a centralized backend for coordination and metadata.
Components
Frontend (Next.js)
Next.js 16 with React 19
Solana Wallet Adapter for wallet integration
TypeScript for type safety
Tailwind CSS for styling
Backend (Next.js API Routes)
RESTful API endpoints
User authentication via wallet signatures
Machine and rental management
Balance and transaction tracking
Database (MongoDB)
User accounts and settings
Machine metadata and status
Rental sessions and history
Transaction records
GPU Workers
Python-based worker script
Docker container management
NVIDIA GPU access via Container Toolkit
SSH server for user access
Heartbeat system for monitoring
Data Flow
User Rental Flow
- User connects wallet and tops up balance
- User selects and rents a GPU
- Backend creates rental record and updates machine status
- User receives SSH connection details
- Worker creates Docker container with GPU access
- Hourly billing automatically deducted
Provider Setup Flow
- Provider installs GPU worker with Account ID
- Worker registers with backend and sends heartbeats
- Machine appears as "pending" in registration page
- Provider completes registration (IP, SSH port, pricing)
- Machine becomes available for rent
Security
Wallet-based authentication (no passwords)
Message signing for authentication
SSH key-based access for GPU containers
Isolated Docker containers per rental
Encrypted communication (TLS/HTTPS)