Ready to deploy? This React 19.1 dashboard with mockup data can be hosted on any web server!
Key highlights:
- ✅ Modern Stack: React 19.1 + Vite + PHP 8.0+
- ✅ Zero vulnerabilities: All security issues fixed
- ✅ Mockup data included: Works without FiveM server
- ✅ Production optimized: 220KB bundle, code-split, cached
- ✅ Mobile responsive: Works on all devices
Time to deploy: ~15 minutes (including database setup)
- Node.js (for building locally)
- PHP 8.0+ on your hosting
- Database: MySQL 8.0+ OR PostgreSQL 12+ (your choice!)
# Install dependencies (if not already done)
npm install
# Build for production
npm run buildThis creates a dist/ folder with optimized production files.
-
Create MySQL database on your Hetzner hosting panel
-
Update database credentials in
api/config/database.production.php:// Choose MySQL define('DB_TYPE', 'mysql'); define('DB_NAME', 'your_actual_database_name'); define('DB_USER', 'your_database_username'); define('DB_PASS', 'your_database_password'); define('DB_HOST', 'localhost'); // or your DB host define('DB_PORT', 3306); // FiveM database (can be same for mockup data) define('FIVEM_DB_TYPE', 'mysql'); define('FIVEM_DB_NAME', 'your_actual_database_name'); define('FIVEM_DB_USER', 'your_database_username'); define('FIVEM_DB_PASS', 'your_database_password');
-
Import the MySQL schema:
- Upload
sql/fivem_dashboard_mysql.sqlto your hosting - Import via phpMyAdmin or command line:
mysql -u username -p database_name < fivem_dashboard_mysql.sql
- Upload
-
Create PostgreSQL database (if your hosting supports it)
-
Update database credentials in
api/config/database.production.php:// Choose PostgreSQL define('DB_TYPE', 'postgresql'); define('DB_NAME', 'your_actual_database_name'); define('DB_USER', 'your_database_username'); define('DB_PASS', 'your_database_password'); define('DB_HOST', 'localhost'); // or your DB host define('DB_PORT', 5432); // FiveM database (can be same for mockup data) define('FIVEM_DB_TYPE', 'postgresql'); define('FIVEM_DB_NAME', 'your_actual_database_name'); define('FIVEM_DB_USER', 'your_database_username'); define('FIVEM_DB_PASS', 'your_database_password');
-
Import the PostgreSQL schema:
- Upload
sql/fivem_dashboard_postgresql.sqlto your hosting - Import via command line:
psql -U username -d database_name -f fivem_dashboard_postgresql.sql
- Upload
💡 Recommendation: Most shared hosting (like Hetzner webspace) supports MySQL by default. Use PostgreSQL only if you have VPS/dedicated hosting or specific PostgreSQL support.
Upload these files/folders to your subdomain folder (5md.p42.studio):
📁 5md.p42.studio/
├── 📁 dist/ # Built React app (all contents)
│ ├── index.html
│ ├── assets/
│ └── ...
├── 📁 api/ # PHP backend
│ ├── config/database.production.php (rename to database.php)
│ ├── cors_helper.php
│ ├── auth/
│ ├── fivem/
│ └── ...
├── 📁 img/ # Images
├── 📁 sql/ # Database files
├── .htaccess # From .htaccess.production
└── manifest.json
-
Copy production config:
# On your server cp api/config/database.production.php api/config/database.php -
Copy production .htaccess:
cp .htaccess.production .htaccess
- Visit
https://5md.p42.studio - Try logging in with:
admin/password - Test API endpoints work correctly
- Change default admin password immediately
- Update database credentials with strong passwords
- Remove/secure any development files
- Test all functionality with mockup data
5md.p42.studio/
├── index.html # React app entry point
├── assets/ # CSS, JS, images
├── api/ # PHP backend
├── img/ # Static images
├── .htaccess # Server configuration
└── manifest.json # PWA manifest
Our dashboard supports both database systems with full feature parity:
| Feature | MySQL 8.0+ | PostgreSQL 12+ | Notes |
|---|---|---|---|
| Hosting Support | ✅ Universal | MySQL more common on shared hosting | |
| UUIDs | ✅ Native UUID() | ✅ Native uuid_generate_v4() | Both support modern UUID primary keys |
| JSON Support | ✅ JSON data type | ✅ JSONB with GIN indexes | PostgreSQL slightly faster for JSON queries |
| Constraints | ✅ CHECK constraints | ✅ Advanced CHECK constraints | PostgreSQL has more validation options |
| Performance | ✅ Excellent | ✅ Excellent | Both optimized for dashboard workloads |
| Mockup Data | ✅ Included | ✅ Included | Same demo data for both systems |
💡 Quick Decision Guide:
- Choose MySQL if: Shared hosting, most common, easier setup
- Choose PostgreSQL if: VPS/dedicated server, advanced features needed
The application includes built-in mockup data for:
- ✅ Users and player management
- ✅ Vehicle management
- ✅ Chat system
- ✅ Todo tasks
- ✅ Server status
- ✅ Hall of Fame
Perfect for demonstrations without needing a real FiveM server!
- ✅ React 19.1 - Latest React with best performance
- ✅ Vite Build - Optimized, fast loading
- ✅ Code Splitting - Lazy loading for better performance
- ✅ Compression - Gzip enabled via .htaccess
- ✅ Caching - Browser caching for static assets
- ✅ Security Headers - XSS protection, clickjacking prevention
- ✅ SEO Ready - Proper meta tags and structure
- "Connection refused": Check if MySQL is running and credentials are correct
- "Access denied": Verify username/password and database permissions
- "Database not found": Ensure database name matches exactly
- "JSON functions missing": Upgrade to MySQL 8.0+ (required for modern features)
- "UUID extension missing": Run
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - "Permission denied": Check user privileges with
\ducommand - "Connection limit reached": Increase
max_connectionsin postgresql.conf - "Database not found": Verify database exists and user has access
- Check browser console for JavaScript errors
- Verify database connection in
api/config/database.php - Ensure PHP 8.0+ is enabled on your hosting
- Check .htaccess is properly uploaded and mod_rewrite is enabled
- Test API endpoints by visiting
https://5md.p42.studio/api/auth/check_session.php
- Ensure all
dist/contents are in the root directory - Verify
api/folder maintains its structure - Check file permissions (usually 644 for files, 755 for directories)