Chat
Shahanur Islam Shagor
Free Games Hub
There's something deeply satisfying about building a platform where people can just show up, click a button, and play. No subscription. No gatekeeping. Just games. That was the core idea behind Free Games Hub — a full-stack web application I built with Laravel 12 and Tailwind CSS that brings together a curated library of browser-based free games under one clean, modern roof.
Project Details
Built with practical delivery decisions, product clarity, and room to scale
This page presents the project more like a modern case-study layout, with a stronger visual intro, clearer CTA placement, and better supporting context in the sidebar.
Free Games Hub is a modern, responsive web platform that lets users discover, filter, and play free online games — all from their browser, without downloading anything. At its surface, it sounds simple. But underneath, it's a surprisingly deep system with user accounts, KYC verification, a points economy, casino game integration, a lottery system, deposit/withdrawal flows, referral tracking, VIP bonuses, 2FA security, and a full admin panel.
The Stack
When I started this, I wanted to use tools that were mature, well-documented, and wouldn't get in my way:
- Laravel 12 — The backbone. Routing, ORM, queues, auth, events — it handles all of it cleanly.
- Tailwind CSS — Utility-first styling that lets you build fast without fighting a CSS framework.
- Alpine.js — Lightweight interactivity without pulling in a full SPA framework.
- Livewire — For reactive UI components that feel live without writing a separate JavaScript layer.
- MySQL — Solid, relational, and well-suited for the kinds of queries this app needs.
- Pusher — Real-time event broadcasting for notifications.
- Google 2FA — Two-factor authentication for user accounts.
- Laravel Socialite — OAuth login via Google, Facebook, and Telegram.
- PWA support — The app is installable as a Progressive Web App via erag/laravel-pwa.
The dependency list in composer.json tells its own story: this isn't a toy project. It's production-ready infrastructure.
The Core Features
Game Library & Categories
At its heart, the platform is a game directory. Games are organized by category and tag. Each Game model stores a name, URL, image, description, play time, and a URL slug for clean SEO-friendly links. Categories (via GamesCategory) are also slug-routed and carry their own images and subtitles for rich display on the homepage.
The GameController handles CRUD for admin management and tracks game opens via GameOpen — meaning every time a user launches a game, it's logged. This feeds into the play history and analytics layer.
User Accounts & Profiles
Users register with standard email/password or via social login (Google, Facebook, Telegram). After registration, email verification kicks in. From their dashboard, users can manage their profile, track game history, check points balances, and monitor their deposit/withdrawal history.
There's also a KYC (Know Your Customer) verification layer — users can submit identity documents, and admins review and approve them before certain financial features unlock.
A Points Economy
One of the more interesting design decisions was building a points system into the platform. Users earn points by playing games (tracked via GamePoint), and those points feed into a level system (Level model). The PointConverterController lets users convert points into rewards or balance.
This gamification layer keeps users engaged. The more they play, the more they earn, the more they level up.
Casino Integration
The platform includes an embedded casino game system via CasinoController and CasinoGameSession. Casino sessions are tracked individually, and there are dedicated flows for:
- Bonus management — CasinoBonusController and the Bonus / BonusUser models handle welcome bonuses, deposit bonuses, and custom bonus configurations.
- Cashback — CasinoCashbackController and CashbackSetting provide configurable cashback percentages on losses.
- VIP Bonuses — CasinoVipBonusController and VipBonus give high-tier players extra rewards.
All of this is configurable from the admin panel, not hardcoded.
Deposits & Withdrawals
The financial layer is handled through a gateway system. UserDeposit and UserWithdrew models track money in and out. DepositSetting lets admins configure minimum amounts, gateways, and limits. Users who want to withdraw must first complete a deposit (enforced via CheckDepositForWithdraw middleware) and pass KYC verification.
Supporting documents for deposits and withdrawals are stored and reviewable through UserDepositDocument and UserWithdrawDocument.
Lottery System
The Lottary and LottaryWinner models power a built-in lottery feature. Users can purchase lottery entries, and the system tracks transactions via LotteryTransaction. Winners are recorded and can be announced publicly — a nice engagement hook.
Referral System
ReferralSetting and UserReferralController power a configurable referral program. Users get a unique referral link, and admins can set commission structures and bonus amounts for bringing in new signups.
Admin Panel
The admin side is its own ecosystem:
- User management — view, suspend, edit, and review all users
- Game & category CRUD — add or remove games and organize them into categories
- KYC review — approve or reject submitted identity documents
- Banner management — homepage banners with full image upload
- Page builder — static pages (about, terms, privacy) editable from the dashboard
- Point & level configuration — set how many points per game play, level thresholds
- Deposit gateway setup — configure payment gateways and limits
- Logs — LogController gives admins visibility into system activity
Security Choices
Security wasn't an afterthought. The middleware stack includes:
- TwoFactorMiddleware — enforces 2FA for users who've enabled it (via pragmarx/google2fa-laravel)
- CheckKyc — blocks access to financial features until identity is verified
- CheckDepositForWithdraw — prevents withdrawal attempts without a prior deposit on record
- Email verification before full account access
Social auth is handled via Laravel Socialite, keeping OAuth flows clean and standardized across Google, Facebook, and Telegram.
PWA & Offline Support
The app ships with a service worker (sw.js) and a web manifest (manifest.json), making it installable on mobile and desktop as a PWA. There's even a dedicated offline page (offline.html) that shows when the user loses connectivity. This is a small touch, but it makes the platform feel like a real app rather than just a website.
Project Structure at a Glance
The folder structure follows standard Laravel conventions, but with clear separation between admin, user, and public-facing concerns:
app/ resources/views/ database/ |
What I Learned Building This
Building Free Games Hub pushed me across a lot of surface area in a single project. A few things stood out:
Middleware chaining is powerful. Combining KYC checks, deposit requirements, and 2FA enforcement through middleware kept the controllers clean and the security logic centralized. Once you understand how middleware stacks work in Laravel, you stop repeating yourself in controller methods.
Models should be thin, services should be smart. The app/Services/ layer holds the heavier business logic — bonus calculations, cashback processing, referral commission math. Keeping that out of models and controllers makes testing and refactoring much easier.
PWA is worth the small effort. Adding the service worker and manifest takes maybe an afternoon. The payoff — a proper installable app experience on mobile — is disproportionately large for users who visit regularly.
Configurability beats hardcoding. Almost every financial parameter in the system (bonus rates, cashback percentages, referral commissions, deposit limits) is stored in the database and editable by admins. This was more upfront work, but it means the platform can be adapted without touching code.
Want a similar build? Contact smshagor.ru@gmail.com.
Project Discussion
Comments and replies
Leave a Comment