← Back to projects

Community and civic applications

NH Kids Events

Find things to do with your kids across New Hampshire.

Availability
Dedicated website planned
NH Kids Events web interface for finding local library and community activities by New Hampshire location or ZIP code
NH Kids Events location lookup and activity discovery interface.

The problem

Finding children’s and family activities across New Hampshire often means visiting dozens of individual library calendars, municipal recreation pages, museum schedules, and community websites that each publish events in different formats.

What I built

NH Kids Events is a modular event collection pipeline and server-side rendered community calendar built with TypeScript on Cloudflare Workers, Cloudflare D1, and Cloudflare Pages.

Key capabilities

  • Runs scheduled daily source acquisition across configured local calendars using conditional HTTP requests (ETag and If-Modified-Since) and content hashing.
  • Parses listings through reusable source adapters for iCalendar (RFC 5545 with 60-day recurrence expansion), RSS/Atom feeds, WordPress The Events Calendar APIs, common library calendar platforms (Assabet, LibraryCalendar, EngagedPatrons, widget JSON, Wix Events), PDF/image flyers, and HTML pages (checking schema.org/Event JSON-LD before falling back to Gemini-assisted extraction).
  • Classifies new or changed events with Google’s Gemini Decisions API to determine kids/family relevance, age group (0–2, 3–5, 6–8, 9–12, 13–17, or All Ages & Family), activity category, registration vs. drop-in status, cancellation hints, and extraction quality.
  • Routes confident matches directly to the live calendar, holds borderline items in a review queue, supports visitor issue reports and source suggestions, and uses an automatic circuit breaker so sources with repeated failures are flagged for inspection.
  • Provides a searchable calendar with age, activity, and location filters, an organization directory, per-event .ics calendar downloads, and an RSS feed (/feed.xml).

Technical architecture

Organized as a TypeScript monorepo running across modular Cloudflare Workers (acquisition, adapter parsing/extraction, and orchestration/classification), Cloudflare D1 for structured source and event storage, and a Cloudflare Pages SSR application with Zero Trust–protected administrative review routes.

Engineering decisions

A core engineering priority is skipping unchanged source material so the pipeline avoids unnecessary repeated AI processing. Volatile HTML boilerplate (<script>, <style>, <nav>, <footer>, and comments) is stripped before computing a SHA-256 hash so unchanged pages short-circuit before parsing. At the event layer, normalized deduplication keys (dedup_key) paired with content_hash skip events already stored unchanged in D1, and a per-run recurring-series cache avoids re-classifying identical recurring event instances.

Availability & notes

Dedicated website planned. NH Kids Events aggregates publicly published event listings and is not exhaustive; schedules change for weather, holidays, and full registration, so readers should always confirm details with the original organizer before attending.