CH 24Elite

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

Elite
  • 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

Elite
  • 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

Elite
  • 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

Elite
  • 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

Elite
  • 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

Elite
  • 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)

GET/api/storybook/profile

Get the current student's interest profile (default fallback if unset)

PUT/api/storybook/profile

Update interest profile — interests, aspirations, learning style, language, difficulty

POST/api/storybook/generate

Student requests a personalized story for a topic

GET/api/storybook/library

Browse the story library (filters: subject, gradeLevel, language, storyType, curriculum, search)

GET/api/storybook/library/:storyId

Get a single story

Sessions & Copilot (Elite)

POST/api/storybook/session/start

Start a reading session for a story

PATCH/api/storybook/session/:sessionId

Update progress — completion %, time spent, interactions

POST/api/storybook/session/:sessionId/complete

Mark complete, record quiz score, trigger adaptive difficulty adjustment

POST/api/storybook/copilot

In-session AI adaptation — explain differently, simpler, gamify, comic, new setting

GET/api/storybook/recommendations/:studentId

Personalized follow-up story recommendations

GET/api/storybook/history/:studentId

Reading history (self, or parent/teacher/admin viewing a student)

Teacher Studio & Assignments (Elite)

POST/api/storybook/teacher/generate

Teacher generates a story for a class/grade/curriculum

PUT/api/storybook/teacher/:storyId

Edit a draft story before approving

PATCH/api/storybook/:storyId/approve

Approve a story into the published school library

POST/api/storybook/assignments

Assign a story to a class, grade, or specific students

GET/api/storybook/assignments

List assignments — teacher: created; student: received

GET/api/storybook/assignments/:assignmentId

Assignment detail with completion stats & avg quiz score

Parent Storybook Mode (Elite)

GET/api/storybook/parent/child/:studentId

Child's assignments & recent reading sessions (parentOf-checked)

POST/api/storybook/parent/session/:sessionId/join

Join a Read-Together session (parentOf-checked)

Analytics (Elite)

GET/api/storybook/analytics/student/:studentId

Stories read, time spent, completion & retention rate, avg quiz score

GET/api/storybook/analytics/class

Teacher: per-assignment completion & quiz stats, topic coverage

GET/api/storybook/analytics/school

Admin/Super Admin: adoption rate, subject performance, pending approvals

Frontend Pages

PathRoleDescriptionTier
/dashboard/student/storybookStudentStorybook Home — request a story, see recommendationsElite
/dashboard/student/storybook/story/{storyId}StudentImmersive story reader with in-story quiz & AI CopilotElite
/dashboard/student/storybook/libraryStudentMy Story Library — full reading historyElite
/dashboard/student/storybook/profileStudentInterest Profile managementElite
/dashboard/teacher/storybookTeacherStorybook Studio — generate, review & approveElite
/dashboard/teacher/storybook/assignmentsTeacherCreate & track story assignmentsElite
/dashboard/teacher/storybook/analyticsTeacherAssignment usage & performance analyticsElite
/dashboard/parent/storybookParentChild's assigned stories, recent sessions, Read-TogetherElite
/dashboard/admin/storybookAdmin / Super AdminSchool-wide library moderation queue & adoption analyticsElite

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.