A serverless application that lets users text their GPS coordinates to a phone number and receive a summary of current avalanche conditions from Avalanche Canada for that location.
Currently hosted at https://avalanche-canada-sms.brendan-410.workers.dev/
- Text your coordinates (e.g.
51.04, -115.06) to the service phone number - The server identifies which Avalanche Canada forecast region covers that location
- You receive an SMS reply with the current danger ratings and avalanche problems
Example reply (fits in a single 160-character SMS):
Kananaskis
Feb 23
Alp:Considerable TL:Moderate BT:Low
Storm Slabs, Wind Slabs
avalanche.ca
- Runtime: Node.js / TypeScript
- Framework: Hono (runs on Cloudflare Workers or AWS Lambda)
- SMS: Twilio
- Data Source: Avalanche Canada API
- Summarization: Template-based (no LLM)
- Node.js 20+
- A Twilio account with a phone number
- Cloudflare account (for Workers deployment) or AWS account (for Lambda)
npm installCopy the example file and fill in your Twilio credentials:
cp .env.example .envSee .env.example for all available variables.
npm run devThis starts a local Wrangler dev server. Set VALIDATE_TWILIO_SIG=false in your .env to skip Twilio signature checks during local development.
npm test-
Authenticate with Cloudflare:
npx wrangler login
This opens a browser window for OAuth. You only need to do this once.
-
Set Twilio secrets:
npx wrangler secret put TWILIO_ACCOUNT_SID npx wrangler secret put TWILIO_AUTH_TOKEN
You'll be prompted to enter each value. These are stored encrypted and never appear in your code or config.
-
Deploy:
npm run deploy
Wrangler will output the deployed URL (e.g.
https://avalanche-canada-sms.<your-subdomain>.workers.dev). -
Configure Twilio webhook:
In the Twilio console, go to your phone number's configuration and set the incoming message webhook to:
https://avalanche-canada-sms.<your-subdomain>.workers.dev/sms/incomingMethod:
HTTP POST -
Test end-to-end: Send an SMS with coordinates to your Twilio number and verify you receive a forecast reply.
AWS Lambda: Use your preferred Lambda deployment tool (SST, Serverless Framework, etc.) with the Hono AWS Lambda adapter.
Access the status dashboard at /admin to view live health checks of dependent services:
- Avalanche Canada API — verifies the forecast endpoint is responding
- Twilio — verifies credentials are valid and the API is reachable
Shows overall status (ok / degraded / down), per-service status with latency, and auto-refreshes every 30 seconds.
- Raw coordinates:
51.0447 -115.0632or51.0447, -115.0632or51.0447N 115.0632W - iOS location sharing (Apple Maps links)
- Android location sharing (Google Maps links, including shortened
maps.app.goo.glURLs)
- SPECIFICATION.md — full technical specification
- CLAUDE.md — development guidelines for Claude Code