Inspiration

Social platforms are extraordinarily good at helping people discover the next interesting thing, but they often optimize for continued consumption rather than understanding. I built Leaflet around a different question:

What if the energy of a social feed helped people follow their curiosity and learn something they could actually remember?

Leaflet is a cover-led social library where people can create, publish, discover, and share very short visual books. Readers can browse themed shelves, use Quick Pick when they do not know where to begin, open books created by other people, and finish a useful lesson in minutes. Creators can submit their own books for moderation, and approved books become part of the public library.

What Leaflet does

Every new Leaflet book is a focused three- or five-page infographic experience. Each page combines a purpose-built educational diagram with an accessible HTML explanation and meaningful alt text. Books also include learning objectives, takeaways, and recall questions that must be answerable from the lesson.

The goal is not to produce endless AI content. Leaflet deliberately constrains generation so each book makes a specific promise and teaches something concrete.

Readers can:

  • Browse ordered, topic-based bookshelves
  • Discover books created by the community
  • Use Quick Pick for one-cover-at-a-time discovery
  • Read without creating an account
  • Review objectives, takeaways, and recall questions
  • Share individual books through book-specific links

Creators can:

  • Generate a bounded three- or five-page visual book
  • Keep generated work private
  • Submit a book to a moderation queue
  • Track whether it is pending, approved, or returned for changes
  • Publish approved work into the shared library

How I built it

Leaflet is built with Next.js, React, TypeScript, and Zod. GPT-5.6 generates each manuscript as a strict structured output containing the pages, learning objectives, takeaways, recall questions, visual directions, exact diagram labels, and alt text.

Generation is a multi-stage editorial pipeline rather than a single prompt:

  1. Validate and moderate the creator’s request.
  2. Ask GPT-5.6 to produce the complete structured manuscript.
  3. Apply deterministic checks for minimum educational substance.
  4. Run a separate GPT-5.6 review for teaching value, age fit, coherence, and unsupported certainty.
  5. Reject any book that fails a review dimension or falls below the required score.
  6. Generate a text-free cover and one educational infographic for every page with gpt-image-2.
  7. Save the book only when the manuscript, review, cover, and every page are complete.

The application includes local seed data so judges can explore it without API credentials. Its cloud architecture supports Cognito authentication, private S3 assets, DynamoDB persistence, queued SQS generation jobs, daily quotas, and an administrator moderation workflow.

I used Codex as an active engineering and creative partner throughout Build Week. It helped inspect and evolve the architecture, implement features across the application, write tests, diagnose visual and generation failures, refine the product language, and build the curated catalog workflow.

Codex also created the promotional-video workflow: it controlled Chromium to navigate and screen-record the live application, called the ElevenLabs API for narration, analyzed the audio, and assembled the final edit with FFmpeg. The Build Week demonstration uses that same workflow, so the video explaining how I used Codex was itself produced with Codex.

What changed during Build Week

Leaflet existed as an early proof of concept before the submission period. It had a words-only catalog, a basic reader, bounded creation, one generated cover per book, and initial authentication, moderation, and queued-generation infrastructure.

During Build Week, I meaningfully transformed it into the current product:

  • Upgraded the core generation and review workflow to GPT-5.6
  • Replaced words-only creation with infographic-first visual books
  • Added a purpose-built diagram and alt text to every generated page
  • Built themed social bookshelves and Quick Pick discovery
  • Produced and reviewed a substantial curated visual catalog
  • Strengthened the educational publication gate
  • Improved creator submissions, moderation, and private asset handling
  • Added book-specific social previews and sharing
  • Added privacy-friendly funnel measurement
  • Reworked onboarding, reader pacing, titles, and editorial language
  • Built an automated browser-recording, narration, and video-editing workflow with Codex

The dated commit history documents this work throughout the official submission period.

Challenges

The hardest challenge was preventing “valid” AI output from being mistaken for good educational material. A manuscript can satisfy a schema while still being generic, repetitive, or unmemorable. I addressed this with narrow book promises, strict length limits, deterministic substance checks, and a separate educational review instead of allowing the generating model to approve its own work.

Visual accuracy was another challenge. Generated diagrams can introduce misleading details or incorrect text. Leaflet therefore uses reviewed visual plans, exact short labels, text-free covers, accessible HTML explanations, and an all-or-nothing asset rule. If any required image fails, the entire edition fails rather than reaching a reader incomplete.

I also had to decide which social mechanics belonged in an educational product. I kept discovery, community publishing, shelves, and sharing, but intentionally left out autoplay, manipulative streaks, and an infinite feed optimized only for attention.

Finally, generation involves several remote model and image requests. Holding a normal web request open would be unreliable, so the production architecture uses asynchronous jobs, quotas, idempotent persistence, and private assets.

What I learned

I learned that constraints can make generative AI more useful, not less creative. Requiring a book to teach one focused idea in only three or five pages forces stronger editorial decisions.

I also learned that trustworthy educational generation needs a pipeline: structured creation, independent review, accessible presentation, moderation, and human publication gates. The model call is only one part of the product.

Most importantly, I learned that fast discovery does not have to mean shallow consumption. The same curiosity that makes someone open another post can help them open another lesson—if the product measures success by what they finished and understood, not simply by how long they kept scrolling.

Built With

Share this project:

Updates