░█████╗░██████╗░███████╗██╗░░██╗███╗░░██╗░█████╗░██╗░░░██╗░█████╗░
██╔══██╗██╔══██╗██╔════╝╚██╗██╔╝████╗░██║██╔══██╗██║░░░██║██╔══██╗
███████║██████╔╝█████╗░░░╚███╔╝░██╔██╗██║██║░░██║╚██╗░██╔╝███████║
██╔══██║██╔═══╝░██╔══╝░░░██╔██╗░██║╚████║██║░░██║░╚████╔╝░██╔══██║
██║░░██║██║░░░░░███████╗██╔╝╚██╗██║░╚███║╚█████╔╝░░╚██╔╝░░██║░░██║
╚═╝░░╚═╝╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝░░╚══╝░╚════╝░░░░╚═╝░░░╚═╝░░╚═╝
░█████╗░██████╗░███████╗███╗░░██╗░█████╗░
██╔══██╗██╔══██╗██╔════╝████╗░██║██╔══██╗
███████║██████╔╝█████╗░░██╔██╗██║███████║
██╔══██║██╔══██╗██╔══╝░░██║╚████║██╔══██║
██║░░██║██║░░██║███████╗██║░╚███║██║░░██║
╚═╝░░╚═╝╚═╝░░╚═╝╚══════╝╚═╝░░╚══╝╚═╝░░╚═╝
ApexNova Arena is a full-stack competitive gaming platform with real-time tournament brackets, skill-based matchmaking, live leaderboards, and an in-game social ecosystem — powered by a Laravel + React + WebSocket architecture.
🚀 Quick Start · 🏗️ Architecture · 📡 API Docs · 🗺️ Roadmap · 🤝 Contributing
Frontend UI previews coming soon — first release in progress
| Module | Features |
|---|---|
| 🎮 Games | Multi-game support, real-time sync, skill-based matchmaking, session analytics |
| 🏆 Tournaments | Bracket generation, automated scoring, prize pool management, live feeds |
| 📊 Rankings | Global leaderboards, division tiers, ELO-style rating, achievement system |
| 👥 Social | Friend requests, real-time chat, game invitations, presence tracking |
| 🔐 Auth | JWT + OTP email verification, role-based access, secure profile management |
| 📡 Real-time | WebSocket events via Laravel Reverb — live scores, notifications, messaging |
┌─────────────────────────────────────────────────────────────────────┐
│ CLIENT (Browser) │
│ React 18 + Vite + TailwindCSS + Axios │
│ WebSocket Client ←────────────────────────────┐ │
└──────────────────────────────┬──────────────────────── │ ───────────┘
│ REST API │ WS
┌──────────────────────────────▼──────────────────────── │ ───────────┐
│ BACKEND (Laravel 11) │ │
│ │ │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────────▼──────────┐ │
│ │ Controllers │ │ Middleware │ │ Laravel Reverb (Reverb) │ │
│ │ (REST API) │ │ JWT + RBAC │ │ WebSocket Broadcasting │ │
│ └──────┬──────┘ └──────────────┘ └─────────────────────────────┘ │
│ │ │
│ ┌──────▼──────────────────────────────────────────┐ │
│ │ Eloquent ORM │ │
│ └──────┬──────────────────────┬───────────────────┘ │
└─────────│──────────────────────│─────────────────────────────────────┘
│ │
┌─────────▼──────────┐ ┌───────▼──────────┐ ┌──────────────────────┐
│ PostgreSQL DB │ │ Redis (Cache) │ │ Cloudinary (Media) │
│ Primary datastore │ │ Sessions + Q │ │ Avatars & Assets │
└────────────────────┘ └──────────────────┘ └──────────────────────┘
| Technology | Purpose |
|---|---|
| React 18 | Component-based SPA |
| Vite | Next-gen build tooling |
| TailwindCSS | Utility-first styling |
| Axios | HTTP client with interceptors |
| Laravel Echo | WebSocket client integration |
| Technology | Purpose |
|---|---|
| Laravel 11 | MVC framework + REST API |
| PHP 8.3 | Language runtime |
| Laravel Sanctum / JWT | Token-based authentication |
| Laravel Reverb | Native WebSocket server |
| Laravel Mail | OTP + transactional email |
| Technology | Purpose |
|---|---|
| PostgreSQL | Primary relational database |
| Redis | Caching + queue + sessions |
| Cloudinary | Cloud media storage |
ApexNova-Arena/
│
├── 📦 frontend/ # React + Vite SPA
│ └── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Route-level page components
│ ├── hooks/ # Custom React hooks
│ ├── context/ # Global state (Context API)
│ ├── config/ # API base URLs, constants
│ └── assets/ # Icons, images, fonts
│
├── 🔧 backend/ # Laravel 11 API
│ └── app/
│ ├── Models/ # Eloquent models
│ ├── Http/
│ │ ├── Controllers/ # API controllers
│ │ └── Middleware/ # JWT, rate-limiting, RBAC
│ ├── Events/ # Broadcastable events
│ ├── Mail/ # Mailable classes
│ └── Providers/ # Service providers
│ └── database/
│ ├── migrations/ # Schema definitions
│ ├── factories/ # Fake data factories
│ └── seeders/ # Database seeders
│ └── routes/
│ ├── api.php # REST API routes
│ └── channels.php # Broadcasting channel definitions
│
└── .gitignore
- Node.js v18+ & npm
- PHP 8.3+ & Composer
- PostgreSQL 14+
- Redis (optional, recommended)
git clone https://github.com/aky2004/ApexNova-Arena.git
cd ApexNova-Arenacd backend
# Install PHP dependencies
composer install
# Configure environment
cp .env.example .env
php artisan key:generate
# Set up database
php artisan migrate --seed
# Start the server
php artisan serve
# (Optional) Start WebSocket server
php artisan reverb:startcd frontend
# Install JS dependencies
npm install
# Start dev server
npm run devbackend/.env
APP_NAME=ApexNova-Arena
APP_ENV=local
APP_URL=http://localhost:8000
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=apexnova
DB_USERNAME=your_username
DB_PASSWORD=your_password
JWT_SECRET=your_jwt_secret_here
REVERB_APP_ID=your_reverb_app_id
REVERB_APP_KEY=your_reverb_app_key
REVERB_APP_SECRET=your_reverb_app_secret
CLOUDINARY_URL=cloudinary://api_key:api_secret@cloud_name
MAIL_MAILER=smtp
MAIL_HOST=your_mail_host
MAIL_PORT=587
MAIL_USERNAME=your_email
MAIL_PASSWORD=your_passwordfrontend/.env
VITE_API_BASE_URL=http://localhost:8000/api
VITE_WS_HOST=localhost
VITE_WS_PORT=8080POST /api/auth/register Register new player
POST /api/auth/login Login + receive JWT
POST /api/auth/verify-otp Email OTP verification
POST /api/auth/logout Invalidate tokenGET /api/games List all available games
GET /api/games/{id} Get game details
POST /api/games/{id}/play Create a game sessionGET /api/tournaments Browse all tournaments
POST /api/tournaments Create a tournament
POST /api/tournaments/{id}/join Join a tournament
GET /api/tournaments/{id}/brackets View bracket progressionGET /api/rankings Global leaderboard
GET /api/rankings/{userId} Player ranking profile
GET /api/rankings/stats Aggregate analyticsGET /api/friends List friends
POST /api/friends/{userId} Send friend request
PUT /api/friends/{userId}/accept Accept request
DELETE /api/friends/{userId} Remove friendusers → id, username, email, avatar, rating, created_at
games → id, name, type, max_players, config
game_rooms → id, game_id, host_id, status, started_at
game_scores → id, room_id, user_id, score, result
tournaments → id, name, game_id, host_id, bracket_type, prize_pool, status
tournament_entries → id, tournament_id, user_id, seed
game_invites → id, sender_id, receiver_id, room_id, status
friendships → id, user_id, friend_id, accepted_at
room_messages → id, room_id, user_id, message, created_at
rankings → id, user_id, game_id, elo, division, wins, losses
| Event | Channel | Trigger |
|---|---|---|
GameUpdated |
game.{roomId} |
Score change or state update |
TournamentBracketUpdated |
tournament.{id} |
Match result recorded |
NewMessage |
room.{roomId} |
Chat message sent |
FriendRequestReceived |
user.{userId} |
Friend request sent |
GameInviteReceived |
user.{userId} |
Invite dispatched |
Phase 1 — Foundation ✅
[x] Auth system (JWT + OTP)
[x] Games module
[x] Tournament system
[x] Ranking engine
[x] Real-time WebSockets
[x] Social features (friends, chat, invites)
Phase 2 — Enhancement 🔄
[ ] Mobile-responsive UI polish
[ ] Advanced tournament formats (round-robin, swiss)
[ ] In-app notifications center
[ ] Player analytics dashboard
Phase 3 — Scale ⏳
[ ] AI-powered matchmaking
[ ] Spectator mode with live stream integration
[ ] Native mobile app (React Native)
[ ] Public API + developer SDK
# Backend — PHPUnit
cd backend
php artisan test
# Backend — with coverage
php artisan test --coverage
# Frontend — Vitest
cd frontend
npm run test