Skip to content

virtexvirtuoso/sentinel-dvpn-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Sentinel dVPN Node Dashboard

A comprehensive, production-ready dashboard for monitoring and managing Sentinel dVPN nodes with advanced analytics, real-time monitoring, and Telegram bot integration.

Sentinel Dashboard Python Flask License

🌟 Features

Core Dashboard

  • 🎨 Modern Glassmorphism UI - Beautiful dark theme with glass effects
  • πŸ“Š Real-time Monitoring - Live system metrics and node status
  • πŸ’° Earnings Tracking - Wallet balance with USD conversion via CoinGecko
  • πŸ“ˆ Performance Metrics - CPU, memory, disk, and network monitoring
  • 🌐 Blockchain Integration - Direct connection to Sentinel network
  • πŸ“± Mobile Responsive - Works perfectly on all devices
  • πŸ” JWT Authentication - Secure access control

Telegram Bot Integration

  • πŸ€– Remote Control - Manage your node from anywhere
  • πŸ“Š Instant Stats - Get node status with a command
  • 🚨 Smart Alerts - Automatic notifications for important events
  • πŸ“ˆ Performance Monitoring - Regular health checks
  • πŸ’° Earnings Reports - Daily/monthly estimates
  • πŸš€ Speed Testing - Built-in internet speed tests

Advanced Features

  • ⚑ Auto-start on Boot - Systemd service integration
  • πŸ”„ Health Check System - 24-hour monitoring cycle
  • πŸ“Š Session Tracking - Active connection monitoring
  • 🌍 Multi-RPC Fallback - Reliable blockchain connectivity
  • πŸ“ˆ Historical Data - Track performance over time
  • πŸ› οΈ API Endpoints - Full REST API for integration

πŸ“‹ Prerequisites

  • Raspberry Pi 4 (or compatible Linux system)
  • Python 3.9+
  • Sentinel dVPN Node running in Docker
  • Telegram Bot Token (optional, for bot features)
  • 1GB+ RAM recommended

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/fil0s/sentinel-p2p-dashboard.git
cd sentinel-p2p-dashboard

2. Install Dependencies

# Install Python dependencies
pip3 install -r config/requirements-prod.txt

# For Raspberry Pi users
pip3 install --break-system-packages -r config/requirements-prod.txt

3. Configure Environment

# Copy example configuration
cp config/.env.example config/.env

# Edit with your settings
nano config/.env

Required settings:

NODE_ADDRESS=sentnode1...  # Your node address
WALLET_ADDRESS=sent1...     # Your wallet address
TELEGRAM_BOT_TOKEN=...      # From @BotFather
ADMIN_CHAT_IDS=...         # Your Telegram user ID

4. Run the Dashboard

# Development mode
python3 src/app/app.py

# Production mode with Gunicorn
gunicorn --config config/gunicorn.conf.py src.app.app:app

Access the dashboard at: http://localhost:8080

πŸ“± Telegram Bot Setup

Create a Bot

  1. Message @BotFather on Telegram
  2. Send /newbot and follow instructions
  3. Copy the bot token to .env file

Get Your Chat ID

python3 scripts/utils/get_chat_id.py

Start the Bot

# Run optimized bot with monitoring
python3 src/bot/telegram_bot_optimized.py

Bot Commands

  • /start - Main menu
  • /status - Node status
  • /earnings - Earnings report
  • /health - Health check
  • /speedtest - Internet speed test
  • /metrics - System metrics

πŸ”§ Installation as Service

Dashboard Service

# Install service
sudo cp deployment/systemd/sentinel-dashboard.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable sentinel-dashboard
sudo systemctl start sentinel-dashboard

Telegram Bot Service

# Install bot service
sudo cp deployment/systemd/sentinel-telegram-bot.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable sentinel-telegram-bot
sudo systemctl start sentinel-telegram-bot

πŸ“Š API Documentation

Authentication

POST /api/auth/login
Content-Type: application/json

{
  "username": "admin",
  "password": "your_password"
}

Public Endpoints (No Auth Required)

  • GET /api/health - Health check
  • GET /api/bot/status - Node status
  • GET /api/bot/wallet - Wallet balance
  • GET /api/bot/earnings - Earnings estimates

Protected Endpoints (JWT Required)

  • GET /api/node/info - Detailed node information
  • GET /api/sessions - Active sessions
  • POST /api/speedtest - Run speed test
  • GET /api/system/metrics - System metrics

🐳 Docker Deployment

Build and Run

