· Ed Dowding · Portfolio  · 2 min read

Mother's Almanac

AI-powered parenting encyclopedia that generates evidence-based guidance on-demand. Built with Next.js 15, Supabase, Claude AI, and a 3-layer caching system with RAG document upload and semantic search.

AI-powered parenting encyclopedia that generates evidence-based guidance on-demand. Built with Next.js 15, Supabase, Claude AI, and a 3-layer caching system with RAG document upload and semantic search.

The Problem

New parents face endless questions—sleep training, teething, reflux, developmental milestones—and need answers at 3am. Traditional wikis require manual content creation and go stale. Generic AI chatbots lack domain expertise and provide inconsistent, sometimes dangerous advice. Result: parents either drown in conflicting Google results or pay for expensive consultations for basic questions.

What I Built

Mother’s Almanac is a living parenting encyclopedia that generates evidence-based guidance on-demand:

  • AI Wiki Generation: Ask any parenting question and receive a comprehensive wiki page generated by Claude 3.5 Sonnet with structured sections, tables, and timelines
  • 3-Layer Caching: Supabase (L1) → Vercel Edge (L2) → CDN (L3) with confidence-based invalidation—popular pages serve in <500ms
  • RAG Pipeline: Upload parenting books, research papers, or trusted guides (PDF, DOCX, TXT) to ground AI responses in your source material
  • Semantic Search: Find related content using pgvector embeddings with hybrid keyword fallback
  • Auto-Linking & Stubs: AI identifies related concepts and creates internal links; ungenerated topics become “stubs” for future content
  • Command Palette (⌘K): Real-time search with confidence badges and recent history

Tech Stack

Next.js 15 (App Router), TypeScript, Supabase (PostgreSQL + Auth + Storage), Anthropic Claude 3.5 Sonnet, Tailwind CSS + shadcn/ui, Vercel deployment with ISR (Incremental Static Regeneration).

Lessons Learned

Confidence Scoring Enables Graceful Degradation: Not all AI-generated content is equally reliable. Assigning confidence scores (based on source document coverage, topic specificity, etc.) lets the system know when to regenerate pages and when to flag uncertainty to users. Lesson: AI systems need self-awareness about their own limitations.

Caching Strategy Is Product Strategy: Multi-level caching (Supabase → Edge → CDN) reduced API costs by 80% and improved response times from 15s to <500ms for popular pages. But aggressive caching made updates invisible. Implementing time-based and confidence-based invalidation balanced freshness with cost. Lesson: cache invalidation is product design, not infrastructure.

RAG Requires Chunking Expertise: Early document uploads produced poor results—chunks were too large or split mid-concept. Implementing 1500-character chunks with 200-character overlap and preserving section headers dramatically improved retrieval quality. Lesson: RAG quality depends more on pre-processing than model selection.

UK English Is A Feature: Small detail, but forcing British spelling in prompts differentiated Mother’s Almanac from US-centric alternatives. International users noticed and appreciated it. Lesson: localisation can be competitive advantage, even for AI-generated content.

Back to Blog

Related Posts

View All Posts »
Moneypenny (WhatsApp AI Desktop Client)

Moneypenny (WhatsApp AI Desktop Client)

Native desktop WhatsApp client with AI-powered message summarisation, priority inbox, and keyboard-first navigation. Built with Tauri (Rust), React, and multi-provider LLM support.

Panauricon (Limitless Elephant)

Panauricon (Limitless Elephant)

Continuous voice capture app with 30-minute auto-segmented recording, Google Gemini transcription, location tagging, and full-text search. Designed for capturing thoughts, conversations, and ideas without interruption.

PocketPoppins

PocketPoppins

AI parenting copilot combining effortless memory capture via WhatsApp with personalized developmental guidance and contextual Q&A against both family history and trusted frameworks.

PromptZero (AI Usage & Carbon Analytics)

PromptZero (AI Usage & Carbon Analytics)

Dashboard for monitoring OpenAI API usage, costs, carbon footprint, and project-level analytics. Track spend across multiple API keys with budget alerts, 5-year historical sync, and AES-256 encrypted credential storage.