Try it in your browser (no install): https://tqthinh704.github.io/haunted-bbs/docs/demo/ (the real BBS core running on SQLite-in-WASM; run the server for telnet and real multi-user chat)
Inspiration
Before the web, people met on Bulletin Board Systems: you dialed in, read the message boards, chatted with whoever else was online, and played "door games". BBSes died with dial-up, but the format (small, text-only, a single place you visit on purpose) still works. I wanted to bring one back that you can reach the old way (a real telnet client) and the new way (a browser tab), with both kinds of user in the same room.
What it does
- Two ways in, one BBS.
telnet localhost 2323orhttp://localhost:8023. Both reach the same server, the same SQLite boards, and the same chat room. - The full 90s loop: ANSI welcome screen with a 2400-baud modem handshake, a handle login (no passwords; optional PIN hashed with scrypt), and single-key menus.
- Message boards: The Crypt, Séance Room, and Lost & Found, with paged thread lists, reading, new threads, and replies.
- Who's Online + Whispers: see who's connected and whether they're on telnet or the web, and chat live between the two.
- Door game, Graveyard Shift: five choices between midnight and dawn, with a daily high-score table.
- SysOp CLI: seed boards, broadcast, kick.
- Accessibility and safety:
PLAINmode removes ANSI color for screen readers; every screen has a plain-text twin. User text has ESC/C0 controls stripped, lines are capped at 240 chars, and each connection is rate-limited.
How we built it (how Kiro was used)
Steering first. Before any code, three steering files in .kiro/steering/ (all inclusion: always) fixed the rules: product.md (features, tone, non-goals), tech.md (Node 22 ESM, only better-sqlite3 and ws, a transport-agnostic src/core that may never import net or ws, telnet IAC handling, sanitizing, scrypt PINs), and structure.md (the layout). These visibly shaped the output: the core talks to an abstract Session with write()/onInput(), and the telnet and WebSocket transports are thin adapters, so the whole BBS can be driven in tests with no sockets.
One spec, generated by Kiro. From the steering, Kiro wrote .kiro/specs/haunted-bbs/: requirements.md (user stories with numbered EARS-style acceptance criteria), design.md (Session interface, module list, SQL schema, telnet negotiation bytes, WebSocket bridge, error table, testing strategy), and tasks.md (15 incremental tasks, each citing the requirements it satisfies).
Kiro CLI ran the tasks. I ran kiro-cli chat --no-interactive in three batches (tasks 1–5, 6–10, 11–15). For each task Kiro implemented the code, wrote node --test tests, ran them until green, and ticked the box in tasks.md. Test counts after each batch: 66 → 154 → 177.
Hooks. .kiro/hooks/test-on-save.json runs the test suite when anything under src/core or src/db is saved, and asks the agent to create a companion test when a new core module appears. .kiro/hooks/ansi-guard.json runs scripts/check-art.js on every art/*.ans save (80-column limit plus a plain-text twin), and a Stop hook makes the agent append a dated entry to KIRO.md.
Where the spec wasn't enough, and what we did about it. All 177 unit tests were green, but a live telnet session showed that sub-screens never handed control back to the menu. Each module had been tested alone, so the hand-off was never exercised. I wrote that up as a bug report for Kiro, which added a done() contract plus test/e2e/session-flow.test.js, which drives whole sessions through an in-memory transport. Recording the video then caught two more cross-module bugs (posts and scores weren't attributed to the logged-in user, and a TEXT-vs-INTEGER comparison emptied the leaderboard). New e2e tests fail on the old code and pass now: 201 tests in total. Kiro's free monthly credits ran out partway through the first fix, so the last few fixes were done by hand; KIRO.md records exactly which parts were Kiro and which were manual. The lesson I took: put cross-module contracts in their own spec task with an end-to-end acceptance test.
Challenges
- Telnet clients send IAC negotiation, CR/LF/NUL variants, and two kinds of backspace. The transport strips IAC, normalizes line endings, and negotiates
WILL ECHOandWILL SUPPRESS-GO-AHEAD. - The modem animation sends one character per frame, so a CR and its LF can land in different WebSocket messages. The browser renderer had to treat output as a stream.
- Keeping every ANSI screen at 80 columns with a plain-text twin. The hook made that automatic.
Accomplishments
- One core, two transports: telnet and browser users chat in real time in the same room.
- 201 tests, including end-to-end session tests that cover every menu path.
- A complete, honest Kiro trail in the repo: steering, spec, task checkboxes, hooks, and
KIRO.md.
What we learned
Spec-driven development made the early work fast and consistent: each Kiro batch landed green, and the architecture rules held. Its blind spot was integration. Every task's tests stubbed the pieces around them. Next time I'll add an end-to-end acceptance task to the spec from the start.
What's next
A hosted instance, a public telnet port, more door games, and ANSI art made by users.
Run it
npm install
npm run seed
npm start # telnet :2323, browser http://localhost:8023
npm test # 201 tests
No login credentials are needed: pick any handle and press Enter to skip the PIN. The narration in the demo video is text-to-speech. All users and posts are fictional.
Built With
- ansi
- better-sqlite3
- javascript
- kiro
- node.js
- sqlite
- telnet
- websocket
