Skip to content

How the pieces fit

Retro PC is one pnpm and Turborepo monorepo: three running programs, a set of shared packages, and Rust crates for the game rules.

Browser Server
─────── ──────
apps/web (React + Vite) apps/server (Node: Fastify + Socket.IO)
│ desktop, windows, apps, │ Messenger, conversations, games,
│ Retro Web sites │ calls, uploads, Zone
│ │
│ HTTPS + one WebSocket ───────────┤
│ │ Redis bridge
│ logon, accounts, files ──────────┤
│ apps/core (Rust: retro-core)
│ logon, sessions, accounts,
│ files, Retro Mail
▼ ▼
packages/luna-ui packages/protocol ◄── both servers and the browser
packages/games-ui packages/games-core, games-wasm, games/*
packages/emoticons crates/games/* (Rust rules, built to WebAssembly)

Behind the servers are PostgreSQL, Redis and S3-compatible object storage. Caddy sends each route to the server that owns it.

Folder Package Is
apps/web @retro/web The browser app: shell, window manager, every app and every Retro Web site
apps/server @retro/server Node server: HTTP API and the Socket.IO gateway
apps/core retro-core Rust server: logon, accounts, sessions, files and Retro Mail
apps/docs @retro/docs This site

Servers explains how Node and Rust split the work.

Package Is Used by
@retro/protocol Zod schemas and types for every request, socket call and event web, server
@retro/luna-ui The Luna component kit: windows, menus, lists, controls, tokens web, games-ui
@retro/emoticons Emoticons, color tags and the safe rich-text renderer web
@retro/games-core The game contract and match engine, with no React everything games
@retro/games-wasm Every game’s rules and computer player, as WebAssembly games/*
@retro/game-<name> One game’s rules, re-exported from WebAssembly with its types web, server
@retro/games-ui GamePanel and each game’s board web
@retro/arcade Rules and contracts for Retro Arcade web
@retro/doom The DOOM app’s engine contract, settings and keymap web
@retro/config Shared TypeScript presets everything
  • Packages never import from apps/*.
  • @retro/protocol depends on @retro/games-core, never the other way round.
  • Only @retro/games-ui among the game packages uses React.
  • The browser and server share types only through @retro/protocol. A changed event shape is a compile error on both sides.

@retro/luna-ui is Retro PC’s own component kit in the Windows XP “Luna” style. Every color, size and font is a --luna-* CSS custom property in src/tokens.css; components never use literal colors. Each component has a Storybook story (pnpm storybook), and Playwright tests its keyboard behavior there. The package README lists every component.