Backend fixes:
- Add linux-libc-dev and libc6-dev to support psutil compilation on ARM/aarch64
- Update psutil from 6.1.0 to 6.1.1 for better wheel support
Frontend fixes:
- Create missing lib/utils.ts with cn utility function
- Resolves "Module not found: Can't resolve '@/lib/utils'" error
- Uses clsx and tailwind-merge for className merging
These changes ensure successful Docker builds for both services.
Backend fixes:
- Updated psutil from 5.9.8 to 6.1.0 for better ARM64 support and pre-built wheels
Frontend fixes:
- Created missing lib/api/client.ts with axios API client
- Created missing lib/hooks/useStats.ts with system statistics hooks
- Created missing lib/hooks/useBots.ts with bot management hooks
- Fixed .gitignore to not ignore frontend/lib/ directory
These changes resolve the build errors:
- Backend: psutil compilation failure on aarch64
- Frontend: Missing module @/lib/hooks/useStats
Backend fixes:
- Add g++ and build-essential for complete C++ compilation support
- Upgrade pip, setuptools, and wheel before installing dependencies
- Ensures psutil and other packages with native extensions build correctly
Frontend fixes:
- Add build arguments for NEXT_PUBLIC_API_URL and NEXT_PUBLIC_WS_URL
- Pass environment variables during Docker build stage
- Set default values to prevent undefined destination in Next.js rewrites
- Configure docker-compose to pass build arguments to frontend service
These changes resolve:
- psutil build failure: "ERROR: Failed building wheel for psutil"
- Next.js build error: "Invalid rewrite found" with undefined destination
Backend fix:
- Add python3-dev to build dependencies for psutil compilation
- psutil requires Python development headers to build C extensions
Frontend fix:
- Explicitly copy package-lock.json to ensure it's available for npm ci
- Add verification step to confirm package-lock.json exists before npm ci
- Prevents "npm ci" usage errors due to missing lock file
The frontend Dockerfile uses 'npm ci' which requires package-lock.json to exist.
This file was missing, causing the Docker build to fail with exit code 1.
Generated package-lock.json by running 'npm install' in the frontend directory.
This ensures reproducible builds and faster Docker image creation.
Resolves the EUSAGE error: "npm ci" requires package-lock.json
Implement a comprehensive web-based dashboard for managing Telegram and Discord bots
with real-time monitoring, process control, and beautiful UI.
Backend (FastAPI):
- Complete REST API with OpenAPI documentation
- WebSocket support for real-time log streaming and statistics
- SQLAlchemy models for bots, logs, and users
- JWT-based authentication system
- Process management with subprocess and psutil
- Auto-restart functionality with configurable backoff
- System and bot resource monitoring (CPU, RAM, network)
- Comprehensive error handling and logging
Frontend (Next.js 14 + TypeScript):
- Modern React application with App Router
- shadcn/ui components with Tailwind CSS
- TanStack Query for data fetching and caching
- Real-time WebSocket integration
- Responsive design for mobile, tablet, and desktop
- Beautiful dark theme with glassmorphism effects
- Bot cards with status badges and controls
- System statistics dashboard
Example Bots:
- Telegram userbot using Telethon
- Telegram bot using python-telegram-bot
- Discord bot using discord.py
- Full command examples and error handling
Infrastructure:
- Docker and Docker Compose configurations
- Multi-stage builds for optimal image sizes
- Nginx reverse proxy with WebSocket support
- Production and development compose files
- Rate limiting and security headers
Documentation:
- Comprehensive README with setup instructions
- API documentation examples
- Configuration guides
- Troubleshooting section
- Makefile for common commands
Features:
- Start/stop/restart bots with one click
- Real-time log streaming via WebSocket
- Live system and bot statistics
- Auto-restart on crashes
- Bot configuration management
- Process monitoring and resource tracking
- Search and filter bots
- Responsive UI with loading states
- Toast notifications for all actions
Security:
- JWT token-based authentication
- Password hashing with bcrypt
- CORS configuration
- Environment variable management
- Input validation and sanitization
- Rate limiting in nginx
- Security headers configured