Storybook AI — Personalized Story-Based Learning Platform
One Student → One Learning Profile → Infinite Personalized Learning Experiences. Storybook AI turns any curriculum topic into a narrative built around each student's own interests, powered by the same Gemini infrastructure as the Analytics & AI Copilot Platform (Chapter 22). Entirely Elite tier.
Implementation note: audio/video story formats and AI-generated illustrations are BRD-specified as future formats — this pass ships text stories with structured interactive elements and post-story quizzes, reusing controllers/aiInsightController.js's Gemini call/JSON-parse/fallback pattern rather than a new AI client. Camera-based story illustration and TTS narration are deferred to a fast-follow, matching the BRD's own note that text and illustrated formats are the primary delivery mode for now. Privacy note: a personal story generated for a student sets generatedFor to that student's ID — this field, not the descriptive libraryVisibility tag, is what the library, recommendations, and assignment queries actually filter on to keep one student's personal stories from leaking into another student's view.
Features
Story Generation & Interest Profile
- Student sets an Interest Profile (interests, career aspirations, learning preferences, language, difficulty) — a default profile is used as fallback
- Free-text or curriculum-topic story requests (e.g. "Explain Fractions") generate a personalized narrative via Gemini, embedding the concept in the student's interests
- Falls back to a lightweight curriculum-library story if Gemini is unavailable or slow
- Web: /dashboard/student/storybook, /dashboard/student/storybook/profile — Mobile: storybook.tsx, storybook-profile.tsx
Story Reader, Sessions & Adaptive Difficulty
- 12 story types (adventure, mystery, sci-fi, sports, mission-based, etc.), with embedded interactive elements and a 5-question post-story quiz
- StorySession tracks completion %, time spent, interaction count, and quiz score per read
- Adaptive Difficulty Adjustment: a session quiz score below 70% steps the student's profile difficulty down one level; ≥85% steps it up, for the next story on any topic
- Web: /dashboard/student/storybook/story/{storyId} — Mobile: storybook-reader.tsx
AI Storybook Copilot
- In-session real-time adaptation: "Explain differently", "Make it simpler", "Give another example", "Convert to a game", "Convert to a comic", or a new setting (e.g. "Explain with cricket")
- Regenerates content instantly via Gemini without losing session progress; copilot interaction count is tracked on the session
Teacher Storybook Studio & Assignments
- Teachers generate stories for a topic/grade/curriculum, edit the draft, then approve it into the school library
- Assign an approved story to a class, grade, or specific students with an optional due date; assignment resolves and denormalizes the student roster at creation time
- Notifications fire to students and their linked parents on assignment, and to the assigning teacher + parent on completion
- Web: /dashboard/teacher/storybook, /storybook/assignments, /storybook/analytics — Mobile: (teacher)/storybook.tsx
Parent Storybook Mode
- Parents view their child's assigned stories and recent reading sessions (explicit parentOf check, not a bare role check)
- Read-Together: parent joins an in-progress session, flipping isParentPresent for consent-logged shared reading
- Web: /dashboard/parent/storybook — Mobile: (parent)/storybook.tsx (reuses the existing useChildSwitcher hook)
Storybook Analytics & Library Moderation
- Student: stories read, time spent, completion rate, engagement score, avg quiz score, topic retention delta
- Teacher: per-assignment completion & quiz stats, topic coverage — School: adoption rate, subject performance, pending-approval queue
- Admin/Super Admin moderate every unapproved story school-wide and approve into the published library
- Web: /dashboard/teacher/storybook/analytics, /dashboard/admin/storybook
API Reference — Chapter 24
Interest Profile & Story Generation (Elite)
/api/storybook/profileGet the current student's interest profile (default fallback if unset)
/api/storybook/profileUpdate interest profile — interests, aspirations, learning style, language, difficulty
/api/storybook/generateStudent requests a personalized story for a topic
/api/storybook/libraryBrowse the story library (filters: subject, gradeLevel, language, storyType, curriculum, search)
/api/storybook/library/:storyIdGet a single story
Sessions & Copilot (Elite)
/api/storybook/session/startStart a reading session for a story
/api/storybook/session/:sessionIdUpdate progress — completion %, time spent, interactions
/api/storybook/session/:sessionId/completeMark complete, record quiz score, trigger adaptive difficulty adjustment
/api/storybook/copilotIn-session AI adaptation — explain differently, simpler, gamify, comic, new setting
/api/storybook/recommendations/:studentIdPersonalized follow-up story recommendations
/api/storybook/history/:studentIdReading history (self, or parent/teacher/admin viewing a student)
Teacher Studio & Assignments (Elite)
/api/storybook/teacher/generateTeacher generates a story for a class/grade/curriculum
/api/storybook/teacher/:storyIdEdit a draft story before approving
/api/storybook/:storyId/approveApprove a story into the published school library
/api/storybook/assignmentsAssign a story to a class, grade, or specific students
/api/storybook/assignmentsList assignments — teacher: created; student: received
/api/storybook/assignments/:assignmentIdAssignment detail with completion stats & avg quiz score
Parent Storybook Mode (Elite)
/api/storybook/parent/child/:studentIdChild's assignments & recent reading sessions (parentOf-checked)
/api/storybook/parent/session/:sessionId/joinJoin a Read-Together session (parentOf-checked)
Analytics (Elite)
/api/storybook/analytics/student/:studentIdStories read, time spent, completion & retention rate, avg quiz score
/api/storybook/analytics/classTeacher: per-assignment completion & quiz stats, topic coverage
/api/storybook/analytics/schoolAdmin/Super Admin: adoption rate, subject performance, pending approvals
Frontend Pages
| Path | Role | Description | Tier |
|---|---|---|---|
| /dashboard/student/storybook | Student | Storybook Home — request a story, see recommendations | Elite |
| /dashboard/student/storybook/story/{storyId} | Student | Immersive story reader with in-story quiz & AI Copilot | Elite |
| /dashboard/student/storybook/library | Student | My Story Library — full reading history | Elite |
| /dashboard/student/storybook/profile | Student | Interest Profile management | Elite |
| /dashboard/teacher/storybook | Teacher | Storybook Studio — generate, review & approve | Elite |
| /dashboard/teacher/storybook/assignments | Teacher | Create & track story assignments | Elite |
| /dashboard/teacher/storybook/analytics | Teacher | Assignment usage & performance analytics | Elite |
| /dashboard/parent/storybook | Parent | Child's assigned stories, recent sessions, Read-Together | Elite |
| /dashboard/admin/storybook | Admin / Super Admin | School-wide library moderation queue & adoption analytics | Elite |
Mobile
Under app/(student)/:storybook.tsx (request & recommendations),storybook-reader.tsx (reader + copilot + quiz), andstorybook-profile.tsx (interest settings). Under app/(teacher)/: a combinedstorybook.tsx studio screen. Underapp/(parent)/: storybook.tsx, built on the pre-existing useChildSwitcher hook. Admin school-management screens are web-only for this chapter, consistent with how other school-wide moderation and analytics surfaces are handled elsewhere in the app.