MB
~ / projects / game-marketplace

Game Services Marketplace_

High-performance e-commerce platform for selling digital game keys, accounts, currency, and custom boosting services. Built on a Decoupled Monorepo setup with a Next.js App Router frontend and a Laravel 12 API / Filament Admin backend.

Next.js 16.1 React 19 Laravel 12 API Filament Admin 5.2 Elasticsearch 9.3 PostgreSQL 16 Redis 7 & Horizon
50+ Next.js components
37 Eloquent models
24 API controllers
82 DB migrations
16 queue listeners
13 CLI commands

// architecture

Decoupled Monorepo setup. The public storefront (frontend) and administration backend (API & Admin Panel) share a single repository but run fully separate codebases, deploying in isolation. They communicate via a strict REST API and share a single PostgreSQL 16 database and Elasticsearch 9.3 search index.

$ cat architecture.txt
User Browser
Caddy Reverse Proxy
┌──────────────┴──────────────┐
Next.js Frontend Laravel 12 API / Admin
(App Router, SSR/ISR) (Filament, Queues, Jobs)
│ │
├─ Redis 7 (Cache, Queues)
├─ Elasticsearch 9.3 (Search)
└──────────────┬──────────────┘
PostgreSQL 16
Decoupled Monorepo

Strict segregation of concerns. Next.js manages presentation and SEO; Laravel & Filament handle databases, queues, and administration

Event-Driven Flow

Critical flows (payments, accounts, alerts) run asynchronously using Laravel Events and Horizon queues. 8 events & 16 listeners

Full-Text Elasticsearch

High-speed catalog search. Utilizes ReindexProductJob for on-the-fly indexing and zero-downtime batch index swapping

Multi-Guard Auth

Separated customer sessions (passwordless OTP code under web guard) and admin sessions (Filament Admin under admin guard)

Dynamic Order Metadata

Flexible form constructor. Products dynamically require custom client fields (e.g. server, name) configured in the admin panel

Multi-Currency Engine

Supports multiple customer currencies with automated exchange rate updates via scheduling CLI tasks

// key features

01. Catalog & Customization

  • Hierarchical categories, product groups, attributes, and options
  • Product Addons support (e.g., process streaming, fast delivery)
  • Polymorphic SEO tables linking tags, meta fields, and descriptions to any entity

02. Checkout & Payments

  • Persistent multi-currency cart stored in DB and synced client-side
  • Promo codes engine with category, date, and user usage limit checks
  • Unified payment transactions mapping (Created -> Completed / Failed)
  • Secure signature validation for incoming gateway webhooks

03. Abandoned Carts Automation

  • Scheduled CLI reminders command using distributed Cache::lock locks
  • Multi-stage notifications flow (Steps 1, 2, 3) with 24h cooldown checks
  • O(1) memory usage via Laravel Database Cursors for massive tables

04. Marketing & Profitability Analytics

  • Referral attribution tracking and checkout surveys
  • Async telemetry listeners broadcasting events to GA, PostHog, and Metrika
  • Margin & Cost of Goods (COGS) tracking mapping net ROI against expenditures
// app/Console/Commands/SendAbandonedCartEmailsCommand.php
$lock = Cache::lock('carts:send-abandoned-emails', 300);
try {
$lock->block(0);
// Process abandoned carts...
} finally {
$lock->release();
}

// quality & devops

CI/CD Quality Control

$ npm run test:run && composer test
ESLint & Prettier ........ passed
Vitest (Front) ........... 53 tests, 0 failures
PHPUnit (Back) ........... 45 tests, 0 failures

Infrastructure & Deploy

  • Ansible playbooks provision servers (Node, PHP, PostgreSQL, Redis, Caddy)
  • Caddy reverse proxy handling automated Wildcard SSL generation
  • Zero-downtime release building linked atomically to active symlinks
  • Horizon background queues managed directly under systemd daemons

// tech stack

Backend
Laravel 12 (PHP 8.4)
Filament Admin 5.2
Horizon / Queue workers
Laravel Pint / PHPUnit
Frontend
Next.js 16.1 (App Router)
React 19
TypeScript 5.9
Bootstrap 5.3 (Sass)
Data & Search
Elasticsearch 9.3
PostgreSQL 16
Redis 7
Dynamic Meta fields
DevOps & Logs
Ansible server setup
Caddy proxy (Auto-TLS)
GitHub Actions CI/CD
PostHog & GA tracking
$ project-stats --summary
50+ Next.js components
37 Eloquent models
24 API controllers
82 DB migrations
16 queue listeners