Official Laravel-based web platform for Top Robbers.
This repository contains the public website, authentication system, player dashboard, admin panel and internal APIs used by the Top Robbers ecosystem.
- Public website
- User registration and authentication
- Player dashboard / UCP
- Admin panel / ACP
- Roadmap and news pages
- Internal APIs for launcher and gamemode integration
- PostgreSQL database
- Redis cache / queues / sessions
- Mailpit for local email testing
- React + Inertia frontend
- Docker-based local development environment
- Laravel
- React
- Inertia
- TypeScript
- Tailwind CSS
- PostgreSQL
- Redis
- Docker Compose
Laravel’s React starter kit uses React, Inertia, TypeScript, Tailwind, which is the base stack used by this project.
You only need:
- Docker
- Docker Compose v2
- Git
You do not need to install PHP, Composer, Node.js, PostgreSQL or Redis locally.
On Windows, Docker Desktop is recommended.
Clone the repository:
git clone https://github.com/top-robbers/platform.git
cd platformCopy the environment file:
cp .env.example .envStart the Docker stack:
docker compose up -d --buildInstall PHP dependencies:
docker compose exec app composer installInstall frontend dependencies:
docker compose exec node npm installGenerate the Laravel application key:
docker compose exec app php artisan key:generateRun database migrations:
docker compose exec app php artisan migrateThe application should now be available at:
https://top-robbers.testMailpit is available at:
https://mail.top-robbers.testThis project uses a local reverse proxy with HTTPS support.
Add the following entries to your system hosts file:
127.0.0.1 top-robbers.test
127.0.0.1 vite.top-robbers.test
127.0.0.1 mail.top-robbers.testOn Windows, the hosts file is located at:
C:\Windows\System32\drivers\etc\hostsAfter starting the stack, you may need to trust the local Caddy certificate.
Copy the local root certificate from the Caddy container:
docker compose cp caddy:/data/caddy/pki/authorities/local/root.crt ./docker/caddy/certs/caddy-local-root.crtThen import it into your system trusted root certificates.
On Windows PowerShell:
Import-Certificate `
-FilePath .\docker\caddy\certs\caddy-local-root.crt `
-CertStoreLocation Cert:\CurrentUser\RootThe local development stack contains:
| Service | Description |
|---|---|
app |
PHP-FPM Laravel application |
caddy |
Local HTTPS reverse proxy |
node |
Vite development server |
postgres |
PostgreSQL database |
redis |
Redis cache / queue / session store |
mailpit |
Local email testing inbox |
Start the stack:
docker compose up -dStop the stack:
docker compose downRebuild containers:
docker compose up -d --buildView logs:
docker compose logs -fView Laravel logs:
docker compose logs -f appRun Artisan commands:
docker compose exec app php artisan migrate
docker compose exec app php artisan optimize:clear
docker compose exec app php artisan cache:clear
docker compose exec app php artisan route:clear
docker compose exec app php artisan config:clearRun Composer commands:
docker compose exec app composer install
docker compose exec app composer updateRun NPM commands:
docker compose exec node npm install
docker compose exec node npm run dev
docker compose exec node npm run buildComposer packages must be installed inside the app container.
Example:
docker compose exec app composer require vendor/packageAfter installing a package, commit the updated dependency files:
composer.json
composer.lockDo not commit:
vendor/NPM packages must be installed inside the node container.
Example:
docker compose exec node npm install package-nameAfter installing a package, commit:
package.json
package-lock.jsonDo not commit:
node_modules/The local PostgreSQL service uses:
Host: postgres
Port: 5432
Database: top_robbers
Username: top_robbers
Password: secretFrom the host machine, PostgreSQL is exposed on:
localhost:5432Laravel should use the Docker service name:
DB_CONNECTION=pgsql
DB_HOST=postgres
DB_PORT=5432
DB_DATABASE=top_robbers
DB_USERNAME=top_robbers
DB_PASSWORD=secretRedis is used for cache, queues and sessions.
Laravel should use:
CACHE_STORE=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
REDIS_CLIENT=phpredis
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379Mailpit catches local outgoing emails.
Laravel mail configuration:
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"Mailpit UI:
https://mail.top-robbers.testThe project uses Docker volumes for heavy dependency folders:
vendor:/var/www/html/vendor
node_modules:/var/www/html/node_modulesThis improves performance on Windows because PHP and Node dependencies are stored inside Docker volumes instead of the Windows bind mount.
If you run:
docker compose down -vDocker will delete all volumes, including:
- PostgreSQL data
- Redis data
- Composer
vendor - Node
node_modules
After that, you must reinstall dependencies:
docker compose exec app composer install
docker compose exec node npm install
docker compose exec app php artisan migrateRun the test suite:
docker compose exec app php artisan testOr directly with Pest:
docker compose exec app ./vendor/bin/pestFormat PHP code:
docker compose exec app ./vendor/bin/pintBuild frontend assets:
docker compose exec node npm run buildapp/ Laravel application code
bootstrap/ Laravel bootstrap files
config/ Laravel configuration
database/ migrations, seeders and factories
docker/ local Docker configuration
public/ public web root
resources/js/ React / Inertia frontend
resources/css/ styles
routes/ Laravel routes
tests/ automated testsLaravel is the central platform for:
- Web authentication
- Public website
- UCP
- ACP
- Launcher API
- Internal server API
The platform may read gamemode data for display purposes, but sensitive gamemode data changes should be performed through audited actions or gamemode commands, not through direct unrestricted SQL updates.
See LICENSE.