# Build image
docker build -f deployment/docker/Dockerfile.prod -t sentinel-dashboard .

# Run container
docker run -d \
  --name sentinel-dashboard \
  -p 8080:8080 \
  -v $(pwd)/config:/app/config \
  -v $(pwd)/data:/app/data \
  sentinel-dashboard

Docker Compose

docker-compose -f config/docker-compose.prod.yml up -d

🌐 Nginx Reverse Proxy

server {
    listen 80;
    server_name your-domain.com;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

πŸ“ Project Structure

sentinel-p2p-dashboard/
β”œβ”€β”€ src/                    # Source code
β”‚   β”œβ”€β”€ app/               # Flask application
β”‚   β”‚   └── app.py        # Main application
β”‚   β”œβ”€β”€ api/               # API modules
β”‚   β”‚   β”œβ”€β”€ blockchain_client.py
β”‚   β”‚   └── system_metrics.py
β”‚   β”œβ”€β”€ auth/              # Authentication
β”‚   β”‚   └── auth_middleware.py
β”‚   └── bot/               # Telegram bots
β”‚       β”œβ”€β”€ telegram_bot.py
β”‚       └── telegram_bot_optimized.py
β”œβ”€β”€ frontend/              # Frontend assets
β”‚   β”œβ”€β”€ static/           # CSS, JS, images
β”‚   └── templates/        # HTML templates
β”‚       └── index.html
β”œβ”€β”€ config/                # Configuration
β”‚   β”œβ”€β”€ .env.example      # Environment template
β”‚   β”œβ”€β”€ requirements-prod.txt
β”‚   └── gunicorn.conf.py
β”œβ”€β”€ scripts/               # Utility scripts
β”‚   β”œβ”€β”€ setup/            # Setup scripts
β”‚   └── utils/            # Helper utilities
β”œβ”€β”€ deployment/            # Deployment configs
β”‚   β”œβ”€β”€ docker/           # Docker files
β”‚   β”œβ”€β”€ systemd/          # Service files
β”‚   └── nginx/            # Web server config
β”œβ”€β”€ docs/                  # Documentation
└── tests/                # Test files

βš™οΈ Configuration

Environment Variables

Variable Description Default
NODE_ADDRESS Your Sentinel node address Required
WALLET_ADDRESS Your wallet address Required
SENTINEL_RPC_ENDPOINT RPC endpoint https://sentinel-api.polkachu.com
TELEGRAM_BOT_TOKEN Bot token from BotFather Optional
ADMIN_CHAT_IDS Comma-separated admin IDs Optional
DASHBOARD_SECRET_KEY Flask secret key Auto-generated
JWT_SECRET_KEY JWT signing key Auto-generated
PORT Dashboard port 8080

Network Configuration

For Raspberry Pi with router issues:

# Enable DMZ mode in router for Pi IP
# Or configure port forwarding:
# - Port 8080 for dashboard
# - Port 3845 for Sentinel node

πŸ” Troubleshooting

Dashboard Not Loading

# Check service status
sudo systemctl status sentinel-dashboard

# View logs
sudo journalctl -u sentinel-dashboard -f

# Test API
curl http://localhost:8080/api/health

Telegram Bot Issues

# Check bot service
sudo systemctl status sentinel-telegram-bot

# View bot logs
sudo journalctl -u sentinel-telegram-bot -f

# Test bot manually
python3 src/bot/telegram_bot_optimized.py

Node Connection Issues

# Test node API
curl http://localhost:1177/status

# Check Docker container
docker ps | grep sentinel
docker logs sentinel-p2p-node

πŸ“ˆ Performance Optimization

For Raspberry Pi

  • Use optimized Telegram bot: telegram_bot_optimized.py
  • Enable swap if RAM < 2GB
  • Use ethernet connection for better speeds
  • Configure router DMZ for maximum bandwidth

Cache Settings

  • API responses cached for 5 minutes
  • Wallet balance cached for 10 minutes
  • System metrics refresh every 30 seconds

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

πŸ“ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

🚦 Status

  • βœ… Dashboard: Production Ready
  • βœ… Telegram Bot: Fully Operational
  • βœ… API: Stable
  • βœ… Health Monitoring: Active
  • βœ… Speed Test: Working

Version: 1.0.0
Last Updated: August 2025
Node Address: sentnode1ysdczgrk6lx88krln9ye40hjujseleaarxex5e

About

Complete Sentinel dVPN node setup with enhanced dashboard, monitoring, and external access

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors