Playable Prototype — Dima & Pablo

BrokerSIM

A luxury goods broker simulation. Each in-game day you scan supplier listings on SupplyNet, open a deal desk with a personality-driven client, negotiate price and terms in real time, physically handle the package in a Three.js 3D warehouse, then dispatch — with every outcome feeding back into your reputation and cash. Built on React 19, TypeScript, Vite, and Three.js with GLTF warehouse assets.

View on GitHub →
BrokerSIM SupplyNet — supplier listings with trust scores and margin projections
3
Core Game Phases
3
Client Personalities
8+
Negotiation Intents
3D
Warehouse Engine
5
Supplier Trust Factors
TS
TypeScript · React 19

At a glance

3
Distinct game phases
1
Full broker day, end-to-end
3D
Three.js warehouse
React 19
+ TypeScript + Vite

BrokerSIM puts you in the role of a luxury goods middleman. You don't manufacture anything — you find deals, negotiate margins, and physically move product to the right buyer before the day's deadline. The vertical slice is fully connected: supplier browsing, live negotiation, warehouse fulfillment, and dispatch scoring all flow together as one coherent broker workday.

01
Phase
SupplyNet
Browse supplier listings, compare condition scores, inbound risk, and trust. Lock a purchase.
02
Phase
BrokerRoom
Open a deal desk with a waiting client. Negotiate price, shipping, and terms across a limited round window.
03
Phase
Warehouse
Switch to the Three.js 3D warehouse. Move to the inbound package, pick it up, walk to dispatch, and trigger shipment.
04
Phase
Deal Log
Review day outcomes: profit, delays, disputes, trust shifts, and challenge results. Track your broker career stats.
BrokerSIM deal log with profit calculator and broker profile
End-of-day view — deal outcomes, profit calculator, broker stats, and the office upgrade shop.

Architecture

BrokerSIM is a client-side React app with no backend — all game state lives in React context and component state, advancing via user actions rather than a server tick. The Three.js warehouse scene is isolated as a self-contained module that receives item data as props and fires dispatch callbacks back into the React game state. Every phase is a route in the same Vite SPA.

BROWSER CLIENT — SPA React 19 + Vite · TypeScript · React Context (game state) Routes: / · /supplynet · /brokerroom · /warehouse · /deallog · /profile · /dailynews · No backend — all state is client-side Supplier generation · NPC intent engine · Three.js scene bridge · Daily events system SOURCING NEGOTIATION FULFILLMENT SUPPLYNET /supplynet Procedural supplier listings per day List price · condition · inbound shipping inbound risk · supplier trust score Purchase selection → passes to BrokerRoom BROKERROOM /brokerroom Client queue: Friendly · Analytical · Aggressive Intent classifier: 8+ intent categories Mood + leverage tracking per round Closed deal → item + terms → Warehouse WAREHOUSE 3D /warehouse · Three.js WebGL scene · GLTF models · WASD movement Package pickup · dispatch station · shelf grid Shipping method selection before dispatch Dispatch event → outcome → Deal Log item deal writes state GAME STATE — REACT CONTEXT selectedSupplier · dealTerms · brokerCash · brokerReputation · dayCounter Client history · deal log entries · challenge state · office upgrade flags No persistence yet — resets on page reload · localStorage save is the primary next milestone Future: IndexedDB or localStorage for persistent broker career across sessions DAILY EVENTS ENGINE BrokerSIM Daily Per-day market conditions: delay boost dispute boost · demand boost modifiers Modifies negotiation difficulty + shipping risk event modifiers DEAL LOG · /deallog Per-deal: client · item · profit · satisfaction · status Dispute flag · delay flag · trust delta per client · challenge outcome Profit calculator: buy price · sell price · shipping cost → gross profit → margin → ROI Running totals feed broker career stats on the profile screen BROKER PROFILE · /profile Cash · Reputation (0–100) · Day counter · Deal streak Office upgrades shop: Inspection Lab Lamp · CRM Negotiation Suite · Pro Packing Bench Upgrades modify supplier visibility, negotiation advantage, and dispatch speed/reliability Reputation gating: higher-trust suppliers and clients unlock as score climbs stats
Vertical-slice-first development: BrokerSIM was built economy-first — supplier math and margin calculations were stable before the negotiation UI existed, the negotiation intent engine was wired before the warehouse was built, and the 3D scene was added last after the full data flow was already tested end-to-end in 2D. Each phase was playable and testable in isolation before being connected.

SupplyNet — sourcing

The supplier browser generates a fresh set of listings each in-game day. Each supplier card exposes five variables that directly affect your margin and risk: list price, condition score (how worn or pristine the item is), inbound shipping cost, inbound delay/damage risk, and the supplier's overall trust rating built from past dealings. No two days look the same — you're always making a triage call under uncertainty.

