Credit: @paparichens
AffixIO Access Arena is a local educational simulation of venue-wide access control. It runs as a first-person 3D browser experience with a FastAPI backend that verifies synthetic credentials using mock proof flows.
The simulation demonstrates how proof-based policy checks can allow or deny access across parking, entrances, seating, VIP spaces, backstage zones, canteen redemption, green-room security, and a live security operations room.
- All data is fictional and local.
- Wallets, tickets, proofs, nullifiers, and signatures are synthetic.
- Post-quantum signature logic is simulated and clearly labelled as such.
- No real identities, real tickets, NHS data, external credentials, or secrets are used.
- Audit events intentionally exclude PII and raw credential material.
- Python 3.12
- FastAPI + Uvicorn
- Vanilla JavaScript + Three.js
- WebSocket event stream for live telemetry
- Three.js open-source post-processing pipeline (EffectComposer + UnrealBloomPass)
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m uvicorn app.main:app --reloadOpen http://127.0.0.1:8000.
Copy .env.example to .env if needed:
cp .env.example .envAFFIXIO_SEED: deterministic simulation seed for repeatable tests and world behaviour.
- WASD: move
- Mouse: look
- Shift: sprint
- Space: jump
- E: interact with nearby scanner, kiosk, gate, or door
- M: minimap toggle
- H: controls help
- Tab: attack simulator (Security Admin only)
- Escape: unlock pointer lock for HUD interaction
At launch, choose:
- Cinematic mode: higher post-processing quality and bloom
- Performance mode: reduced post-processing for smoother frame rate
The HUD persona selector swaps the active local wallet and clearance tier without teleporting the player:
- Customer
- VIP Guest
- Crew / Staff
- Artist / Executive
- Security Admin
Each persona has a synthetic credential profile with opaque hashes only.
Each verification interaction can include one or more of:
- Ticket possession check
- 18+ age proof simulation
- Parking entitlement proof
- Role clearance proof
- Merkle inclusion proof against synthetic event root
- One-time nullifier spend protection for canteen meal redemption
- Simulated post-quantum signature policy check
- Node pulse gating (online, degraded, offline, revoked)
Proof steps are shown in the HUD inspector after each scan.
Security Admin can queue one controlled simulation attack against the next relevant scan:
- Replayed ticket
- Replayed meal nullifier
- Tampered Merkle leaf
- Forged role claim
- Expired credential
- Legacy cryptography warning
These are educational state mutations only. No exploit tooling is included.
All verification outcomes are pushed over WebSockets and rendered in:
- HUD event feed
- Security Operations Centre panel
Each event contains:
- timestamp
- zone
- checkpoint_id
- event_hash
- requested_action
- decision
- verification_method
- latency_ms
- signature_status
- attack_flag
app/
main.py
simulation/
engine.py
events.py
merkle.py
crypto.py
models.py
static/
index.html
css/arena.css
js/
main.js
scene.js
player.js
interaction.js
hud.js
minimap.js
audio.js
network.js
materials.js
props.js
vendor/
three.module.js
three.core.js
tests/
test_simulation.py
If the start button appears dead, look at the Uvicorn log.
- A
404on/static/vendor/three.core.jsmeans the browser is still using an old cached Three.js file. - Current Three.js is bundled into
app/static/vendor/three.module.js. That file must load with a200, not a304from an older copy. - Restart Uvicorn, then hard-refresh the browser (Ctrl+Shift+R) on
http://127.0.0.1:8000.
pytestCoverage includes:
- role clearance checks
- Merkle verification correctness
- nullifier replay protection
- attack injection behaviour
- audit-log PII restriction checks
Build and run:
docker build -t affixio-access-arena .
docker run --rm -p 8000:8000 affixio-access-arena