Skip to content

A sleek, modern dashboard for Laragon that enhances your local development environment. With support for multiple languages, real-time server vitals monitoring, and easy navigation, this dashboard is designed to boost your productivity

Notifications You must be signed in to change notification settings

LebToki/Laragon-Dashboard

Repository files navigation

πŸš€ Laragon Dashboard

A modern, feature-rich dashboard for Laragon development environment with advanced email management, server monitoring, and security features.

Version PHP Bootstrap License

✨ Features

🎨 Modern Email Client

  • Bootstrap 5 Interface - Professional, responsive design
  • Interactive Statistics - Real-time email metrics and analytics
  • Advanced Search - Filter emails by sender, subject, or content
  • Email Cards - Beautiful hover effects and smooth animations
  • Modal Viewer - Enhanced email reading experience
  • Bulk Operations - Mass email management capabilities
  • Keyboard Shortcuts - Improved accessibility and productivity

πŸ“Š Server Monitoring

  • Real-time Vitals - CPU, memory, and disk usage monitoring
  • Visual Charts - Interactive charts using Chart.js
  • Windows Compatible - Optimized for Windows/Laragon environment
  • PHP Memory Tracking - Monitor PHP memory usage and limits
  • Multi-drive Support - Track disk usage across all drives

πŸ”’ Security Features

  • CSRF Protection - Secure token-based protection
  • Security Headers - Comprehensive HTTP security headers
  • Rate Limiting - Prevent abuse and brute force attacks
  • Input Sanitization - XSS and injection protection
  • Secure Sessions - HTTPOnly and secure cookie settings
  • Content Security Policy - Advanced CSP implementation

⚑ Performance & Monitoring

  • Caching System - File-based caching with TTL support
  • Performance Monitoring - Execution time and memory tracking
  • Comprehensive Logging - Multi-level logging system
  • Error Handling - Graceful error management
  • Database Integration - PDO-based database helpers

🌍 Multi-language Support

  • English, German, Spanish, French, Indonesian, Portuguese, Tagalog
  • Easy language switching
  • Consistent translation system

πŸ› οΈ Installation

Prerequisites

  • Laragon development environment
  • PHP 7.4+ with required extensions:
    • json
    • mbstring
    • openssl
    • pdo_mysql
  • MySQL/MariaDB server
  • Web server (Apache/Nginx)

Quick Setup

  1. Clone or Download

    git clone https://github.com/your-repo/laragon-dashboard.git
    # or download and extract to your Laragon www directory
  2. Configure Environment

    # Copy and modify configuration
    cp config.php config.local.php
    # Edit config.local.php with your settings
  3. Set Permissions

    # Create required directories
    mkdir -p logs cache
    chmod 755 logs cache
  4. Access Dashboard

    http://localhost/Laragon-Dashboard/
    

Configuration

Edit config.php to customize your setup:

// Database Configuration
define('MYSQL_HOST', 'localhost');
define('MYSQL_USER', 'root');
define('MYSQL_PASSWORD', '');

// Application Settings
define('APP_NAME', 'Laragon Dashboard');
define('APP_VERSION', '2.5.0');
define('APP_DEBUG', false);

// Security Settings
define('SESSION_TIMEOUT', 3600);
define('MAX_LOGIN_ATTEMPTS', 5);

// Email Configuration
define('SENDMAIL_OUTPUT_DIR', 'C:/laragon/bin/sendmail/output/');
define('DOMAIN_SUFFIX', '.local');

πŸ“ Project Structure

Laragon-Dashboard/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ languages/          # Translation files
β”‚   β”œβ”€β”€ inbox/             # Email client interface
β”‚   β”œβ”€β”€ favicon/           # Favicon files
β”‚   └── style.css          # Main stylesheet
β”œβ”€β”€ includes/              # Helper classes
β”‚   β”œβ”€β”€ logger.php         # Logging system
β”‚   β”œβ”€β”€ security.php       # Security helpers
β”‚   β”œβ”€β”€ database.php       # Database utilities
β”‚   └── cache.php          # Caching system
β”œβ”€β”€ logs/                  # Application logs
β”œβ”€β”€ cache/                 # Cache files
β”œβ”€β”€ config.php             # Main configuration
β”œβ”€β”€ index.php              # Main dashboard
β”œβ”€β”€ server_vitals.php      # Server monitoring API
β”œβ”€β”€ project_search.php     # Project search API
β”œβ”€β”€ CHANGELOG.md           # Version history
β”œβ”€β”€ .gitignore             # Git ignore rules
└── README.md              # This file

🎯 Usage