SupplyNet supplier listings showing Celeste Platinum Band items with trust scores
SupplyNet — two listings for the same item from different suppliers. Trust, risk, and margin projections differ. Lower trust = cheaper list price but higher inbound risk.
Supplier Factor What it drives Range
List PriceYour cost basis — directly sets maximum achievable margin before shippingVaries by item category
Condition ScoreClient acceptance threshold — low condition triggers automatic disputes or walk-aways0–100
Inbound ShippingReduces realized margin; affected by the daily delay-boost event modifierFixed cost per listing
Inbound RiskProbability of damage or delay in transit — hits satisfaction and may trigger dispute flags% chance per listing
Supplier TrustAccumulated from past deals — higher trust unlocks better inventory and lower hidden risk0–100 running score
Generation

Per-day supplier pool

Listings are generated fresh each broker day. Category, brand model, condition, and risk are randomised within calibrated ranges so every sourcing decision feels distinct.

Margin preview

Live profit projection

Before you lock a purchase, the UI shows your projected gross profit based on the item's expected sell price relative to list price plus inbound shipping. The projection updates as you apply filters.

Trust system

Supplier reliability tracking

Each supplier has a persistent trust score that compounds across days. High-trust suppliers surface premium inventory and carry lower hidden risk multipliers — building long-term supplier relationships is a core meta-game lever.

Filtering

Sort by landed cost · condition · risk · trust

The SupplyNet UI surfaces the most actionable comparison axis per deal context. When the daily event boosts dispute risk, experienced brokers sort by condition first, not price.

Negotiation system

The BrokerRoom is a deal desk where a queued client opens negotiations on the item you sourced. You have a finite number of rounds before the client exits — every message you send is parsed by an intent classifier, which maps your text to one of eight intent categories and updates the client's mood, leverage score, and response posture accordingly. Three distinct client personalities — Friendly, Analytical, and Aggressive — process the same intents in meaningfully different ways.

BrokerRoom — initial client contact, Amira Costa (Friendly)
Initial contact — Amira Costa (Friendly) opens with a budget and condition target. The deal desk shows client mood and leverage before any counter has been made.
Active negotiation — back-and-forth counter-offers with round counter visible
Mid-negotiation — counter-offers in progress. Client is holding at $15,350 asking price; the round counter is ticking down.
Broker → Classifier (intent types)
"discount"Push for a lower price — client mood response depends on personality and current leverage
"shipping"Negotiate who absorbs shipping cost — Analytical clients respond well, Aggressive clients may escalate
"trust"Appeal to relationship history — more effective with clients tied to high-trust past deals
"meet-middle"Propose a midpoint split — most reliable intent for closing without burning mood
"walk-away"Signal willingness to end the deal — raises leverage if credible, but Aggressive clients may call it
"threat"Apply pressure — effective against Friendly clients short-term, backfires with Aggressive
"accept"Close on the current offer — moves the item to Warehouse phase immediately
"counter"Submit a specific price or terms counter — triggers a classifier-weighted response
Client personalities
FriendlyResponds well to trust appeals and meet-middle offers. Budget-sensitive but relationship-driven — won't walk away easily unless mood bottoms out.
AnalyticalEvaluates shipping cost and condition score most heavily. Discount-resistant on price alone; address the total cost of ownership to move them.
AggressiveOpens hard, responds to strength. Walk-away threats can work but will be called if your leverage is low. Easiest to close fast if you match their energy.
Round limit

Finite negotiation window

Each client enters with a fixed round budget. When rounds expire, they exit — you lose the deal even if terms were close. Pressure management and pacing matter as much as price strategy.

Mood tracking

Per-client mood state

Client mood shifts with each intent received. A Friendly client pushed with a threat drops mood sharply; an Aggressive client pushed the same way holds position. Mood gates what responses are available to the client each round.

Leverage

Dynamic leverage score

Your leverage score rises when you signal credible alternatives (walk-away, competing offer) and falls when you over-discount or plead. Higher leverage shifts the probability distribution on client concessions.

Daily modifier

Event-driven difficulty

The BrokerSIM Daily newsletter publishes a demand boost that raises client budgets, or a dispute boost that tightens their tolerance for condition or shipping risk. Negotiation difficulty is never fixed.

Warehouse & fulfillment

Once a deal closes, the game switches to a Three.js WebGL scene — a first-person warehouse where you physically carry the item from its inbound shelf to the dispatch station. WASD movement, a pickup interaction, a shipping method selection panel on the right, and a real-time dispatch checklist turn the fulfillment step into a tactile layer on top of the abstract deal mechanics. Warehouse complexity is where physical skill replaces negotiation skill.

3D warehouse scene with GLTF models and shipping method panel
Warehouse phase — 3D scene with the item located on the grid, shipping method panel open (Economy Freight / Insured Priority / White Glove Courier), and dispatch checklist visible.
Warehouse with BrokerSIM Daily newsletter overlay showing market conditions
Opening-day warehouse with the BrokerSIM Daily overlay — market conditions for the session (demand boost active, dispute risk adjusted).
Engine

Three.js WebGL renderer

The warehouse is a Three.js scene embedded inside the React app. Scene setup, lighting, camera rig, and the render loop are fully isolated from React state — dispatch events bubble back up via a callback prop.

Movement

WASD + directional controls

Standard first-person WASD controls with on-screen directional buttons for touchscreen fallback. The player character navigates a grid-based warehouse floor to reach the inbound package location.

GLTF models

3D warehouse assets

Shelving units, package props, and the dispatch station are loaded as GLTF models. The item carried represents the specific category (watch, jewelry, etc.) from the deal terms passed in from BrokerRoom.

Shipping method

Economy · Insured Priority · White Glove

Three shipping tiers selectable before dispatch. Economy is cheapest but raises delay risk. Insured Priority covers damage disputes. White Glove Courier minimises all risk at a margin cost — pairs with high-trust client deals.

Dispatch checklist

Step-by-step fulfillment gating

The checklist — package picked, on dispatch pad, handling time — gates the dispatch button. This prevents dispatch before the player has physically completed the fulfillment sequence, making the 3D phase consequential rather than cosmetic.

Item info

Live deal context panel

A sidebar displays the item name, category, agreed price, and approved shipping method from the BrokerRoom phase. The warehouse knows what it's shipping and why — the data flows unbroken from sourcing through fulfillment.

Why a 3D warehouse in a broker game? Most broker/trading simulations are entirely abstract — numbers and dialogue. Adding a physical fulfillment layer turns dispatch into a skill expression, not a button-press. It also creates a natural design space for future upgrades: faster movement, better packing equipment, and damage inspection tools that reduce risk — all tied back to the Broker Profile progression system.

Day events & market conditions

At the start of each broker day, the BrokerSIM Daily newsletter publishes three market condition modifiers that shape the entire session. These aren't cosmetic — they directly alter client budget tolerance, shipping risk curves, and deal difficulty across every negotiation that day. Reading the daily briefing and adjusting your sourcing and negotiation strategy accordingly is the primary skill loop between sessions.

Modifier Effect Strategic response
Delay BoostIncreases inbound shipping transit time probability — raises the chance a supplier delivery is late, hitting satisfaction scoresPrefer higher-trust suppliers; choose Insured Priority or White Glove shipping
Dispute BoostTightens client tolerance for condition defects and shipping delays — more deals risk triggering formal disputes that burn reputationSource only high-condition items; Analytical clients are even more sensitive than usual
Demand BoostRaises client budgets and softens walk-away thresholds — the market is hot, clients are willing to pay above their stated capPush harder on price; walk-away threats are weaker today because clients really want the item
Daily briefing

BrokerSIM Daily newsletter

Displayed as a styled in-game newspaper overlay at the start of the warehouse phase. "Opening Day Spotlight" surfaces the current modifier trio with flavour text framing the day's market conditions narratively.

Compounding effects

Multiple modifiers stack

A day with both +Dispute and +Demand active creates a tense high-value environment: clients will pay more but won't tolerate any defects. The most profitable sessions also carry the highest downside risk.

Event history

Deal log carries context

The deal log records which session conditions were active when each deal was closed. Future analysis of deal outcomes against event history is the foundation for the planned longitudinal reputation consequence system.

Broker progression

The Broker Profile screen tracks your career stats — cash on hand, reputation score (0–100), current day, and deal streak. The office upgrade shop lets you spend profit on permanent improvements that reduce friction across all three game phases: better inspection equipment, a CRM suite that buffs negotiation, and packing tools that speed up warehouse dispatch.

Deal Log screen showing deal outcomes, profit calculator, broker stats, and office upgrades
End-of-day view — deal log entries with profit/satisfaction/status, the profit calculator, current broker stats ($2,077 cash · Day 2 · Rep 69 · +1 streak), and the office upgrade shop.
Office Upgrade Phase affected Mechanical effect
Inspection Lab LampSupplyNet sourcingReveals hidden condition defects on supplier listings before purchase — reduces surprise dispute risk
CRM Negotiation SuiteBrokerRoom negotiationSurfaces client mood history and previous deal terms — improves intent classifier accuracy and gives leverage advantage on repeat clients
Pro Packing BenchWarehouse dispatchReduces handling time requirement in the dispatch checklist and lowers packaging damage risk on Economy Freight shipments
Cash

