• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
drewmcdonald

drewmcdonald

dc-water-filter

Public
Like
dc-water-filter
Home
Code
10
.claude
backend
1
examples
shared
2
.mcp.json
.vtignore
CLAUDE.md
README.md
VALTOWN_GUIDE.md
deno.json
Environment variables
3
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
CLAUDE.md
Code
/
CLAUDE.md
Search
…
CLAUDE.md

DC Water Filter — AI Assistant Context

Project Overview

Val Town email trigger that filters DC Water emergency alerts by proximity. See README.md for details.

Platform

This is a Val Town project. See VALTOWN_GUIDE.md for full Val Town platform docs, standard libraries, and gotchas.

Key points for this project:

  • Runtime is Deno (serverless), not Node.js
  • Entry point: backend/index.ts — exports a default async function(e: Email) handler
  • Environment variables via Deno.env.get()
  • Val Town std libraries used: email (forwarding), openai (LLM fallback)

Code Standards

  • TypeScript, strict mode
  • Pure functions in shared/ for testability
  • Never hardcode secrets — use environment variables
  • Fail open (forward the email) rather than silently dropping on errors
  • Only hard filter is the NE quadrant check

Testing

deno test shared/parsing_test.ts --allow-read --allow-net --no-config
  • --no-config avoids deno.json importing Val Town types unavailable locally
  • .eml test fixtures in examples/ use CRLF line endings

Architecture Notes

  • Geocoder: US Census Bureau (geocoding.geo.census.gov) — free, no API key, handles DC intersections
  • LLM fallback: OpenAI gpt-4o-mini via Val Town std/openai for locations that resist deterministic parsing
  • Email format: Location is always in located on/in [LOCATION]. Some customers — HTML uses <sup> for ordinals, &amp; for &
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.