Appearance
π§© Technology Stack & Backoffice Overview β
The Aggregator Project integrates the API and Backoffice of the Gaming Platform PAM. It provides backend processing, admin control, dashboards, provider connections, player management, transactions, reporting, caching and Horizon job queues.
- π§ Backend: Laravel 12 (PHP 8.4)
- ποΈ Database: PostgreSQL 17
- βοΈ Cache & Queues: Redis 7 + Laravel Horizon
- π¦ Storage: AWS S3 / DigitalOcean Spaces
- π₯οΈ Backoffice: Vue 3 + Vuetify + Pinia
- π Auth: Laravel Sanctum (JWT)
- π Monitoring: Laravel Telescope
- π¦ Queue Dashboard: Laravel Horizon
- π³ Deployment: Docker + deploy.sh automation
π Project Structure β
The backend is organized as follows:
- aggregator/ β Laravel API
- back-office/ β Vue 3 Backoffice
- docker/ β Docker build files & supervisor scripts
- deploy.sh β Deployment automation
- docker-compose.yml β Local dev networking
- .env β Main project environment file
Before configuring the backend, you must set your database connection depending on the environment:
- π₯οΈ Local Development: use
DB_HOST=postgres - π Production: use the VPS DB IP (example:
192.168.10.101) - π§ͺ Staging: use its own VPS DB IP (example:
192.168.10.102)
βοΈ Environment Configuration (.env) β
Complete production-ready configuration:
env
# Application
APP_NAME=Aggregator
APP_ENV=${APP_ENV}
APP_KEY=base64:JecVhp4VmlHb/S148DS4dFY5iC1KMwXKLLjTIPtnBTY=
APP_DEBUG=true
APP_URL=https://aggregator.example.com
# Database
DB_CONNECTION=pgsql
DB_HOST=${DB_HOST}
DB_PORT=${DB_PORT}
DB_DATABASE=${DB_DATABASE}
DB_USERNAME=${DB_USERNAME}
DB_PASSWORD=${DB_PASSWORD}
DB_SCHEMA=production
# Cache / Logging
CACHE_DRIVER=redis
CACHE_TTL=86400
LOG_CHANNEL=single
LOG_LEVEL=debug
# Features
FORCE_HTTPS=false
TELESCOPE_ENABLED=true
TELESCOPE_JOB_WATCHER=true
HORIZON_ENABLED=true
REAL_TIME_REPORTING=true
# Queue
QUEUE_CONNECTION=redis
# Sessions
SESSION_DRIVER=redis
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=null
REDIS_CLIENT=phpredis
# Horizon
HORIZON_PREFIX=aggregator
HORIZON_DOMAIN=
HORIZON_MEMORY=256
# Storage
FILESYSTEM_DRIVER=s3
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=
AWS_BUCKET=
AWS_ENDPOINT=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=""
MAIL_MAILER=
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
# Twilio Credentials
TWILIO_SID=
TWILIO_AUTH_TOKEN=
# SMS / WhatsApp
TWILIO_SMS_FROM=
TWILIO_WHATSAPP_FROM=whatsapp:
TWILIO_WHATSAPP_TEMPLATE_SID=
# Cloudflare Turnstile
TURNSTILE_SECRET_KEY=π₯οΈ Terminal Setup β
bash
# 1. Go to project root
cd ~/aggregator-pam
# 2. Make the deployment script executable
chmod +x deploy.shπ Deployment Commands β
Production β
bash
./deploy.sh prod --api=https://aggregator.example.com/api
./deploy.sh prod --api=https://aggregator.example.com/api --build
./deploy.sh prod --api=https://aggregator.example.com/api --rebuildDevelopment β
bash
./deploy.sh dev --api=http://aggregator.test/api
./deploy.sh dev --api=http://aggregator.test/api --build
./deploy.sh dev --api=http://aggregator.test/api --rebuildπΊοΈ Architecture Overview β
mermaid
graph TD
WL[π Whitelabel<br />Vue 3 + Nginx<br />https://micasino.net]
BO[π₯οΈ Backoffice<br />Vue 3 + Vuetify<br />https://admin.example.com]
API[βοΈ Aggregator API<br />Laravel + Redis + Horizon]
DB[ποΈ PostgreSQL<br />Dockerized DB]
WL -->|POST /api/wl/tenant<br />Send domain β get JSON| API
API -->|WL JSON config| WL
WL -->|POST /login<br />JWT Auth| API
BO -->|POST /login<br />JWT Auth| API
WL -->|JWT Protected Endpoints| API
BO -->|JWT Protected Endpoints| API
API -->|DB + Cache + Queues| DBβ Deployment Complete β
INFO
Once you run the deployment commands, the whole platform becomes available automatically:
- Admin Backoffice: https://admin.example.com/login
- Aggregator API: https://aggregator.example.com
No extra manual steps β once deploy.sh finishes, everything is online.
Β© 2025 Gaming Platform β Aggregator Project Documentation