Profit-driven progression

Your broker cash accumulates from closed deal margins minus shipping costs. Disputes deduct a penalty. Cash is the primary resource for purchasing office upgrades — every deal has a direct upgrade economy consequence.

Reputation

0–100 career score

Reputation rises with clean dispatch outcomes and satisfied clients, falls with disputes and walk-aways. Higher reputation unlocks premium supplier access, better client types, and higher-value daily events.

Deal streak

Consecutive clean deals

A running streak of dispute-free, on-time dispatches. Streak bonuses are flagged in the deal log and feed into reputation multipliers — breaking a streak on a bad day has real career cost.

Profit calculator

Buy · sell · shipping → ROI

The deal log includes an inline calculator for any deal: enter buy price, sell price, and shipping cost to see gross profit, margin percentage, and ROI. Useful for post-mortem analysis of individual negotiations.

Persistence is the next major milestone: Currently all broker stats reset on page reload. The planned localStorage save will persist cash, reputation, supplier trust scores, client history, deal streak, and office upgrade state across sessions — transforming the current vertical slice into a true long-form broker career.

Full tech stack

A fully client-side TypeScript app — no backend, no auth, no deployment complexity. The React 19 + Vite setup gives instant HMR during development; Three.js handles the 3D warehouse scene as an isolated module; all game logic is plain TypeScript functions operating on typed state objects.

React 19 TypeScript Vite Three.js WebGL GLTF / GLB Assets React Context CSS Modules
UI

React 19 + Vite

React 19's concurrent features handle the negotiation chat feed and live deal state updates. Vite provides sub-second HMR and a zero-config TypeScript pipeline. All routes are client-side.

3D

Three.js + WebGL

The warehouse scene is a Three.js PerspectiveCamera + WebGLRenderer embedded in a React ref. Scene lifecycle (init, animate, dispose) is fully managed by a custom hook so the 3D engine is invisible to the rest of the app.

Assets

GLTF / GLB models

Warehouse props (shelving, packages, dispatch station) are loaded via Three.js GLTFLoader. Models are versioned with the repo — no external CDN dependency. Category-appropriate item props match the sourced item type.

State

React Context game state

A single top-level context holds the full game state object — selected supplier, deal terms, broker profile, deal log, active events. Components subscribe to only the slices they need. No external state library required at this scale.

Types

Full TypeScript coverage

Supplier listings, client profiles, deal terms, intent categories, and outcome records are all strongly typed. The type system makes the data flow between phases explicit — SupplyNet outputs exactly what BrokerRoom expects as input.

No backend

Pure client-side simulation

Supplier generation, intent classification, event rolls, and outcome calculation are all deterministic TypeScript functions. This keeps the project zero-dependency on infrastructure — run it anywhere with npm run dev.

Status & roadmap

BrokerSIM is a playable vertical slice today: one full broker day — source, negotiate, dispatch, score — can be completed end-to-end. Core mechanics are coherent and testable. The primary gaps are persistence (no save between sessions), content depth (limited item categories and client pool), and longitudinal consequence (reputation doesn't yet carry meaningful cross-session effects).

Done

Full vertical slice

SupplyNet → BrokerRoom → Warehouse → Deal Log connected end-to-end. One complete broker day is playable from cold start. All three client personalities and the intent classifier are implemented and functional.

Done

3D warehouse scene

Three.js renderer with GLTF assets, WASD movement, pickup and dispatch interaction, shipping method selection, and real-time dispatch checklist — all wired into the React game state loop.

Done

Daily events system

BrokerSIM Daily with demand, dispute, and delay modifiers. Event values propagate through negotiation difficulty and shipping risk for the full session.

Next

Persistent broker career

localStorage (or IndexedDB) save for cash, reputation, supplier trust, client history, deal streak, and office upgrades. Session persistence turns the demo into a career game.

Next

Content expansion

More item categories, more client personas, richer event types, and a balancing pass on margin curves and shipping risk probability distributions. More content depth extends replayability.

Next

Longitudinal reputation

Negotiation history and deal outcomes carrying real consequences across multiple sessions — repeat clients remember past deals, supplier trust degrades after bad outcomes, reputation gates unlock at defined thresholds.

Try BrokerSIM

Clone the repo and run locally — it starts with a single npm run dev. No backend, no accounts, no setup beyond Node.js. One full broker day playable immediately.

GitHub Repo → View Projects