A comprehensive web-based hosting management platform for Discord bots with both frontend and backend functionality.
- Discord OAuth Authentication - Secure login with Discord
- Dashboard - Overview of hosting status and statistics
- File Manager - Upload, download, and manage bot files
- Console - Real-time logs and bot output
- Bot Controls - Start, stop, and restart your bot
- Settings - Configure bot environment and settings
- Referral System - Earn credits by referring users
- Storage Management - Track and manage file storage
- User Management - View and manage all users
- Server Management - Control all hosting servers
- Permissions - Fine-grained access control
- Webhooks - Discord webhook notifications
- Announcements - System-wide announcements
- Referral Management - Manage withdrawal requests
- Analytics - Platform statistics and metrics
- VPN/Proxy Detection - Prevent abuse
- Account Suspension - Temporary account restrictions
- IP Banning - Block malicious IPs
- Admin Connect Mode - Secure admin access to user accounts
- Session Management - Secure cookie-based sessions
- Node.js (v14.0.0 or higher)
- npm or yarn package manager
- Modern web browser
-
Clone the repository
git clone <repository-url> cd host
-
Install dependencies
npm install
-
Start the server
npm start
For development with auto-reload:
npm run dev
-
Access the application Open your browser and navigate to:
http://localhost:3000
host/
โโโ index.html # Main HTML file with SPA structure
โโโ styles.css # Comprehensive CSS styling
โโโ script.js # Frontend JavaScript functionality
โโโ server.js # Backend Express server
โโโ package.json # Node.js dependencies
โโโ README.md # This file
Edit server.js to configure:
- Port number (default: 3000)
- CORS settings
- API endpoints
- Mock data storage
Edit script.js to configure:
- API endpoint URL
- Feature flags
- UI settings
The application uses CSS custom properties (variables) for easy theming. Edit styles.css:
:root {
--bg-primary: #0f0f1e;
--bg-secondary: #1a1a2e;
--accent-primary: #5865F2;
/* ... more variables */
}Toggle features in script.js by modifying function calls and routes.
GET /api/auth/discord/login- Initiate Discord OAuthGET /api/auth/session- Get current sessionPOST /api/auth/logout- Logout userGET /api/auth/check-suspension- Check account status
POST /api/bot/start- Start botPOST /api/bot/stop- Stop botPOST /api/bot/restart- Restart botGET /api/bot/status- Get bot statusGET /api/bot/logs- Get bot logs
GET /api/files- List filesPOST /api/files/upload- Upload fileDELETE /api/files/:path- Delete file
GET /api/admin/users- List all usersGET /api/admin/announcements- Get announcementsPOST /api/admin/announcements- Create announcementGET /api/admin/server-management/servers- List servers
GET /api/referrals/stats- Get referral statisticsGET /api/referrals/admin/withdrawals- Get withdrawal requests
This is a demo/starter implementation. For production use:
-
Implement Real Authentication
- Configure Discord OAuth with real credentials
- Use secure session management (e.g., Redis)
- Implement CSRF protection
-
Use a Real Database
- Replace in-memory storage with PostgreSQL/MongoDB
- Implement proper data validation
- Use ORM/ODM for database operations
-
Add Security Middleware
- Rate limiting
- Input validation and sanitization
- Helmet.js for security headers
- HTTPS enforcement
-
Environment Variables
- Store sensitive data in
.envfile - Never commit secrets to version control
- Store sensitive data in
-
Error Handling
- Implement proper error logging
- Use error monitoring services
- Handle edge cases
Currently, the application serves mock data. To test:
- Start the server:
npm start - Open browser to
http://localhost:3000 - You'll see the login page
- Click "Sign in with Discord" (will show mock response)
- Explore the UI and features
- Implement real Discord OAuth
- Add database integration
- Implement file upload/download
- Add WebSocket for real-time logs
- Implement actual bot hosting functionality
- Add payment integration
- Mobile responsive improvements
- Dark/light theme toggle
- Multi-language support
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Discord: https://discord.gg/Mqzh86Jyts
- Issues: Create an issue on GitHub
- Font Awesome for icons
- Google Fonts for Inter font family
- Discord for OAuth integration inspiration
Note: This is a starter template. Implement proper security, database, and authentication before deploying to production.