We Built a Gaming Marketplace with 100K Users, Here is How

Veld Systems||2 min read

Traderly.gg started as a concept: a gaming marketplace where users could trade items across multiple games. It needed to work on iOS, Android, and desktop, handle real time inventory updates, process payments, and, critically, get approved by Apple's App Store review team.

Here is how we built it.

The Technical Challenge

Cross platform apps that feel native are hard. Real time trading systems with concurrent inventory management are hard. Getting a marketplace with virtual goods approved on the App Store is hard. We needed to solve all three simultaneously.

Architecture Decisions

React Native with shared business logic. We chose React Native not because it is trendy, but because maintaining three separate codebases (Swift, Kotlin, React) for a startup is a death sentence. 90% of our business logic, trading rules, inventory validation, payment flows, lives in shared TypeScript modules.

Supabase for the backend. PostgreSQL with Supabase gave us real time subscriptions out of the box. When a user lists an item, every other user browsing that game sees it appear instantly. No WebSocket server to manage, no pub/sub to configure.

Edge Functions for server side logic. Stripe webhook handling, trade validation, and inventory locks run in Supabase Edge Functions. They execute close to the user (edge network) and cannot be tampered with from the client.

The Real Time Trading Engine

The core challenge: two users trying to buy the same item simultaneously. Our solution uses PostgreSQL advisory locks and a state machine:

1. Buyer initiates purchase → Edge Function acquires advisory lock on item

2. Validate item is still available, buyer has funds, and trade rules pass

3. Execute atomic transaction: debit buyer, credit seller, transfer item

4. Release lock, broadcast update via real time subscription

5. Total time: under 200ms

App Store Approval

Apple rejected our first submission. The issue: in app purchases of "digital goods" must use Apple's payment system (30% cut). Our workaround: items are traded peer to peer (not purchased from us), and real money transactions use Stripe for physical adjacent goods. We rewrote our App Store description to emphasize the marketplace model and got approved on the second submission.

Scaling to 100K Users

The system handles 100K+ active users with: connection pooling via Supabase (PgBouncer), CDN cached static assets, optimistic UI updates (show the result immediately, reconcile with server), and database query optimization (composite indexes on hot paths).

Results

- 100K+ active users across 3 platforms

- 99.9% uptime since launch

- Sub 200ms API response times

- Shipped in 6 months from kickoff to App Store approval

See the full Traderly case study →

Planning a marketplace? Read our marketplace architecture guide for the technical decisions that matter most.

Planning a marketplace? Tell us about your project.

Ready to Build?

Let us talk about your project

We take on 3-4 projects at a time. Get an honest assessment within 24 hours.