Frond & Forest 🌿

Inspiration

I started thinking about how to make reading more engaging for young children, especially those who find it difficult, or already have low attention span, to stay focused on conventional reading formats.

Traditional storybooks have their own value, but I wondered what storytelling could look like if children weren't just following a story, but actively shaping it. What if they could speak their ideas, see them turn into illustrations, and hear the story continue based on their choices?

That idea became Frond & Forest, an interactive storytelling experience where children can influence the narrative through their own words. Instead of being limited to predetermined choices, they can describe what they want to explore and watch the story evolve around them.

I wanted to explore whether combining voice interaction, AI-generated illustrations, and spoken narration could make storytime feel more participatory and engaging, particularly for young readers who benefit from more interactive ways to experience stories.

What it does

Frond & Forest turns storytelling into a conversation between the child and an evolving story.

Children can speak their ideas through the microphone or select suggested choices on screen. The app uses an AI model to generate the next part of the story, determine what the next scene should look like, and offer new choices. An image generation model then creates an illustration for that scene, while text-to-speech reads the narration aloud.

The experience brings together three things: a story that responds to the child's imagination, illustrations that change with the narrative, and spoken narration that makes the experience more accessible to early readers.

How I built it

I built Frond & Forest with Next.js and React, using separate server-side API routes to coordinate the language and image generation services.

The language model runs through Featherless AI, using Qwen 2.5 7B Instruct. It receives the current story context and the child's input, then generates structured JSON containing the next narration, an image-generation prompt, and suggested choices. Keeping these elements together allows the application to maintain continuity between scenes rather than treating every illustration as an unrelated image.

For illustrations, I used Cloudflare Workers AI with FLUX.1 schnell. The generated image corresponds to the scene described by the language model. Pollinations.ai provides an alternative image-generation path when the primary provider encounters a failure.

On the frontend, the Web Speech API handles speech recognition and browser-based speech synthesis. This avoids needing a separate speech-to-text or text-to-speech service for the current prototype.

The interface uses a botanical visual direction, with forest greens and warm cream tones to complement the storybook concept.

Challenges I ran into

Getting predictable output from an LLM

The language model needs to return more than prose. The application also needs a usable image prompt and a set of choices for the next scene. However, model responses do not always follow the requested JSON format exactly. I had to account for responses containing extra text or Markdown formatting before parsing the generated data.

Handling image-generation responses

Integrating image providers was not as straightforward as making an API request and displaying the result. Cloudflare's response format required careful handling of the returned image data. While debugging, I encountered cases where I was processing an encoded response incorrectly, so inspecting the actual API payload was necessary to identify the image data in the expected format.

Working with different provider requirements

Cloudflare Workers AI and Pollinations.ai do not necessarily accept identical parameters or request formats. I had to account for those differences when configuring image generation and its alternative path, rather than assuming a request that worked for one provider would work for the other.

Keeping narration and illustrations in sync

A new scene involves several asynchronous steps: generating the narrative, requesting an illustration, and displaying that image in the browser. I needed to coordinate these steps so the narration would not start before the illustration was ready. Image load events and fallback timeouts help manage that transition.

These challenges reinforced that an interactive AI application depends on how its components work together, not just on the capabilities of the individual models.

Accomplishments that we're proud of

I'm most proud of connecting voice input, dynamic storytelling, image generation, and spoken narration into one working experience.

The app goes beyond displaying an AI-generated story. A child's free-form input can influence the next scene, that scene receives a corresponding illustration, and the resulting narration is read aloud. Suggested on-screen choices provide another way to interact when speaking is inconvenient.

I'm also proud of building an alternative image-generation path and handling the API and asynchronous UI behavior needed to keep the experience working across multiple services.

What I learned

This project taught me how much engineering sits between a promising AI demo and a coherent user experience.

A language model can generate a story, and an image model can create an illustration, but the application still needs to preserve context, interpret structured responses, handle provider failures, and coordinate asynchronous operations. I also gained practical experience working with image API payloads and browser speech recognition and synthesis.

Most importantly, I learned to think about the complete interaction from the user's perspective. The story, illustration, and narration need to feel like parts of the same moment, rather than separate AI features placed next to one another.

What's next for Frond & Forest

I'd like to make the experience feel more like an illustrated storybook and give children more ways to explore their stories.

The next iteration could include ambient nature sounds that adapt to each scene, more expressive voices for different characters, and smoother transitions between pages and illustrations. I'd also like to let families export completed adventures as printable PDF storybooks.

Beyond presentation, I'd explore stronger age-appropriate content controls and parent-friendly settings, since a storytelling experience designed for children needs to account for more than generating engaging narratives.

The longer-term goal is to let children create stories that feel personal to them, while making the experience simple and enjoyable for families.

Built with

Next.js, React, TypeScript, Tailwind CSS, Featherless AI, Qwen2.5 7B Instruct, Cloudflare Workers AI, FLUX.1 schnell, Pollinations.ai, Web Speech API, Speech Recognition, Speech Synthesis, REST APIs, Vercel

Built With

  • cloudflare-workers-ai
  • featherless-ai
  • flux.1-schnell
  • next.js
  • pollinations.ai
  • qwen2.5-7b-instruct
  • react
  • rest-apis
  • speech-recognition
  • speech-synthesis
  • tailwind-css
  • typescript
  • vercel
  • web-speech-api
Share this project:

Updates

Submission history