> For the complete documentation index, see [llms.txt](https://reverie.gitbook.io/wall-usdstreet-on-rh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reverie.gitbook.io/wall-usdstreet-on-rh/investors/technology.md).

# Technology

The stack, the guards, and what runs in CI.

![Architecture](https://934907292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fgl9HiYsbYNCbL7plUYQv%2Fuploads%2Fgit-blob-85cf335e1ff794969b0f4a595c2e214d932d82b0%2Farchitecture.svg?alt=media)

## The stack

| Half       | Built on                                                                                                              |
| ---------- | --------------------------------------------------------------------------------------------------------------------- |
| **Client** | Phaser 3 · Vite · TypeScript. Browser, desktop and mobile                                                             |
| **Server** | Cloudflare Worker + per-zone Durable Objects + D1 (SQLite)                                                            |
| **Chain**  | $STREET, an SPL token on Solana; Phantom is the wallet and the identity. No mint published — the game runs on credits |

Both halves ship with one command each once a Cloudflare account is logged in. The Worker bundles clean at roughly 460 KiB gzipped with both bindings resolving, and migrations apply cleanly to an isolated SQLite-backed D1.

## Server authority

The server computes prices, fills, spreads, margin, liquidation, P\&L and payouts. The client renders and sends intents. This is the property that makes both the PvP economy and the claims rail defensible: there is no client-side truth to forge, and every claim is keyed to a server-computed outcome.

## Art and audio

**All of it is generated in code.** No pre-made media is carried over, which keeps the download small, the licensing surface at zero, and the city consistent — a footprint picks its tower from its own position, so the same block is always the same building.

## Production safety

* The client's server URL comes from the build environment. A production build **fails** if it is missing, and rejects non-WSS and localhost URLs.
* There is no runtime override of the server URL.
* Deploys are blocked by an infrastructure guard while the configuration names any project or database belonging to a repository this engine was seeded from. That guard is the only reason those names appear anywhere in the tree, and nothing is ever written back to them.

## What runs before a ship

* Unit and rule tests over the economy modules, so the published economy numbers are generated from the constants the game runs on rather than typed by hand.
* A **vocabulary test** that walks every table carrying authored prose and fails the build on seed fiction, or on any suggestion that somebody died.
* A **no-pay-to-win test** that fails if a purchasable item ever grows a stat, and a seat-gate test asserting the gate list contains no stat, fill, price or probability.
* An economy simulation gate over long horizons and larger populations.
* A 20-player load and reconnect gate, and a focused escrow crash proof.
* A claims smoke suite that asserts both the armed and disarmed states and branches on what is actually configured.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://reverie.gitbook.io/wall-usdstreet-on-rh/investors/technology.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
