← All projects

Storybook

One of six developers on a shared REST API, through pull requests and code review; plus my web reader for it.

The Storybook reader's cover: Rat Adventure, Sewers of the Pizza Kingdom, with a drawing of a rat

“Storybook” is the name of this interactive-fiction project. It is not related to the Storybook UI component tool.

The team API

Storybook is a choose-your-own-adventure game built as a team project. The point was working on one codebase with other people: small pull requests, code review, merge conflicts, and changing the API without breaking anyone else’s code. Six of us made 117 pull requests to one shared REST API. I authored 25 and reviewed 20. The team’s repo belonged to the class, so it isn’t public.

My part:

  • The story. I expanded it into Rat Adventure: Sewers of the Pizza Kingdom, a 51-scene branching story across 5 zones with 8 endings.
  • Endpoints, each with Jest tests: scenarios, scene choices, NPC dialog, zones and player location state.
  • Database design. I normalized the story data into zones, scenes, choices and endings tables.
  • A zero-downtime data move. I moved the items catalog from Supabase (Postgres) to MongoDB in three released steps (expand, switch, contract), so teammates’ code kept working at every point.
  • Team tooling. ESLint and a lint check on every pull request. Every change shipped with a semantic-version bump.

Code review

Most of my reviews were quick approvals, but a few caught real problems: a release workflow that would never have run, and a change that made the whole test suite exit with zero tests when there was no .env file.

The web reader

The reader plays the story live from the team API. The API kept changing while I built it, so the reader expects that: one typed client is the only file that knows response shapes, every page handles loading, errors and empty data, and quests show only when their endpoint answers. I wrote its design document first, brainstorming it with Claude and approving it before any code, and Claude Code built it from a task-by-task plan.

The Storybook web reader playing a scene, The Tunnel Mouths, with three choices
A scene in the reader, with three choices.