The Story Bible Builder is an interactive, single-page web application designed to teach YAML syntax through a narrative-driven exercise. Users learn to format data by building components of a fictional "Story Bible" (characters, inventories, and lore).
The app alternates between read-only Lessons (Examples) and interactive Challenges, providing immediate, highly specific feedback on the user's code.
index.html).Shift-Enter inside the editor to submit their answer or proceed to the next step, while standard Enter preserves the ability to create new lines in the YAML code.The application state is driven by a steps array containing objects. Each object represents one screen in the app.
{
type: String, // "example" or "challenge"
title: String, // Main heading (e.g., "Lesson 1: Character Basics")
text: String, // Instructions or lore context
mode: String, // UI hint (e.g., "Challenge (Editable)")
code: String, // (Example only) The text to display in the editor
initialCode: String, // (Challenge only) Starting code for the user to edit
validate: Function, // (Challenge only) Takes user string, returns { isCorrect: Boolean, message: String }
successMsg: String // (Challenge only) Message shown on correct answer
}