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
46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"name": "bot-dashboard-frontend",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "next lint",
|
|
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,md}\""
|
|
},
|
|
"dependencies": {
|
|
"next": "14.2.3",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"@tanstack/react-query": "^5.32.0",
|
|
"axios": "^1.6.8",
|
|
"clsx": "^2.1.1",
|
|
"tailwind-merge": "^2.3.0",
|
|
"lucide-react": "^0.379.0",
|
|
"recharts": "^2.12.6",
|
|
"sonner": "^1.4.41",
|
|
"class-variance-authority": "^0.7.0",
|
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
"@radix-ui/react-label": "^2.0.2",
|
|
"@radix-ui/react-select": "^2.0.0",
|
|
"@radix-ui/react-slot": "^1.0.2",
|
|
"@radix-ui/react-switch": "^1.0.3",
|
|
"@radix-ui/react-tabs": "^1.0.4",
|
|
"date-fns": "^3.6.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20",
|
|
"@types/react": "^18",
|
|
"@types/react-dom": "^18",
|
|
"typescript": "^5",
|
|
"tailwindcss": "^3.4.1",
|
|
"postcss": "^8",
|
|
"autoprefixer": "^10.4.19",
|
|
"eslint": "^8",
|
|
"eslint-config-next": "14.2.3",
|
|
"prettier": "^3.2.5"
|
|
}
|
|
}
|