Projects > SANE
SANE: AI triage for school email: the flood goes in, a short brief of deadlines and events comes out.

SANE

AI triage for school email: the flood goes in, a short brief of deadlines and events comes out.

Year
Feb 2026–May 2026
Status
Live
Platforms
Web
Type
Web, AI/ML, Automation
Role
Sole developer
Links
Website ↗

With two kids in school, forty emails arrive every week, and maybe three of them need us to actually do something. I built SANE to read all forty, find the three, and put their deadlines on our calendar.

SANE connects to a parent's Gmail, reads the school email as it arrives, and decides what needs attention. It pulls out the deadlines, events, and to-dos, and delivers them the way each parent prefers: important emails forwarded as they come in, a daily brief, a weekly brief, or any combination, each on its own schedule.

It reads attachments too (PDFs, documents, and photographed flyers), because schools love burying the date of the field trip in a flyer. Repeated notices about the same thing are recognized and collapsed instead of forwarded again. Events land on one shared family calendar: both parents can connect their own inboxes to the same household, and everything merges. Senders can be pinned with simple rules, always forward this one, never forward that one, and every result takes a thumbs up or down.

Because the app holds family information, a child's details, account access, and other sensitive data are encrypted, original emails are never stored, and the app has passed an independent security audit.

Features

  • Reads every school email and its attachments (PDFs, documents, photographed flyers) and pulls out the deadlines, events, and to-dos
  • Choose how to hear about it: important emails forwarded as they arrive, a daily brief, a weekly brief, or all three, each on its own schedule
  • Repeated notices about the same thing collapse into one instead of arriving again and again
  • Events from every email land on one family calendar, tagged with which child they belong to
  • Both parents connect their own inboxes to a shared household and see one merged picture
  • Pin senders with simple rules, always forward or never forward, and rate any result thumbs up or down
  • Short setup wizard: name your family, connect Gmail, choose how briefs are delivered
  • A child's details, account access, and other sensitive data are encrypted, and original emails are never stored
  • Cleared an independent third-party security audit, with findings remediated and verified in production

Under the hood

363Files
62,290Lines of code
1,085Commits
Feb 2026–May 2026Dev window
StackNext.js 14 (App Router) · TypeScript · tRPC · Prisma · PostgreSQL · BullMQ · Redis · NextAuth v5 · Anthropic SDK · OpenAI SDK · Google APIs · Resend · React Email · Tailwind CSS · shadcn/ui · Sentry · Vitest
InfraRailway: two Docker containers (web + worker), PostgreSQL and Redis managed services
Notable
  • Email content is wrapped in untrusted-content tags and the model is instructed to treat it as data, never as instructions; the defense is exercised against a suite of adversarial prompt-injection test emails
  • Same-day event collisions are resolved by a dedicated AI pass that semantically matches new events against existing ones ("Fall Festival" merges with "Fall Festival, 2 pm, Gym"), merging details and keeping links back to every source email
  • A household maps both parents' Gmail accounts onto one event pool, so either parent's inbox can supply the calendar while delivery preferences stay individual
  • The AI backend is runtime-switchable across Anthropic, OpenAI, Gemini, and Grok with a separate vision model slot; every call is logged with token counts and per-provider rates, so the admin dashboard shows real cost per day, and PDFs go to Gemini natively while other providers get extracted text
  • Original emails are never stored, only metadata and AI summaries; child records, account tokens, API keys, AI prompts and responses, and opt-in feedback snapshots are all encrypted at rest, with addresses hashed separately so lookups work without plaintext
  • The AI assigns each email a topic label and reuses labels for 60 days, so briefs group related emails together and a topic already forwarded in the last day is not forwarded twice
  • Independent third-party security audit passed, with findings remediated and verified in production