A replicated BBS system
Go to file
Brian Fertig 0fe0f52a53
Add STARLANE door game and door framework
- Introduce a pluggable door system (src/doors/) with registry, menu, and DoorModule contract so games are self-contained and isolated from core BBS code
- Add STARLANE: a frontier space-trading door with universe generation, lane pathfinding, commodity trading/haggling, combat, planet seeding/bastions, syndicates, Reaver NPCs, and a world ticker
- Extend db.ts with transaction helper (withTx) and namespaced migrations so doors can ship their own SQL under src/doors/<id>/migrations
- Add shared UI widgets (box, menus, number/list prompts) and Session notice/promptChoice support for live cross-node messages
- Wire door init and migration into server startup, add copy-assets build step for SQL files, and update README/CLAUDE docs
2026-11-19 21:03:23 -07:00
db/migrations first commit 2026-11-18 18:12:13 -07:00
public first commit 2026-11-18 18:12:13 -07:00
scripts Add STARLANE door game and door framework 2026-11-19 21:03:23 -07:00
src Add STARLANE door game and door framework 2026-11-19 21:03:23 -07:00
.dockerignore Sysop Permissions 2026-11-18 18:41:57 -07:00
.env.example Sysop Permissions 2026-11-18 18:41:57 -07:00
.gitignore Sysop Permissions 2026-11-18 18:41:57 -07:00
CLAUDE.md Add STARLANE door game and door framework 2026-11-19 21:03:23 -07:00
Dockerfile Add STARLANE door game and door framework 2026-11-19 21:03:23 -07:00
README.md Add STARLANE door game and door framework 2026-11-19 21:03:23 -07:00
docker-compose.yml first commit 2026-11-18 18:12:13 -07:00
package-lock.json first commit 2026-11-18 18:12:13 -07:00
package.json Add STARLANE door game and door framework 2026-11-19 21:03:23 -07:00
tsconfig.json first commit 2026-11-18 18:12:13 -07:00

README.md

WarezHou$e BBS

A late-80s / early-90s style bulletin board system that runs in the browser. Dial in, hear the modem handshake, log on, and land on the main menu.

(303) 674-5489  ::  7 Nodes - 1.5 GB Online - HQ and Distro

Quick start

cp .env.example .env      # set a real POSTGRES_PASSWORD
docker compose up -d --build

Open http://localhost:8080 and press any key to dial. ESC skips the handshake.

How it works

  • app – Node.js/TypeScript. Serves the browser terminal (xterm.js) and a WebSocket at /ws. Each WebSocket is one caller on one node; the BBS logic runs server-side, the browser is a dumb terminal.
  • db – PostgreSQL 16, data in the bbs_pgdata volume.

Settings (.env): PORT, BAUD (simulated output speed, 0 = unthrottled), MAX_NODES, IDLE_TIMEOUT_MIN, and the Postgres credentials.

Layout

Path What
src/server.ts HTTP + WebSocket server, node allocation
src/session/Session.ts Per-caller I/O: baud-throttled output, hotkeys, line input
src/session/ansi.ts Pipe colour codes (`
src/screens/ Welcome/logon, login, new user, main menu
src/ui/ Shared widgets (boxes, menus, number prompts)
src/doors/ Door framework (registry.ts, doorMenu.ts) and one folder per door
src/doors/starlane/ STARLANE, a frontier space-trading door game
src/art/welcome.ts Welcome ANSI art
src/users/userRepo.ts User accounts (bcrypt), call log
db/migrations/ SQL migrations, applied automatically on start
public/ Browser terminal, CRT styling, synthesized modem audio

Adding things

  • New screen: add a module under src/screens/ that takes a Session, and wire a key to it in src/screens/mainMenu.ts.
  • New door game: create src/doors/<id>/index.ts exporting a DoorModule and add it to src/doors/registry.ts. See src/doors/CLAUDE.md.
  • New tables: core tables go in db/migrations/002_whatever.sql. A door keeps its own in src/doors/<id>/migrations/. Both run on next start.

Tests

npm test builds and runs the unit tests (pure game-engine logic, no database).

STARLANE

The first door. Trade between ports, haggle with brokers, fight Reavers and other callers, seed planets and build Bastions, form Syndicates. Turns refill daily. The universe is generated on first start. The Sysop (first account) can press Z in-game to edit pilots or trigger a Big Bang (new universe). Design notes live in src/doors/starlane/CLAUDE.md.

Database access

docker compose exec db psql -U bbs bbs

Font

For the full IBM PC look, install a VGA font such as "Px437 IBM VGA 8x16" locally (the page will use it if present), or add an @font-face for it in public/style.css.