Interactive case study
3 months build window

Playpal77 Casino & Game Engine

Realtime Casino Platform & Android TWA Rebuilder

A server-authoritative, high-fidelity online casino web application featuring slot machines and arcade games, custom Metamask/PIX payment gateways, and automated Android TWA builds.

Headline outcome
Replaced vulnerable client-side loops with authoritative RNG and resolved Metamask transaction drop failures.
Business Outcome: Refactored client-calculated game loops into a 100% server-authoritative engine, securing wallet transactions and automating compilation pipelines.
933
Games Indexed
100%
Server-Auth Spins
0
Transaction Losses
ReactTypeScriptNode.jsExpressSocket.ioMariaDBDocker Composeapktool
Live Walkthrough
Recorded walkthrough of the Playpal77 case study, running spins through the provably fair slot simulator
Click to expand full walkthrough

Project snapshot

Production
Duration
3 months
Why it matters
Designed and engineered the authoritative game server, fixed critical payment database write omissions, and wrote automated APK patch tooling.
Role focus
  • System architecture design
  • Lead fullstack engineering
  • AI automation workflow routing
  • Containerized security isolation
  • High-availability infrastructure tuning
Overview

Why this system had to exist

I refactored the Playpal77 casino suite to transition it from a fragile, client-calculated setup to a fully server-authoritative, high-performance web platform. The business required an engaging, light-themed casino lobby that looked like playpal77.ph, backed by real-time games (Scatter Slots, Dice, Crash, Plinko) and robust, frictionless blockchain and fiat payment integrations.

Moment 01

A server-authoritative, high-fidelity online casino web application featuring slot machines and arcade games, custom Metamask/PIX payment gateways, and automated Android TWA builds.

Moment 02

Designed and engineered the authoritative game server, fixed critical payment database write omissions, and wrote automated APK patch tooling.

Moment 03

Refactored client-calculated game loops into a 100% server-authoritative engine, securing wallet transactions and automating compilation pipelines.

Stage 1 of 5
Continue
Problem

What was breaking down

The legacy system suffered from severe security and performance issues. Spins were calculated client-side, making them vulnerable to tampering. Additionally, the Metamask payment callbacks failed to commit to the database due to a missing execution step in the PHP API, and the .htaccess configuration caused 404 errors on routing calls. The Android TWA app was also outdated and required manual compilation and signature fixes to compile under Android 15.

Moment 01

Game Calculation

Client-calculated (insecure)

Moment 02

Metamask Payments

Silent DB failures & 404 routing errors

Moment 03

APK Compilation

Manual breakdown under Android 15 SDK

Stage 2 of 5
Constraint map
Solution

The breakthrough and implementation path

I implemented a Node.js game server using Socket.io and SSE for realtime updates, wired it to the React/Vite front-end, fixed the PHP transaction bug in api.php, updated .htaccess, and built a script to automate apktool decompilation and rebuilding of Playpal77.apk. I also added a fully interactive simulator for the slots game.

Moment 01

By moving the RNG authority completely to a Node.js/Express server using secure random matrix generation and connecting the database to a persistent local MariaDB engine, we restored complete trust in game fairness. On the payment side, wrapping transaction operations in atomic database commits and routing callbacks through a unified reverse proxy resolved the 404 errors and transaction losses.

Moment 02

React/Vite Casino Frontend

Moment 03

Node.js Authoritative Game Server

Stage 3 of 5
Build system
Results

Before vs after, without the clutter

Outcome metrics stay visible while comparison details are compressed into large readable cards instead of long stacked panels.

Before

Game Calculation

Client-calculated (insecure)

After

Optimized resolution

100% Server-authoritative RNG

Stage 4 of 5
Measured impact
Architecture

Layered architecture with one consistent layout

Explore the operating layers and the shipped feature set in the same wider content frame used across the full case study.

Active layer

React/Vite Casino Frontend

Authoritative 5x3 slot engine and Plinko, Crash, Dice arcade games running on Node.js server
Ship 01

Authoritative 5x3 slot engine and Plinko, Crash, Dice arcade games running on Node.js server

Ship 02

Real-time event broadcasting and persistent wallet state synchronization using Socket.io and SSE

Ship 03

Secure payment processing gateway for Metamask blockchain and PIX transactions in PHP API

Ship 04

Automated Android TWA decompilation, drawable hot-fixing, and aapt2 compiler build script

Stage 5 of 5
Architecture live