Open-Source, Decentralized, Persistent Airline Management MMO on Nostr
ACARS is a real-world aviation simulation where players build and operate virtual airlines competing on actual routes worldwide. Built for millions of concurrent players with a fully deterministic, client-side game engine backed by the decentralized Nostr protocol.
- Deterministic Game Engine β O(1) macro-economic formulas (Gravity Model, QSI) for route demand and market share
- Fixed-Point Arithmetic β No floating-point drift; all financial calculations are cross-platform deterministic
- Nostr Integration β Decentralized identity via NIP-07, airline state stored as signed events with NIP-33 Snapshot Rollups for instant cross-device sync and state recovery.
- Relay-Backed Snapshots β Game state is compressed and attested via NIP-33 to avoid replaying thousands of historical events on every load.
- Real Airport Data β 6,072 airports from OpenFlights with population, GDP, and seasonal tags
- Interactive Globe β MapLibre GL map with virtualized airport selection
- Fleet Management β Purchase (BUY/LEASE), aircraft depreciation, and structural condition tracking
- Operations Ledger β Detailed financial event history persistent on Nostr (revenue/cost breakdowns)
- Maintenance System β Aircraft grounding based on wear-and-tear (Condition < 20%) or flight hours (>600h)
- Economic Safety Net β Chapter 11 bankruptcy status to pause operations during severe financial distress
- Suggested Pricing β Distance-aware fare intelligence with "Fix to Suggested" optimization shortcuts
- Route Scheduling β Real-time aircraft assignment and automated flight operations
- Corporate mechanics (IPO, M&A, stock trading, dividends)
- Alliance system with codeshares
- 3D CesiumJS cockpit view
- Procedural audio engine ("the music of your network")
- Bitcoin/Lightning monetization (Zaps, P2E pools)
ββββββββββββββββ
β apps/web β React 19 + Vite
β (UI Layer) β
ββββββββ¬ββββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β @acars/map β β @acars/store β β @acars/nostr β
β MapLibre GL β β Zustand β β NDK Adapter β
ββββββββββββββββ ββββββββ¬ββββββββ ββββββββ¬ββββββββ
β β
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
β @acars/core β β @acars/data β
β Pure Math β β Static Data β
β Zero Deps β β Airports β
ββββββββββββββββ ββββββββββββββββ
- No Central Database β All game state is a deterministic reduction of Nostr events
- 1:1 Real-Time β Game time equals UTC time; a 7-hour flight takes 7 real hours
- O(1) Math β Macro-economic formulas instead of passenger-by-passenger simulation
- Fixed-Point Only β Prevents floating-point desync across clients
- Virtualized UI β All lists use
@tanstack/react-virtualfor scale
- Node.js 20+
- pnpm 9+
- A NIP-07 browser extension (nos2x, Alby, or Nostr Connect)
# Clone the repository
git clone https://github.com/anabelle/acars.pub.git
cd acars
# Install dependencies
pnpm install
# Start development server
pnpm devOpen http://localhost:5173 and connect your Nostr extension to create your airline.
pnpm dev # Start web app in development mode
pnpm build # Build all packages
pnpm test # Run tests in watch mode
pnpm test:run # Run tests once
pnpm lint # Lint all packages
pnpm typecheck # Type-check all packages
pnpm clean # Remove all build artifactsThe web application can be built as a native Android app using Capacitor.
cd apps/web
pnpm run build # 1. Build the production web bundle
npx cap sync android # 2. Sync the web bundle into the Android project
npx cap open android # 3. Open Android Studio to build the .aab/.apkacars/
βββ apps/
β βββ web/ # React 19 frontend (TanStack Router)
β β βββ src/
β β βββ app/ # Global app setup (Providers, Router)
β β βββ routes/ # TanStack Router file-based routes
β β βββ shared/ # Reusable UI (buttons, cards, layout)
β β βββ features/ # Feature modules (fleet, network, etc.)
βββ packages/
β βββ core/ # Pure game engine (zero dependencies)
β β βββ src/
β β βββ fixed-point.ts # Currency arithmetic
β β βββ demand.ts # Gravity model
β β βββ qsi.ts # Market share allocation
β β βββ finance.ts # Revenue & costs
β β βββ fleet.ts # Depreciation & book value
β β βββ ...
β βββ data/ # Static data catalogs
β β βββ src/
β β βββ airports.ts # 6,072 airports
β β βββ aircraft.ts # 15 aircraft models
β βββ map/ # MapLibre GL components
β β βββ src/Globe.tsx # Interactive globe with routes
β βββ nostr/ # Nostr I/O layer (NDK)
β βββ store/ # Zustand state management
βββ docs/
β βββ DESIGN_PRINCIPLES.md # Gameplay vision & UI targets
β βββ ECONOMIC_MODEL.md # Math behind demand, QSI, costs
β βββ CORPORATE_MODEL.md # Wall Street mechanics (M&A, IPOs)
β βββ FLEET_MANAGER_PLAN.md # Aircraft lifecycle
β βββ MONETIZATION_MODEL.md # Bitcoin/Lightning revenue
β βββ SCALABILITY.md # Map/rendering scaling strategy
β βββ ROADMAP.md # Development phases
βββ .agent/ # Agent development coordination
βββ AGENTS.md # AI agent onboarding guide
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, TypeScript |
| State | Zustand |
| Map | MapLibre GL |
| Virtualization | @tanstack/react-virtual |
| Networking | Nostr (NDK) |
| Identity | NIP-07 (nos2x, Alby) |
| Testing | Vitest |
| Package Manager | pnpm workspaces |
Demand = K Γ (Pop_A^Ξ± Γ Pop_B^Ξ² Γ GDP_A^Ξ³ Γ GDP_B^Ξ΄) / Distance^ΞΈ
Where:
- K = 5.995e-7 (tuned against BOG routes)
- Ξ±, Ξ² = 0.8 (population exponents)
- Ξ³ = 0.6, Ξ΄ = 0.3 (GDP exponents)
- ΞΈ = 1.0 (distance decay, linear)
Airlines compete on: price, frequency, travel time, stops, service quality, and brand reputation. Each factor is weighted differently for economy, business, and first-class passengers.
- Revenue: Ticket sales + ancillary ($20/pax)
- Costs: Fuel, crew, maintenance, airport fees, navigation, leasing, overhead
See docs/ECONOMIC_MODEL.md for full specification.
We welcome contributions! Please read:
AGENTS.mdβ Engineering rules and constraintsdocs/AGENT_DEVELOPMENT_PARADIGM.mdβ Branching, linting, testing guidelines
Every feature must answer: "If 10,000 players fire this event simultaneously, will it break the math, melt the DOM, or desync the Nostr state?"
| Document | Purpose |
|---|---|
| DESIGN_PRINCIPLES.md | Gameplay vision, engagement loops, sensory design |
| ECONOMIC_MODEL.md | Gravity model, QSI, fixed-point costs |
| CORPORATE_MODEL.md | IPOs, M&A, bankruptcy, stock mechanics |
| FLEET_MANAGER_PLAN.md | Aircraft depreciation, maintenance, commonality |
| MONETIZATION_MODEL.md | Bitcoin/Lightning revenue streams |
| SCALABILITY.md | Map and rendering scaling strategy |
| UI_ARCHITECTURE.md | Frontend stack and cross-platform strategy |
| TYCOON_UI_ARCHITECTURE.md | Enterprise-grade UI layout and data density |
| AGENT_DEVELOPMENT_PARADIGM.md | Multi-agent coordination and safety contracts |
| RESEARCH_SOURCES.md | Bibliography and reference sources |
| SNAPSHOT_ROLLUP_ARCHITECTURE.md | NIP-33 attested snapshot rollup system |
| ROADMAP.md | Development phases and milestones |
- Issues: use GitHub Issues for bugs and feature requests
- Security: see
SECURITY.md - Code of Conduct: see
CODE_OF_CONDUCT.md
Screenshots and short clips will be added as the UI stabilizes. If you'd like to contribute media, please open a PR with assets in docs/media.
MIT
The Prime Directive: Every commit must respect the millions-scale constraint. No O(NΒ²) loops. No floating-point money. No central database. The game state must be reproducible from the Nostr event log alone.