Dashboard Overview

The main dashboard provides:

  • Server Information - PHP version, MySQL status, web server details
  • Project Management - List and manage your development projects
  • Framework Detection - Automatic detection of WordPress, Laravel, Drupal, etc.
  • Quick Access - Direct links to project admin panels

Email Management

Access the email client via the "Mailbox" tab:

  • View Statistics - Total emails, daily/weekly counts, unique senders
  • Search & Filter - Find emails quickly with advanced search
  • Read Emails - Click any email to view full content
  • Manage Emails - Delete individual or bulk emails
  • Export Options - Download email data

Server Monitoring

Monitor your server via the "Server Vitals" tab:

  • Real-time Charts - Visual representation of system metrics
  • Memory Usage - Track PHP and system memory consumption
  • Disk Space - Monitor disk usage across all drives
  • Performance Metrics - Page load times and execution statistics

πŸ”§ API Endpoints

Server Vitals API

GET /server_vitals.php

Returns JSON with server statistics:

{
  "uptime": "2 days, 5 hours, 30 minutes",
  "memoryUsage": "45.2%",
  "diskUsage": [...],
  "phpMemory": {
    "current": 2097152,
    "peak": 4194304,
    "limit": "512M"
  }
}

Project Search API

GET /project_search.php?q=search_term

Returns filtered project list based on search query.

πŸ›‘οΈ Security

Security Features

  • CSRF Protection - All forms protected with CSRF tokens
  • XSS Prevention - All user inputs sanitized
  • SQL Injection Protection - Prepared statements used throughout
  • Rate Limiting - Prevents brute force attacks
  • Secure Headers - Comprehensive HTTP security headers
  • File Upload Security - Restricted file types and sizes

Security Headers

  • X-Frame-Options: DENY
  • X-Content-Type-Options: nosniff
  • X-XSS-Protection: 1; mode=block
  • Strict-Transport-Security (HTTPS only)
  • Content-Security-Policy
  • Referrer-Policy: strict-origin-when-cross-origin

🎨 Customization

Themes

The dashboard uses Bootstrap 5 with custom CSS. Key customization points:

/* Main color scheme */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
}

Language Files

Add new languages by creating JSON files in assets/languages/:

{
  "title": "Welcome to the Laragon Dashboard",
  "header": "My Development Server",
  "servers_tab": "Servers",
  "inbox_tab": "Mailbox",
  "vitals_tab": "Server's Vitals"
}

πŸ› Troubleshooting

Common Issues

Email not loading:

  • Check SENDMAIL_OUTPUT_DIR path in config.php
  • Ensure directory exists and is readable
  • Verify Laragon sendmail configuration

Server vitals not working:

  • Ensure PHP has necessary permissions
  • Check if required PHP extensions are loaded
  • Verify disk paths are accessible

Database connection issues:

  • Verify MySQL credentials in config.php
  • Ensure MySQL service is running
  • Check firewall settings

Performance issues:

  • Enable caching in config.php
  • Check log files for errors
  • Monitor memory usage

Debug Mode

Enable debug mode in config.php:

define('APP_DEBUG', true);

This will show:

  • Detailed error messages
  • Performance metrics
  • Debug information in footer

πŸ“ˆ Performance

Optimization Features

  • File-based Caching - Reduces database queries
  • Lazy Loading - Loads content as needed
  • Minified Assets - Optimized CSS and JavaScript
  • Compressed Responses - Reduced bandwidth usage
  • Database Connection Pooling - Efficient database usage

Monitoring

  • Execution Time Tracking - Monitor page load times
  • Memory Usage Monitoring - Track memory consumption
  • Cache Statistics - Monitor cache hit rates
  • Error Logging - Track and analyze errors

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Code Standards

  • Follow PSR-12 coding standards
  • Add comprehensive comments
  • Include error handling
  • Test on multiple PHP versions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Laragon Team - For the excellent development environment
  • Bootstrap Team - For the amazing CSS framework
  • Chart.js Team - For the beautiful charting library
  • Contributors - All the amazing people who contributed to this project

πŸ“ž Support

  • Documentation - Check this README and inline comments
  • Issues - Report bugs via GitHub Issues
  • Discussions - Join our GitHub Discussions
  • Email - Contact the maintainer

οΏ½οΏ½ Changelog

See CHANGELOG.md for detailed version history.


Made with ❀️ for the Laragon community

About

A sleek, modern dashboard for Laragon that enhances your local development environment. With support for multiple languages, real-time server vitals monitoring, and easy navigation, this dashboard is designed to boost your productivity

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •