docs: rewrite README in English with Linux/Windows setup guides and add auto-install scripts

This commit is contained in:
root
2026-05-25 15:25:46 +02:00
parent 943d5bfc38
commit 4aa574e75e
3 changed files with 1009 additions and 169 deletions
+324 -169
View File
@@ -1,4 +1,4 @@
# AtomCMS Remco Epicnabbo Edition
# AtomCMS Remco Epicnabbo Edition
<div align="center">
<img src="https://i.imgur.com/9ePNdJ4.png" alt="Atom CMS" width="200"/>
@@ -16,43 +16,25 @@
---
## ⚡ Quick Start
```bash
# Interactive mode (asks for confirmation before each step)
php artisan atom:check --fix
# Auto mode (fixes everything automatically without asking)
php artisan atom:check --auto
# Fix gamedata symlinks for optimal client performance
php artisan atom:fix-gamedata-symlinks
```
---
## 🎯 Features
### 📻 Radio Station
## Features
### Radio Station
- DJ applications & rank system
- Live DJ sessions with schedule/rooster
- Live DJ sessions with schedule
- Song requests & voting
- Shoutbox
- Listener points & leaderboard
- Contests & giveaways
- Radio banners & history
### 🛒 Shop
### Shop
- Product catalog with categories
- Virtual currency purchases
- Voucher/promo codes
- PayPal integration
- Order history
### 👥 Community
### Community
- Articles with comments, reactions & tags
- Photo gallery
- Leaderboard
@@ -61,34 +43,29 @@ php artisan atom:fix-gamedata-symlinks
- Rare values tracker
- Badge draw/lottery system
### 🎮 Hotel Client
### Hotel Client
- Nitro (HTML5) client support
- Flash client support
- FindRetros integration
- VPN/proxy checker
### 👤 User System
### User System
- Public profiles with guestbook
- Two-Factor Authentication (2FA)
- Referral system with rewards
- Account & password settings
- Session logs
### 🎫 Help Center
### Help Center
- Support ticket system with replies & status management
- Website rules
- FAQ with categories
### 🎨 Themes
- **Atom** — Default theme
### Themes
- **Atom** — Default light theme
- **Dusk** — Dark theme
### 🔧 Filament Admin Panel
### Filament Admin Panel
- User & ban management
- Radio management (applications, schedules, ranks, shouts, history, banners)
- Shop & order management with charts
@@ -100,8 +77,7 @@ php artisan atom:fix-gamedata-symlinks
- Website navigation & settings
- Camera/photo management
### 🌐 API Endpoints
### API Endpoints
- `GET /api/user/{username}` — Fetch user data
- `GET /api/online-users` — Online users list
- `GET /api/online-count` — Online user count
@@ -114,64 +90,236 @@ php artisan atom:fix-gamedata-symlinks
---
## 🚀 Master Repair Tool
## Requirements
The `atom:check` command performs over **100 deep system checks** and offers to fix them automatically.
### Diagnostic Checks
| Section | What it Checks |
| --------------- | ------------------------------------------------------------ |
| **Environment** | .env, APP_KEY, Debug mode, Composer security |
| **Database** | Tables, columns, migrations, seeders, settings, radio, admin |
| **PHP Stack** | Extensions, PHP.ini, config cache, session |
| **Web Server** | Apache/Nginx/IIS config, SSL |
| **System** | Permissions, firewall ports |
| **Assets** | Frontend, Redis, Cron, Queue, Supervisor, Vite |
| **HTTP Errors** | 400, 401, 403, 404, 419, 429, 500, 502, 503, 504 |
### Auto-Fix Steps
| Step | Action |
| ---- | ----------------------------------- |
| 1 | Environment (.env, APP_KEY) |
| 2 | Clear all caches |
| 3 | Fix permissions |
| 4 | Run migrations |
| 5 | Run seeders |
| 6 | Fix storage (symlink, directories) |
| 6b | Fix Radio tables |
| 7 | Fix Gamedata symlinks |
| 8 | Create admin user |
| 9 | Web server config (.htaccess, etc.) |
| 10 | PHP config & extensions |
| 11 | Build assets (npm) |
| 12 | Fix HTTP errors |
### Platform Support
Auto-detects: **Linux, Windows IIS, XAMPP, WAMP, Apache, Nginx**
| Component | Requirement |
| ------------- | ------------------------------- |
| **PHP** | 8.1 or higher |
| **Database** | MariaDB 10.6+ or MySQL 8.0+ |
| **Web Server**| Apache (mod_rewrite) or Nginx |
| **Node.js** | 20 or higher |
| **Yarn** | 1.22+ or 4.x (Berry) |
| **Composer** | 2.x |
---
## 📥 Installation
## Installation
### Linux (Ubuntu / Debian)
```bash
# 1. Clone
git clone https://github.com/your-repo/atomcms.git
cd atomcms
# 1. System dependencies
sudo apt update
sudo apt install -y git curl wget unzip nginx mariadb-server \
php8.3 php8.3-cli php8.3-fpm php8.3-mysql php8.3-xml \
php8.3-mbstring php8.3-curl php8.3-zip php8.3-bcmath \
php8.3-gd php8.3-sockets php8.3-intl
# 2. Install dependencies
composer install
npm install
# 2. Install Composer
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
# 3. Run the repair tool
php artisan atom:check --fix
# 3. Install Node.js & Yarn
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
sudo corepack enable
corepack install -g yarn@latest
# 4. Clone the project
git clone https://gitlab.epicnabbo.nl/RemcoEpic/atomcms-edit.git /var/www/atomcms
cd /var/www/atomcms
# 5. Configure environment
cp .env.example .env
php artisan key:generate
# Edit .env with your database credentials:
# DB_DATABASE=habbo
# DB_USERNAME=root
# DB_PASSWORD=yourpassword
# 6. Install PHP dependencies
composer install --no-dev --optimize-autoloader
# 7. Install frontend dependencies
yarn install
# 8. Create database
mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS habbo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
# 9. Run migrations & seeders (or use the auto-repair tool)
php artisan migrate --seed
# Or use the interactive repair tool:
# php artisan atom:check --fix
# 10. Build frontend assets
yarn build:all
# 11. Set permissions
sudo chown -R www-data:www-data storage bootstrap/cache public/build
sudo chmod -R 775 storage bootstrap/cache
# 12. Configure web server
# --- Nginx ---
sudo nano /etc/nginx/sites-available/atomcms
```
server {
listen 80;
server_name your-domain.com;
root /var/www/atomcms/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
```
```bash
sudo ln -sf /etc/nginx/sites-available/atomcms /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
# --- Apache ---
sudo a2enmod rewrite
sudo nano /etc/apache2/sites-available/atomcms.conf
```
<VirtualHost *:80>
ServerName your-domain.com
DocumentRoot /var/www/atomcms/public
<Directory /var/www/atomcms/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/atomcms-error.log
CustomLog ${APACHE_LOG_DIR}/atomcms-access.log combined
</VirtualHost>
```
```bash
sudo a2ensite atomcms
sudo systemctl reload apache2
```
# 13. Restart PHP-FPM to clear opcache
sudo systemctl restart php8.3-fpm
# 14. Visit http://your-domain.com in your browser
```
---
## 🛠️ Usage
### Windows (XAMPP / WampServer)
#### Prerequisites
- [XAMPP](https://www.apachefriends.org/) (PHP 8.1+, Apache, MariaDB) or [WampServer](https://www.wampserver.com/)
- [Node.js](https://nodejs.org/) (20 LTS or higher)
- [Yarn](https://yarnpkg.com/getting-started/install) (`npm install -g yarn` after Node.js)
- [Composer](https://getcomposer.org/download/) (Windows installer)
- [Git for Windows](https://git-scm.com/download/win)
#### Steps
```powershell
# 1. Open PowerShell or CMD as Administrator
# 2. Clone the project
git clone https://gitlab.epicnabbo.nl/RemcoEpic/atomcms-edit.git C:\xampp\htdocs\atomcms
cd C:\xampp\htdocs\atomcms
# 3. Configure environment
copy .env.example .env
php artisan key:generate
# Edit .env with your XAMPP database credentials:
# DB_CONNECTION=mariadb
# DB_HOST=localhost
# DB_PORT=3306
# DB_DATABASE=habbo
# DB_USERNAME=root
# DB_PASSWORD=
# 4. Start XAMPP services
# Open XAMPP Control Panel → Start Apache & MySQL
# 5. Create database
# Open phpMyAdmin (http://localhost/phpmyadmin)
# → New → Database name: habbo → Charset: utf8mb4_unicode_ci → Create
# 6. Install PHP dependencies
composer install --no-dev --optimize-autoloader
# 7. Install frontend dependencies
yarn install
# 8. Run migrations & seeders
php artisan migrate --seed
# Or use the interactive repair tool:
# php artisan atom:check --fix
# 9. Build frontend assets
yarn build:all
# 10. Set permissions (required for storage & cache)
# Right-click storage\ and bootstrap\cache\ folders
# → Properties → Security → Edit → Add "Everyone" → Full Control
# Or run in PowerShell as Admin:
icacls storage /grant Everyone:F /T
icacls bootstrap/cache /grant Everyone:F /T
icacls public/build /grant Everyone:F /T
# 11. Enable Apache mod_rewrite
# Open XAMPP Control Panel → Apache → Config → httpd.conf
# Uncomment: LoadModule rewrite_module modules/mod_rewrite.so
# 12. Visit http://localhost/atomcms/public in your browser
```
> **Note:** If you use IIS on Windows, the repair tool supports auto-detection:
> `php artisan atom:check --fix`
---
## Quick Start (Repair Tool)
```bash
# Interactive mode (asks for confirmation before each step)
php artisan atom:check --fix
# Auto mode (fixes everything automatically without asking)
php artisan atom:check --auto
# Force platform detection
php artisan atom:check --platform=nginx
# Dutch language output
php artisan atom:check --fix --lang=nl
```
---
## Commands
```bash
# Check only (no changes)
@@ -183,81 +331,44 @@ php artisan atom:check --fix
# Automatic fix (no questions)
php artisan atom:check --auto
# Force platform detection
php artisan atom:check --platform=nginx
# Dutch language
php artisan atom:check --fix --lang=nl
# Fix gamedata symlinks for bundled assets
php artisan atom:fix-gamedata-symlinks
# Preview what symlinks would be created (dry-run)
# Preview symlinks (dry-run)
php artisan atom:fix-gamedata-symlinks --dry-run
```
---
## ⚡ Performance Optimization
### Gamedata Symlinks
The `atom:fix-gamedata-symlinks` command creates symlinks in the Gamedata directory to point to optimized bundled assets. This significantly improves load times for the game client.
| Symlink | Target | Purpose |
| ---------------- | ------------------- | --------------------- |
| `effect` | `bundled/effect` | Avatar effects |
| `furniture` | `bundled/furniture` | Furniture assets |
| `generic` | `bundled/generic` | Generic assets |
| `pet` | `bundled/pet` | Pet assets |
| `figure` | `bundled/figure` | Avatar figures |
| `generic_custom` | `bundled/generic` | Custom generic assets |
### Recommended Nginx Optimizations
The following optimizations are already configured:
- `sendfile on` - Kernel-level file serving
- `open_file_cache` - File descriptor caching
- `gzip` - Automatic compression for JSON/JS/CSS
---
## 🧑‍💻 Developer Tools
### Yarn Scripts
```bash
# Build
yarn build # Build all themes
yarn build:atom # Build atom theme only
yarn build:dusk # Build dusk theme only
yarn build:all # Build both themes
# Build all themes
yarn build:all
# Build single theme
yarn build:atom # Atom theme
yarn build:dusk # Dusk theme
# Development
yarn dev # Start dev server
yarn dev:atom # Dev server atom theme
yarn dev # Start Vite dev server
yarn dev:atom # Dev server for Atom theme
# Code Quality
yarn lint # Check JS/Vue
yarn lint:fix # Fix JS/Vue
yarn lint:css # Check CSS
yarn lint:css:fix # Fix CSS
yarn lint:all # Check everything
yarn lint:fix:all # Fix everything
# Linting & Formatting
yarn lint # Check JS/Vue
yarn lint:fix # Fix JS/Vue
yarn lint:css # Check CSS
yarn lint:css:fix # Fix CSS
yarn format # Format everything
yarn format:check # Check formatting
yarn format # Format everything
yarn format:check # Check formatting
# Check
yarn check # Full check
yarn check:php # Check PHP syntax
yarn check:security # Check security
yarn check:deps # Check outdated packages
# Full check
yarn check # Lint + format check
yarn check:php # PHP syntax check
yarn check:security # Composer & npm audit
yarn check:deps # Check outdated packages
# Cache
yarn clean # Clear cache
yarn rebuild # Clean + install + build
yarn clean # Clear Vite cache
yarn rebuild # Clean + install + build
```
### PHP Commands
@@ -266,9 +377,6 @@ yarn rebuild # Clean + install + build
# Auto-fix code style
php artisan atom:fix-code
# Fix gamedata symlinks (run after installing client assets)
php artisan atom:fix-gamedata-symlinks
# Static analysis (PHPStan Level 3)
./vendor/bin/phpstan analyse
@@ -278,48 +386,95 @@ yarn build:dusk
# Development mode
yarn dev:atom
yarn dev:dusk
# Format code
yarn format
```
---
## ⚡ Performance Optimizations
## Repair Tool Details
This CMS is fully optimized:
The `atom:check` command performs over **100 deep system checks** and offers to fix them automatically.
| Optimization | Description |
| ---------------------- | --------------------------------- |
| **Vite 8** | Fastest build tool |
| **esbuild** | Faster minification |
| **Better chunking** | Optimal code splitting |
| **Gzip + Brotli** | Compression (~70% smaller) |
| **Resource hints** | DNS prefetch, preconnect, preload |
| **HTTP/2** | Faster network requests |
| **Console removed** | Smaller JS bundles |
| **Caching** | Vite cache + optimizedeps |
### Diagnostic Checks
| Section | What it Checks |
| ------------- | ------------------------------------------------------------- |
| **Environment** | .env, APP_KEY, Debug mode, Composer security |
| **Database** | Tables, columns, migrations, seeders, settings, radio, admin |
| **PHP Stack** | Extensions, php.ini, config cache, session |
| **Web Server**| Apache/Nginx/IIS config, SSL |
| **System** | Permissions, firewall ports |
| **Assets** | Frontend, Redis, Cron, Queue, Supervisor, Vite |
| **HTTP Errors** | 400, 401, 403, 404, 419, 429, 500, 502, 503, 504 |
### Auto-Fix Steps
| Step | Action |
| ---- | ---------------------------------- |
| 1 | Environment (.env, APP_KEY) |
| 2 | Clear all caches |
| 3 | Fix permissions |
| 4 | Run migrations |
| 5 | Run seeders |
| 6 | Fix storage (symlink, directories) |
| 6b | Fix Radio tables |
| 7 | Fix Gamedata symlinks |
| 8 | Create admin user |
| 9 | Web server config (.htaccess) |
| 10 | PHP config & extensions |
| 11 | Build assets (npm) |
| 12 | Fix HTTP errors |
Auto-detects: **Linux, Windows IIS, XAMPP, WAMP, Apache, Nginx**
---
## 📦 Tech Stack
## Performance Optimizations
| Optimization | Description |
| ------------------- | -------------------------------- |
| **Vite 8** | Fastest build tool |
| **esbuild** | Faster minification |
| **Better chunking** | Optimal code splitting |
| **Gzip + Brotli** | Compression (~70% smaller) |
| **Resource hints** | DNS prefetch, preconnect, preload|
| **HTTP/2** | Faster network requests |
| **Console removed** | Smaller JS bundles |
| **Caching** | Vite cache + optimizedeps |
### Gamedata Symlinks
The `atom:fix-gamedata-symlinks` command creates symlinks in the Gamedata directory to point to optimized bundled assets, significantly improving game client load times.
| Symlink | Target | Purpose |
| ---------------- | ------------------- | ---------------- |
| `effect` | `bundled/effect` | Avatar effects |
| `furniture` | `bundled/furniture` | Furniture assets |
| `generic` | `bundled/generic` | Generic assets |
| `pet` | `bundled/pet` | Pet assets |
| `figure` | `bundled/figure` | Avatar figures |
| `generic_custom` | `bundled/generic` | Custom generic |
---
## Tech Stack
- **Backend:** Laravel 13
- **Frontend:** React 19 + Alpine.js
- **Build:** Vite 8
- **CSS:** TailwindCSS 4
- **Admin Panel:** Filament 5
- **Database:** MariaDB / MySQL
- **Linting:** ESLint + Stylelint + Prettier
---
## 🤝 Credits
## Credits
- **Remco (Epicnabbo)** - Core Maintainer, System Architecture
- **Kasja** - Design & Themes
- **Kani** - RCON & API
- **Atom Community** - Testing & Feedback
- **Remco (Epicnabbo)** Core Maintainer, System Architecture
- **Kasja** Design & Themes
- **Kani** RCON & API
- **Atom Community** Testing & Feedback
<div align="center">
<i>Made with ❤️ for the Retro Community</i>
<i>Made with love for the Retro Community</i>
</div>