Skip to content

pujasingla/sprout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌱 Sprout — Kids Content Engine

Sprout is an AI-powered content generation platform that creates safe, age-appropriate educational videos for children. It uses a multi-stage pipeline with safety checks, human approval gates, and automatic voice/image generation.

Features

  • Age-Adaptive Content : Three tiers: Sprout (3-6), Explorer (6-10), Tween (10-13)
  • Safety-First Pipeline : Multiple safety checks before content is generated
  • Human Approval Gate : Review and edit scripts before final generation
  • Smart Voice Selection : LLM-powered voice matching based on content
  • Auto-Generated Visuals : Scene images created via Pollinations.ai
  • Content Nutrition Label : Parent-friendly rating breakdown
  • Provenance Manifest : Full audit trail of the generation process

Tech Stack

Backend:

  • Node.js + Express
  • Anthropic Claude (script generation, safety, voice selection)
  • ElevenLabs (text-to-speech)
  • Pollinations.ai (image generation)

Frontend:

  • React 18 + Vite
  • Tailwind CSS

Project Structure

sprout/
├── client/                 # React frontend
│   ├── src/
│   │   ├── components/     # UI components
│   │   │   ├── AgeTierSelector.jsx
│   │   │   ├── ApprovalGate.jsx
│   │   │   ├── BundleOutput.jsx
│   │   │   ├── ManifestViewer.jsx
│   │   │   ├── NutritionLabel.jsx
│   │   │   ├── PipelineProgress.jsx
│   │   │   ├── SafetyBlock.jsx
│   │   │   ├── SeedPicker.jsx
│   │   │   ├── SlideshowPlayer.jsx
│   │   │   └── StyleConfig.jsx
│   │   ├── App.jsx
│   │   └── index.css
│   └── tailwind.config.js
├── server/                 # Express backend
│   ├── pipeline/           # Content generation pipeline
│   │   ├── approvalGate.js
│   │   ├── bundleAssembler.js
│   │   ├── contentRatingEngine.js
│   │   ├── costTracker.js
│   │   ├── elevenLabs.js
│   │   ├── manifestWriter.js
│   │   ├── nutritionLabelWriter.js
│   │   ├── router.js
│   │   ├── safetyChecker.js
│   │   ├── scenePlanner.js
│   │   ├── scriptGenerator.js
│   │   ├── slideGenerator.js
│   │   ├── topicExtractor.js
│   │   ├── vocabularyChecker.js
│   │   └── voiceSelector.js
│   ├── bundles/            # Generated content storage
│   ├── manifests/          # Provenance manifests
│   └── index.js
├── shared/
│   └── types.js            # Shared type definitions
└── .env                    # Environment variables

Setup

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Anthropic API key
  • ElevenLabs API key

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/sprout.git
    cd sprout
  2. Install backend dependencies

    cd server
    npm install
  3. Install frontend dependencies

    cd ../client
    npm install
  4. Create environment file

    # In the root directory
    cp .env.example .env
  5. Configure environment variables

    # Required
    ANTHROPIC_API_KEY=your_anthropic_api_key
    ELEVENLABS_API_KEY=your_elevenlabs_api_key
    
    # Optional
    PORT=3001

Running the App

  1. Start the backend server

    cd server
    npm start
  2. Start the frontend dev server (in a new terminal)

    cd client
    npm run dev
  3. Open the app

    http://localhost:5173
    

Pipeline Stages

  1. Seed Discovery — Parse input topic
  2. Safety Check — Validate content is age-appropriate
  3. Voice Selection — LLM selects optimal voice for content
  4. Script Generation — Create scene-by-scene script
  5. Content Rating — Score on violence, fear, complexity, inclusivity
  6. Human Approval — Review, edit, approve, or reject
  7. Media Generation — Generate audio (ElevenLabs) + images (Pollinations)
  8. Assembly — Bundle all assets with manifest

API Endpoints

Content Generation

  • POST /api/generate — Start a new content generation
  • GET /api/status/:id — Get pipeline status
  • GET /api/bundle/:id — Get completed bundle

Approval

  • POST /api/approve — Approve content for generation
  • POST /api/edit — Submit edited scenes
  • POST /api/reject — Reject content

Voice

  • POST /api/voice-preview — Preview voice selection for seed
  • GET /api/voice-sample/:voice_id — Get voice audio sample

Downloads

  • GET /api/audio/:id — Stream audio
  • GET /api/download/audio/:id — Download MP3
  • GET /api/download/captions/:id — Download SRT
  • GET /api/slides/:id/:sceneId — Get slide image

Voice Library

Sprout includes 8 pre-configured ElevenLabs voices:

Voice Tiers Character Best For
Rachel Explorer, Tween Calm, friendly Educational explainers
Domi Explorer, Tween Energetic, playful Science, how-to
Bella Sprout, Explorer Warm, gentle Storytime, nature
Antoni Tween Friendly, calm History, social studies
Arnold Explorer, Tween Energetic, curious Adventure, space
Adam Tween Calm, authoritative Technology
Sam Sprout, Explorer Playful, warm Animals, art
Gigi Sprout Warm, gentle Preschool content

Content Safety

Sprout implements multiple layers of safety:

  • Input Safety Check — Blocks inappropriate topics before processing
  • Vocabulary Checker — Flags complex words for age tier
  • Content Rating — Scores violence, fear, complexity (0-5 scale)
  • Human Approval — Required before final generation
  • COPPA Compliant — All content adheres to children's privacy standards

License

MIT

About

Kids content engine - age-adaptive generative media pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors