LetterPaper
Inspiration
We noticed aspiring writers struggling to organize their creative ideas—characters blur together, locations get forgotten, and plot threads unravel. LetterPaper was born from the belief that AI could help writers structure their imagination without stifling their creativity.
What it does
LetterPaper analyzes story text using Google's Gemini AI to automatically extract and organize characters (with traits and descriptions), locations, and story events. It provides personalized feedback to help writers expand their narratives. The upcoming audiobook feature will use Gemini's voice capabilities to generate multi-voice narrations, with different character voices bringing stories to life.
How we built it
We built a Go backend deployed on Cloud Run that calls Gemini AI with automatic model fallback (2.5-flash-lite → 2.5-flash → 3-flash → 3-pro) to ensure reliability. The structured analysis results are stored in Cloud SQL for history tracking. A Flutter frontend provides a smooth cross-platform writing experience. We engineered careful prompts to obtain JSON output and implemented response cleaning to handle edge cases.
Challenges we ran into
Getting consistent structured JSON from Gemini was our biggest challenge. LLMs sometimes added markdown formatting, conversational text, or invalid syntax. We solved this through iterative prompt engineering, explicit output rules, response MIME type configuration, and robust JSON cleaning/validation layers.
Accomplishments that we're proud of
We're proud of building a production-ready fallback system that gracefully handles API rate limits across multiple Gemini models, ensuring 99%+ uptime. The prompt engineering achieved reliable structured extraction without sacrificing the quality of creative feedback.
What we learned
We learned that working with LLMs in production requires defensive programming—never trust the output format. We also discovered that clear constraints (like "NO markdown blocks") in prompts work better than asking nicely. Cloud Run's auto-scaling proved perfect for handling unpredictable AI API latencies.
What's next for LetterPaper
Next up: implementing Gemini's voice API to auto-generate audiobooks with distinct character voices, letting writers hear their stories come alive. We're also exploring collaborative writing features, export to popular formats (PDF, EPUB), and AI-powered plot consistency checking across chapters.
Log in or sign up for Devpost to join the conversation.