Complete Tech Stack
Capacitor
Docker
Laravel 11 (MVC)
Vue.js 3
RESTful API
WebSockets
Redis
SQL Database
Cloudflare
Mobile App Integration
Fools Gold is designed from the ground up as a native mobile application. The game will be officially released on the Google Play Store and the App Store. To achieve this, I utilized Capacitor to bridge the web-based game logic with native mobile device capabilities. Capacitor wraps the application, allowing it to function as a standalone app while securely fetching data and rendering the live game interface directly from the production server via structured RESTful APIs.
Docker & VPS Deployment Flow
The entire infrastructure is containerized and automated to ensure seamless updates and high availability for players:
- Version Control: The complete source code is securely managed and updated via GitHub.
- Containerization: The production environment on the VPS uses Docker to pull the latest code from the repository. Docker isolates and runs the Laravel backend, WebSocket server, and Vue frontend in their respective containers.
- Cloud Delivery: The native Capacitor mobile app points directly to this Dockerized VPS environment. This architecture guarantees that every time a user opens the app on their phone, they are instantly connected to the latest version of the game without requiring constant manual app updates through the app stores.
Architecture, Data & Security
Because the game relies on fast-paced card mechanics and handles real user data, a robust, scalable architecture is critical.
- MVC Architecture: The backend is built on Laravel's strict Model-View-Controller (MVC) framework, ensuring a clean separation between database logic, server-side processing, and the Vue.js presentation layer.
- API-Driven Communication: Non-real-time actions (like authentication, matchmaking, and profile updates) are handled seamlessly through custom-built RESTful APIs, ensuring fast, standardized communication between the mobile client and the database.
- WebSocket Integration: Millisecond-syncing across all mobile clients using persistent WebSocket connections, broadcasting card draws and player turns instantly.
- State & Data Management: Laravel and Redis handle high-speed queue processing and game state persistence. Meanwhile, a secure SQL database manages persistent data, storing user profiles, credentials, match history, and progression via Eloquent ORM.
- Multi-Layered Security: Cloudflare provides network-level DDoS protection, SSL encryption, and caching. At the application level, strict security protocols are enforced, including mandatory CSRF (Cross-Site Request Forgery) protection, XSS mitigation, secure API routing, and sanitized inputs.