speakid-story-builder
v1.0.12
Published
Story Builder - Interactive story game for English practice (SPEAKID)
Maintainers
Readme
Story Builder
Interactive story game for English practice (SPEAKID). The story is chosen first; it defines which questions the student answers. Answers are then woven into a comic-style story.
Flow
- Lobby — Play
- Play — Pick a random story → story provides
inputKeysandcomprehensionQuestions→ show Questions (5 inputs, first is always "What is your name?") - Story — Slides with substituted answers; prev/next navigation
- Comprehension — Questions about the story (if any)
- End — Try again (new story) | Return to lobby
Tech
- React 18+, TypeScript, Vite
- Layout: 1280×720 base, scaled to viewport; portrait mobile shows "Please rotate your device"
- CSS Modules, all selectors under
.rootfor NPM host isolation
Dev
npm install
npm run devOpen http://localhost:5174
Build (library)
npm run buildOutput: dist/ (ES + CJS + types + style.css).
Use as NPM
import { StoryBuilder } from "speakid-story-builder";
import "speakid-story-builder/style.css";
<StoryBuilder
questions={questions}
stories={stories}
onEvent={(e) => console.log(e)}
/>Data
- Question bank:
Question { id, answerKey, text, placeholder? }. Stories reference keys (e.g.name,goal,problem). - Stories:
Story { id, slides, inputKeys, comprehensionQuestions? }.inputKeysis the list of answer keys needed (e.g.["name", "goal", "problem", "food", "place"]); first should bename.
