📶 A fast, automated Hotspot Billing system powered by M-Pesa STK Push for instant, secure user access. Built with Node.js, MySQL, Next.js, and React, it delivers smooth payments, smart access control, and optional MikroTik-RB750UPr2 integration. ⚡🔐
# Hotspot Management System
A comprehensive WiFi billing system with M-Pesa integration, loan management, and MikroTik hotspot control.
## Screenshots
*Dashboard view showing user connections and payments.*
*Billing interface with M-Pesa integration and loan options.*
*Admin dashboard.*
*Admin panel overview.*
## Features
- 🔐 **Secure Authentication** - JWT-based user authentication
- 💳 **M-Pesa Integration** - Mobile money payments for WiFi access
- 💰 **Loan System** - Credit-based WiFi access for users
- 🌐 **MikroTik Integration** - Automated hotspot user management
- 📊 **Admin Dashboard** - Real-time monitoring and management
- 📱 **Responsive UI** - Modern React/Next.js frontend
- 🔄 **Real-time Updates** - WebSocket notifications
## Quick Deploy to Render
### 🚀 One-Click Deploy
1. **Fork this repository** to your GitHub account
2. **Connect to Render:**
- Go to Render Dashboard
- Click "New" → "Blueprint"
- Connect your GitHub repository
- Render will automatically detect `render.yaml`
3. **Configure Environment Secrets:**
In your Render dashboard, go to your service settings and add these environment variables:
| Variable | Description | Example |
|----------|-------------|---------|
| `JWT_SECRET` | Secure random string for JWT | `your-secure-random-jwt-secret` |
| `ADMIN_USERNAME` | Admin login username | `admin` |
| `ADMIN_PASSWORD` | Admin login password | `secure_password_123` |
| `ADMIN_EMAIL` | Admin email | `admin@yourdomain.com` |
| `MPESA_CONSUMER_KEY` | M-Pesa API key | From Safaricom Portal |
| `MPESA_CONSUMER_SECRET` | M-Pesa API secret | From Safaricom Portal |
| `MPESA_SHORTCODE` | Your M-Pesa shortcode | `123456` |
| `MPESA_PASSKEY` | M-Pesa passkey | From Safaricom Portal |
| `MIKROTIK_HOST` | MikroTik router IP | `192.168.88.1` |
| `MIKROTIK_USER` | MikroTik username | `admin` |
| `MIKROTIK_PASSWORD` | MikroTik password | `your_password` |
4. **Deploy:**
- Render will automatically create PostgreSQL database
- Deploy the web …