AIStorinha

AIStorinha is a personalized, multimodal, and safety-first storytelling platform for children. It turns each child's real context into illustrated, narrated, and interactive stories, while also supporting families and educators with strong privacy, consent, and pedagogical alignment.

Inspiration

Bedtime stories are one of the most memorable rituals in childhood. But most children's content is still generic. It does not truly know the child, their interests, their age, their sensitivities, or what they are learning in school.

We wanted to build something more meaningful: not just a template that swaps a name, but a platform that can create stories around a real child and real educational context. We also wanted to prove that AI for children must be designed with safety, parental control, and consent at the product level, not added later as a patch.

That is how AIStorinha was born. The name combines "AI" with "historinha" ("little story" in Portuguese) because the product is meant to feel personal, warm, and imaginative, while still being technically robust.

What it does

AIStorinha creates personalized children's stories with illustrations, narration, and interactive reading experiences.

For families

  • Create child profiles with age, interests, preferences, sensitivities, and goals.
  • Generate stories through a guided wizard with narrative and visual parameters.
  • Listen to chapter-by-chapter narration with an integrated player.
  • Use an immersive reader with "Read to Me", progressive highlighting, seek by click/tap, and a story-first layout.
  • Export stories for offline use.
  • Manage privacy, consent, account export, and deletion flows.

For educators

  • Upload PDF and DOCX teaching materials.
  • Use RAG to ground stories in real classroom content.
  • Generate stories aligned with curriculum and learning objectives.
  • Export materials for classroom use.

For children

  • Read illustrated stories in a mobile-first experience.
  • Listen to immersive narration with carefully controlled SFX and background music.
  • Interact with stories in real time through live mode using voice or text.
  • Use the product in multiple languages through a responsive PWA experience.

How we built it

AIStorinha is a full-stack monorepo built for real-world operation, not just a demo.

Architecture

  • Frontend: Next.js, TypeScript, Tailwind CSS, Framer Motion, Zustand, PWA support.
  • Backend: FastAPI API, async worker, WebSocket live gateway.
  • Data layer: PostgreSQL + pgvector, Redis, JSONB-based StoryDoc as the single source of truth.
  • Infra: Docker Compose for local parity, Google Cloud Run for deployment, Google Cloud Storage for assets.
  • Observability: structured logging, operational metrics, and OpenTelemetry.

AI runtime

AIStorinha uses a Gemini-only runtime in production. We intentionally avoided mixing multiple runtime providers so the platform stays more consistent, observable, and governable.

The project currently uses:

  • Gemini 3 Flash for default text generation and fast operational flows.
  • Gemini 3.1 Pro Preview for deeper reasoning paths.
  • Gemini 3.1 Flash Image Preview for illustrations.
  • Gemini 2.5 Flash Preview TTS for narration.
  • gemini-embedding-001 for RAG and retrieval.

Multi-agent orchestration

The platform runs with 9 consolidated agents, each with a defined role across briefing, story generation, review, safety, translation, audio, export, media, and retrieval workflows.

Product capabilities already implemented

  • personalized story generation;
  • illustration generation;
  • chapter narration;
  • immersive reader;
  • PDF, EPUB, and DOCX export;
  • pedagogical ingestion with RAG;
  • content catalog and marketplace foundations;
  • admin panel;
  • PWA support;
  • email/password and Google authentication flows.

Challenges we ran into

1. Coordinating long-running AI workflows

Story creation is not a single API call. It requires planning, drafting, review, safety validation, media generation, narration, and export. We had to build reentrant long-running jobs with persisted state so failures would not force the whole story to restart.

2. Keeping stories coherent across multiple steps

When different stages work on the same story, continuity can drift. We solved this with a StoryDoc JSONB model as the single source of truth plus a layered memory strategy that supports retrieval, rollback, and context packing.

3. Building safe AI for children

Children's products need stricter standards. We implemented two-step safety checks, profile-sensitive protections, consent tracking, PII redaction, server-side enforcement for export/delete flows, and fail-closed behavior for unsafe content.

4. Making audio feel immersive without hurting readability

Narration must stay dominant. SFX and music should enrich the experience without competing with speech. That required careful mixing logic, progressive highlighting by locale, click-to-seek synchronization, and a layout where the story always remains the focus.

5. Supporting real educational context

For educators, the challenge was not only file upload. We needed ingestion, embeddings, hybrid retrieval, and reranking so uploaded classroom material could meaningfully influence the story.

What we learned

  • Personalization is only credible when context is structured, not superficial.
  • Multi-agent systems need memory architecture and strong state management.
  • For children's AI products, safety, consent, and parental control must be first-class product features.
  • A single-provider runtime can reduce operational complexity and improve governance.
  • Audio is not an accessory in children's storytelling. For many children, it is the main interface to the story.

Current status

AIStorinha is no longer just a hackathon prototype. It is already a relatively broad multimodal platform with product surface, backend, observability, security, exports, live mode, RAG, and real production deployment on Cloud Run.

At the current baseline, core repository-driven surfaces have already been validated in production, including health checks, login/register, Google button rendering, immersive reader improvements, and the PWA banner fix.

The remaining honest residual is concentrated in the final external interactive proofs that require a real Google account and real consent, especially:

  • real Google login end-to-end with a valid account;
  • final Google Docs consent + code exchange validation.

What is next

  • expand live interactive storytelling;
  • deepen educator workflows and classroom use cases;
  • continue improving exports and video storytelling surfaces;
  • extend marketplace and discovery capabilities;
  • keep strengthening safety, governance, and multilingual experience.

AIStorinha shows what a modern children's AI product can look like when storytelling, education, multimodal UX, and safety are designed together from the start.

Built With

Share this project:

Updates