Twilight Tales

OpenAI Build Week

Twilight Tales was built iteratively with Codex and existed before OpenAI Build Week. During the July 13–21 submission period, I used Codex to trace issues across the interface, API routes, story contracts and persistence; implement focused reliability, parent-control and safeguarding improvements; expand regression coverage; and prepare reviewable pull requests. I set the product behaviour, child-safety priorities and release decisions.

The application source uses the GPT-5.6 family for active OpenAI text workloads through a shared model policy. Story generation uses the Responses API with structured outputs, storage minimisation, validation and deterministic fallbacks.

Inspiration

The idea for Twilight Tales began around 15 years ago, when I created personalised storybooks by hand for children in my neighbourhood. The response from families was wonderful, but producing every story manually made the idea impossible to scale.

As generative AI developed, I realised the original concept could become a real product while preserving the personal connection that made those early stories special.

My experience as an IT engineer and school governor also shaped the project. I wanted to build something that uses AI responsibly, respects parents’ judgement and gives children calm, meaningful stories rather than overstimulating content.

What it does

Twilight Tales is a parent-guided storytelling platform that creates personalised stories for children and families.

Parents can shape a story around a child’s age, interests and everyday experiences, such as bedtime routines, school nerves, confidence, friendships or family transitions. The aim is to make stories feel personally relevant while keeping the experience warm, imaginative and emotionally safe.

Twilight Tales is not a diagnostic or therapeutic service. It is a family storytelling product with the potential to support positive conversations, routines and shared moments.

How I built it

I built the web application with:

  • Next.js, React and TypeScript
  • Tailwind CSS for the responsive interface
  • OpenAI Responses API with GPT-5.6 for structured story generation
  • Codex for tracing issues, implementing focused changes and expanding regression coverage
  • OpenAI text-to-speech for optional audio narration
  • Server-side validation and controlled generation instructions
  • Fallback and error-handling flows for a more reliable family experience

The product separates the parent-guided setup from the child-facing story experience. This allows adults to remain in control while children receive a simpler, calmer interface.

Challenges

The hardest challenge was not simply generating text—it was creating a trustworthy system around the model.

Personalisation must remain age-appropriate and emotionally safe. The product must avoid frightening, manipulative or diagnostic language while still producing stories that feel engaging and relevant.

Other challenges included:

  • Producing consistent, structured stories from varied inputs
  • Balancing personalisation with privacy and data minimisation
  • Managing generation latency, reliability and cost
  • Designing graceful fallbacks when an AI request fails
  • Keeping the experience accessible, mobile-friendly and low-stimulation
  • Communicating the product’s purpose without making unsupported health claims

What I learned

I learned that building a responsible AI product requires much more than writing a good prompt. The surrounding system—validation, safety boundaries, interface design, failure recovery and honest positioning—is equally important.

I also learned that parents do not need more technical complexity. They need clear choices, confidence in what the product is doing and an experience that respects their time and judgement.

What I am proud of

I am proud that Twilight Tales combines a deeply personal idea with more than 16 years of technical experience. It has progressed from manually created storybooks into a working web platform with personalised generation and audio narration.

Most importantly, the project treats child safety, parent trust and responsible AI as core product requirements rather than optional features.

What is next

The next stage is to work with families, educators and research partners to evaluate the experience, improve accessibility and understand where personalised storytelling provides the greatest value.

I also want to continue strengthening story continuity, multilingual support, responsible personalisation and the evidence needed to build Twilight Tales into a trusted family platform.

Built With

Share this project:

Updates