10/4/2025
Tokobux: Dual-Frontend Roblox Top-Up Platform with Automated Backend (Vercel + VPS)
Tokobux is a production-ready Roblox top-up platform: customer & seller apps on Vercel, a Dockerized FastAPI backend on a VPS and Selenium-based web automation.
By fathin@nightcoders.id
.png&w=3840&q=75)
Why Automating “Top-Up” Operations Matters
Top-up platforms live and die by speed, reliability, and accuracy. Manual purchase flows create delays, failed orders, and support overhead. Tokobux automates the entire chain from order capture to fulfillment so customers get instant, consistent results and operators get predictable margins with clear observability.
What Is Tokobux?
Tokobux is a Roblox top-up platform with two Next.js apps (Customer & Seller) deployed on Vercel and a Docker-orchestrated backend on a VPS. The backend runs FastAPI + Redis/RQ workers + Selenium Grid to automate the provider flows that power the business. Events move through Supabase webhooks (HMAC-signed) for safe, auditable change tracking.
Architecture at a Glance
Frontends (Vercel)
customer-app
- Next.js 15 storefront for buyers
seller-app
- Next.js 15 dashboard for operators
CI/CD: Git → Vercel projects (monorepo aware)
Backend (VPS + Docker Compose)
FastAPI REST API
RQ workers for background jobs (purchase/verify/settle)
Redis as the queue/broker
Selenium Grid for robust browser automation
Optional RQ Dashboard for live job status
Caddy/Nginx reverse proxy with TLS on api.example.com
& queue.example.com
Data/Events
Supabase for data + signed webhooks → /v1/purchase
HMAC verification for inbound events
Automation & Ops
GitHub Actions for backend deploys over SSH
Health checks (/healthz
), logs, and one-command rollbacks
Key Features of Tokobux
1) Dual Frontends Optimized for Roles
Separate Customer and Seller apps keep UX simple and performance high. Each app has its own CI/CD and environment variables.
2) Business-Critical Web Automation
Selenium Grid runs parallel, resilient browser sessions to complete provider flows quickly and reliably even under load or when providers throttle.
3) Queue-First Reliability
All high-latency work (purchases, validations, retries) runs on Redis/RQ workers with timeouts, retry policies, and a visible job dashboard.
4) Secure, Signed Integrations
Inbound events (e.g., from Supabase) use HMAC signatures to prevent spoofing. Secrets are scoped via .env
and Docker secrets best practices.
5) Production-Grade Delivery
TLS via Caddy on the VPS
Monorepo CI/CD to Vercel for each app path
GitHub Actions → SSH deploy for backend
restart: unless-stopped
and optional systemd for auto-start
6) Payment Gateway Ready
Frontends are wired to support payment providers (e.g., Midtrans) via environment variables (server key, client key, webhook secret) for real-world settlement flows.
Tokobux Use Cases
Instant Roblox top-ups with automated fulfillment
Seller operations: manage inventory, orders, and issue handling in a dedicated dashboard
High-volume events with queue-based scaling and Selenium parallelism
Auditable workflows with signed webhooks and structured logs
Technical Stack Behind Tokobux
Front End: Next.js 15 (Customer & Seller), deployed on Vercel
Back End: FastAPI, Redis, RQ workers, Selenium Grid, Docker Compose on Ubuntu VPS
Proxy/TLS: Caddy (or Nginx) with automatic Let’s Encrypt
Data & Events: Supabase (service key, HMAC webhooks)
CI/CD: Vercel Git integration (frontends), GitHub Actions → SSH (backend)
How We Ship to Production (High-Level)
Repo layout: customer-app/
, seller-app/
, backend/
Vercel projects: one per app root; copy .env
from examples
VPS bootstrap: Docker/Compose, external caddy_net
, domain A records
Reverse proxy: Caddy routes api.example.com
→ backend:8000
, queue.example.com
→ dashboard:9181
Compose up: docker compose up -d --build
Webhooks: point Supabase to POST https://api.example.com/v1/purchase
with the same HMAC secret
CI/CD: pushes to main
deploy both Vercel apps; backend deploy via GitHub Actions over SSH
Observability & Ops
Health: GET /healthz
→ 200
Logs: docker logs -f backend-*
and workers
Dashboard: RQ dashboard on a protected subdomain
Rollback: Vercel redeploy for FE; git reset && docker compose up -d --build
for BE
Frequently Asked Questions
Q: How does Tokobux handle failed automations? A: Jobs run on RQ with retries, per-step timeouts, and failure queues. Operators can re-queue from the dashboard.
Q: Can the backend scale? A: Yes. Add more worker replicas and Selenium nodes in Compose. Queue depth is your scaling signal.
Q: Is it secure to process webhooks? A: Webhooks are validated with HMAC. Only requests with the correct signature are processed.
Q: Can we bring our own payment gateway? A: The env-based configuration lets you plug in providers (e.g., Midtrans). Webhooks can update order status end-to-end.
Get Started With Tokobux
Looking to run a reliable, automated top-up business with clear ops, CI/CD, and security? Tokobux demonstrates a stacked approach: Vercel for speed, VPS for control, and containers for resilience.