A Progressive Web App (PWA) for monitoring and controlling distributed AI networks. Built with Next.js 16, featuring real-time WebSocket communication, hardware monitoring, and AI chat interface.
- Real-time system metrics (CPU, RAM, GPU)
- Network load visualization
- Node status overview
- Health score calculation
- Individual node monitoring
- Hardware profile details
- Power controls (On/Off/Restart)
- Process monitoring
- Command execution
- QR Code - Scan to link new PCs
- Manual Code - 8-character codes
- Hardware profile collection
- Real-time status updates
- Chat with Chappi AI
- Training task management
- Parameter configuration
- Progress visualization
- Conversation history
- Cloud backup
- Search functionality
- Installable on Android/iOS/Desktop
- Offline support
- Push notifications
- Background sync
# Clone the repository
git clone https://github.com/your-username/chappi.git
cd chappi
# Install dependencies
bun install
# Generate Prisma client
bun run db:generate
# Start development server
bun run dev
# Start WebSocket service (separate terminal)
cd mini-services/chappi-ws && bun run devOpen http://localhost:3000 and use the API key: chappi-admin-key
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CHAPPI PWA β
β βββββββββββ βββββββββββ ββββββββββββ ββββββββββββββ β
β βDashboardβ β Nodes β βAI Controlβ β Memory β β
β ββββββ¬βββββ ββββββ¬βββββ ββββββ¬ββββββ βββββββ¬βββββββ β
β β β β β β
β ββββββββββββ΄ββββββββββββ΄βββββββββββββββ β
β β β
β WebSocket β
β β β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ
β
βββββββββββββ΄ββββββββββββ
β WebSocket Server β
β (Port 3003) β
β β
β β’ Node Management β
β β’ Linking Codes β
β β’ Training Tasks β
β β’ Real-time Events β
βββββββββββββββββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
β β β
ββββββ΄βββββ ββββββ΄βββββ ββββββ΄βββββ
β Node 1 β β Node 2 β β Node N β
β (Agent) β β (Agent) β β (Agent) β
βββββββββββ βββββββββββ βββββββββββ
chappi/
βββ src/
β βββ app/
β β βββ api/ # API Routes
β β β βββ auth/ # Authentication
β β β βββ linking/ # Node linking
β β β βββ nodes/ # Node management
β β β βββ conversations/# Chat history
β β β βββ backups/ # Memory backups
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Main app
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ dashboard.tsx # Dashboard view
β β βββ nodes-view.tsx # Nodes management
β β βββ ai-control.tsx # AI chat & training
β β βββ memory-view.tsx # Conversation memory
β β βββ sidebar.tsx # Navigation
β β βββ linking-modal.tsx # QR/Code linking
β β βββ node-hardware-profile.tsx
β βββ hooks/
β β βββ use-websocket.ts # WebSocket hook
β βββ lib/
β βββ store.ts # Zustand state
β βββ db.ts # Prisma client
βββ mini-services/
β βββ chappi-ws/ # WebSocket server
β βββ index.ts
βββ public/
β βββ icons/ # PWA icons
β βββ screenshots/ # PWA screenshots
β βββ manifest.json # PWA manifest
β βββ sw.js # Service worker
βββ scripts/
β βββ generate-icons.js # Icon generator
β βββ generate-screenshots.js
β βββ chappi_agent.py # PC agent simulator
βββ prisma/
β βββ schema.prisma # Database schema
βββ .github/
β βββ workflows/
β βββ deploy.yml # CI/CD pipeline
βββ vercel.json # Vercel config
βββ next.config.ts # Next.js config
Create .env.local file:
# Database
DATABASE_URL="file:./db/chappi.db"
# Authentication
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
# WebSocket
NEXT_PUBLIC_WS_URL=ws://localhost:3003
NEXT_PUBLIC_WS_PORT=3003
# API
CHAPPI_API_KEY=chappi-admin-keygit init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/your-username/chappi.git
git push -u origin main- Go to vercel.com
- Import your GitHub repository
- Configure environment variables:
DATABASE_URL- SQLite or PostgreSQL connectionNEXTAUTH_SECRET- Random secret for authNEXTAUTH_URL- Your Vercel URLCHAPPI_API_KEY- Admin API key
Add these secrets in GitHub repository settings:
VERCEL_ORG_ID- From Vercel account settingsVERCEL_PROJECT_ID- From project settingsVERCEL_TOKEN- Generate from Vercel settings
Push to main branch - GitHub Actions will automatically deploy!
- Open Chrome
- Navigate to your deployed URL
- Tap "Add to Home Screen"
- Open Safari
- Navigate to your deployed URL
- Tap Share β "Add to Home Screen"
- Open Chrome/Edge
- Navigate to your deployed URL
- Click install icon in address bar
The PC agent collects hardware data and sends it to the server.
# Install dependencies
pip install requests wmi psutil
# Run with linking code
python chappi_agent.py --server https://your-app.vercel.app --code ABCD1234- CPU: Model, cores, threads, frequency, usage
- RAM: Total, used, free, available
- GPU: Model, VRAM, driver, usage
- Disks: Capacity, type (SSD/HDD), usage
- System: Hostname, IP, MAC, OS, uptime
- Access: User, admin status, privileges
- Framework: Next.js 16 (App Router)
- Language: TypeScript 5
- Styling: Tailwind CSS 4 + shadcn/ui
- State: Zustand
- Charts: Recharts
- Real-time: Socket.IO
- Database: SQLite + Prisma
- PWA: Service Worker + Web App Manifest
MIT License - feel free to use this for your own projects!
Built with β€οΈ for distributed AI systems
