AI Storybook

AI Storybook • Detailed Page

Technical Implementation

The platform is built as a production-like architecture by our student Daria Korneeva, combining modern web engineering with local LLM deployment.

Back to homepage

Core Stack

  • Next.js App Router for UI and API endpoints.
  • PostgreSQL for persistent domain data.
  • vLLM + Qwen 3.5 35B A3B FP8 for local inference.
  • Docker Compose for reproducible local and VPS environments.

Data Layer

  • Users: auth identity and role model.
  • Books: title, plan JSON, generated text, publish state.
  • Chat messages: multi-turn planning history.
  • Generation jobs: status tracking, retries, and failure details.

Security Baseline

  • Argon2id password hashing.
  • JWT in httpOnly cookies with production Secure flag.
  • Schema validation for all key request payloads.
  • Rate limiting for auth, chat, and generation routes.

AI Pipeline

  • Streaming planning chat for real-time UX feedback.
  • Explicit finalization step to lock story plan.
  • Structured plan validation before generation.
  • Job-based long generation with controlled retries.

Deployment Model

  • Local Docker first, VPS migration second.
  • App as public entrypoint, DB and LLM on internal network.
  • Single codebase and API contracts across environments.
  • Designed for future monitoring and reliability extensions.