Sistem manajemen Network Operation Center (NOC) untuk ISP (Internet Service Provider) dengan fitur monitoring jaringan, manajemen pelanggan, billing otomatis, dan alert system.
- JWT-based authentication
- Role-based access control (Admin, Staff, Customer)
- Secure password hashing dengan bcrypt
- CRUD pelanggan lengkap
- Informasi kontak dan alamat
- Status pelanggan (active, suspended, inactive)
- Auto-generate Customer ID
- Monitor device secara real-time (router, switch, access point)
- Ping monitoring otomatis
- Network logs history
- Device status tracking (online/offline)
- Support SNMP (v1, v2c, v3)
- Paket internet customizable
- Bandwidth management
- Subscription lifecycle (active, expired, suspended)
- Auto-renewal options
- Expiring subscription alerts
- Invoice generation otomatis
- Multiple payment methods (cash, transfer, e-wallet, credit card)
- Payment status tracking (pending, paid, overdue)
- Payment statistics & reports
- Monthly revenue reports
- Real-time alerts untuk network issues
- Multiple severity levels (critical, high, medium, low)
- Alert acknowledgment & resolution workflow
- Alert statistics
- Custom alert types
- Real-time bandwidth usage tracking
- Customer bandwidth summary
- Top bandwidth consumers
- Historical usage data
- Automated device monitoring (ping checks)
- Automatic overdue payment detection
- Subscription expiration automation
- Alert generation untuk critical events
- Billing reminders (7 days before due date)
Backend:
- Node.js v20+ - Runtime environment
- Express.js v4.18 - Web framework
- Sequelize v6.35 - ORM (Object-Relational Mapping)
- MariaDB v10.11 - Primary database
- Redis v7 - Caching layer
- JWT - Authentication tokens
- bcrypt - Password hashing
- node-cron - Task scheduling
- ping - Network monitoring
Infrastructure:
- Docker & Docker Compose - Containerization
- phpMyAdmin - Database management UI
nocman/
βββ backend/
β βββ src/
β β βββ config/ # Database & Redis configuration
β β βββ controllers/ # Request handlers (8 controllers)
β β βββ middleware/ # Auth & validation middleware
β β βββ models/ # Sequelize models (8 models)
β β βββ routes/ # API routes
β β βββ services/ # Business logic (monitoring, billing)
β β βββ index.js # Server entry point
β βββ scripts/
β β βββ seedAdmin.js # Create admin user
β β βββ seedData.js # Generate sample data
β β βββ syncDatabase.js # Database synchronization
β βββ test-api.sh # Basic API tests
β βββ test-integration.sh # Integration tests
β βββ package.json
β βββ .env.example
βββ docker/
β βββ docker-compose.yml # Docker services configuration
β βββ .env.example
βββ DEPLOYMENT.md # Deployment guide
βββ README.md
- Node.js v18.0.0 atau lebih tinggi
- Docker & Docker Compose
- Git
- Clone repository
git clone https://github.com/your-username/nocman.git
cd nocman- Setup Docker services
cd docker
cp .env.example .env
# Edit .env dan sesuaikan password
docker-compose up -d- Setup Backend
cd ../backend
cp .env.example .env
# Edit .env dan sesuaikan dengan konfigurasi Docker
npm install- Database Setup
# Sync database tables
npm run db:sync
# Create admin user
npm run seed:admin- Start Server
# Development mode
npm run dev
# Production mode
npm start- Verify Installation
# Run integration tests
chmod +x test-integration.sh
./test-integration.shServer akan berjalan di: http://localhost:5000
Username: admin
Password: admin123
Untuk development/testing, generate sample data:
npm run seed:dataIni akan membuat:
- π₯ 10 Customers (ISP clients)
- π₯οΈ 26+ Devices (routers, switches, access points)
- π¦ 10 Subscriptions (berbagai paket internet)
- π° 17+ Payments (dengan berbagai status)
- π¨ 15+ Alerts
- π 200+ Network logs
- π 56+ Bandwidth usage records
POST /api/auth/register # Register user baru
POST /api/auth/login # Login & get JWT token
GET /api/auth/me # Get current user profile
GET /api/customers # Get all customers
GET /api/customers/:id # Get single customer
POST /api/customers # Create customer
PUT /api/customers/:id # Update customer
DELETE /api/customers/:id # Delete customer
GET /api/devices # Get all devices
GET /api/devices/:id # Get single device
POST /api/devices # Add device
PUT /api/devices/:id # Update device
DELETE /api/devices/:id # Delete device
GET /api/devices/stats # Device statistics
GET /api/devices/:id/logs # Device network logs
GET /api/subscriptions # Get all subscriptions
GET /api/subscriptions/:id # Get single subscription
POST /api/subscriptions # Create subscription
PUT /api/subscriptions/:id # Update subscription
DELETE /api/subscriptions/:id # Delete subscription
GET /api/subscriptions/expiring # Get expiring subscriptions
GET /api/payments # Get all payments
GET /api/payments/:id # Get single payment
POST /api/payments # Create payment
PUT /api/payments/:id # Update payment
PUT /api/payments/:id/process # Process payment
DELETE /api/payments/:id # Delete payment
GET /api/payments/stats # Payment statistics
GET /api/payments/revenue/monthly # Monthly revenue report
GET /api/alerts # Get all alerts
GET /api/alerts/:id # Get single alert
POST /api/alerts # Create alert
PUT /api/alerts/:id/acknowledge # Acknowledge alert
PUT /api/alerts/:id/resolve # Resolve alert
PUT /api/alerts/:id/dismiss # Dismiss alert
DELETE /api/alerts/:id # Delete alert
GET /api/alerts/stats # Alert statistics
GET /api/bandwidth # Get bandwidth usage
GET /api/bandwidth/:id # Get single record
POST /api/bandwidth # Create record
GET /api/bandwidth/customer/:id/summary # Customer bandwidth summary
GET /api/bandwidth/top # Top bandwidth consumers
Backend (backend/.env):
NODE_ENV=production
PORT=5000
DB_HOST=localhost
DB_PORT=3307
DB_NAME=nocman_db
DB_USER=nocman_user
DB_PASSWORD=your_secure_password
REDIS_HOST=localhost
REDIS_PORT=6379
JWT_SECRET=your_32_char_secret_key
JWT_EXPIRE=7dDocker (docker/.env):
MYSQL_ROOT_PASSWORD=secure_root_password
MYSQL_DATABASE=nocman_db
MYSQL_USER=nocman_user
MYSQL_PASSWORD=your_secure_password
REDIS_PASSWORD=secure_redis_passwordAkses Docker Services:
- MariaDB:
localhost:3307 - Redis:
localhost:6379 - phpMyAdmin: http://localhost:8081
- Server:
nocman_mariadb - Username:
nocman_user - Password: sesuai
docker/.env
- Server:
Docker Commands:
# Start services
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs -f
# Restart service
docker-compose restart mariadb
# Remove all data (WARNING: deletes all data!)
docker-compose down -v# Basic API test
./test-api.sh
# Integration test
./test-integration.sh
# Manual testing dengan curl
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin123"}'-
Device Monitoring
- Automatic ping checks setiap 60 detik
- Generate alerts untuk device offline
- Network log history
-
Billing Automation
- Overdue payment check: Daily at 9 AM
- Upcoming payment reminder: Daily at 8 AM
- Expiring subscription check: Daily at 7 AM
- Auto-expire subscriptions: Daily at midnight
# Server logs
npm run dev # dengan nodemon (auto-reload)
# Docker logs
docker-compose logs -f mariadb
docker-compose logs -f redisLihat DEPLOYMENT.md untuk panduan deployment lengkap ke:
- VPS (Ubuntu/Debian)
- Cloud platforms (AWS, DigitalOcean, etc)
- Production best practices
Quick Production Setup:
# Set NODE_ENV
export NODE_ENV=production
# Install dependencies (production only)
npm ci --production
# Start with PM2
npm install -g pm2
pm2 start src/index.js --name nocman-api
pm2 startup
pm2 save- β JWT token-based authentication
- β Password hashing dengan bcrypt
- β Environment variables untuk sensitive data
- β CORS configuration
- β SQL injection prevention (Sequelize ORM)
- β Input validation
β οΈ Change default passwords setelah instalasiβ οΈ Use HTTPS di productionβ οΈ Implement rate limiting (optional)β οΈ Regular security updates
Contributions welcome! Silakan:
- Fork repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add some AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Initial work - Development & Migration to MariaDB
- Express.js community
- Sequelize ORM documentation
- Docker community
- All open-source contributors
Jika mengalami masalah:
- Check Issues
- Create new issue dengan detail error
- Sertakan:
- Node.js version
- OS information
- Error logs
- Steps to reproduce
- Frontend dashboard (React/Next.js)
- Real-time monitoring dengan WebSocket
- Email notification integration
- SMS notification (Twilio/Nexmo)
- WhatsApp integration
- PDF invoice generation
- Multi-tenant support
- Grafana/Prometheus integration
- Mobile app (React Native)
- Advanced SNMP monitoring
- Network topology visualization
- Automated backup system
Made with β€οΈ for ISP Network Operations