# 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 ```sh 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 (`|00`-`|15` fg, `|16`-`|23` bg, `|CL`) | | `src/screens/` | Welcome/logon, login, new user, main menu | | `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 / door game:** add a module under `src/screens/` that takes a `Session`, and wire a key to it in `src/screens/mainMenu.ts`. - **New tables:** add `db/migrations/002_whatever.sql`; it runs on next start. ## Database access ```sh 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`.