Public
Morning briefing API — digest + chat, powered by Claude
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.

The Daily Briefing

A morning briefing PWA powered by Claude with web search. Delivers a concise digest across Geopolitics, Current Affairs, Sports, Trends, and AI — installable to your phone's home screen.

Architecture

Rendering mermaid diagram...

Endpoints

MethodPathDescription
GET/The installable web app (HTML)
GET/manifest.jsonPWA manifest
GET/icon.pngApp icon (SVG)
GET/sourceRedirects to the source on Val Town
GET/api/digestReturns the latest stored digest JSON
POST/api/askProxies a chat question to Claude (auto-enables web search for time-sensitive queries)

Setup

  1. Add ANTHROPIC_KEY in Val Town env vars (your sk-ant-api03-... key). Without this, the cron and the Ask tab will fail.
  2. The cron runs daily at 06:30 UTC — adjust in interval settings if you want a different time.
  3. Install on your phone:
    • Open the val's public URL in Safari (iOS) or Chrome (Android)
    • Tap Share → Add to Home Screen (iOS) or Menu → Install app (Android)
    • The app opens in standalone mode with the dark masthead

Files

  • index.html — The frontend app (vanilla JS, no build step)
  • manifest.json — PWA manifest for home-screen install
  • icon.svg — App icon (served as /icon.png for compatibility)
  • api.ts — HTTP handler (serves app, digest, and chat)
  • cron.ts — Interval job that builds the daily digest
  • lib/claude.ts — Shared Claude API helper
  • lib/config.ts — Model, topics, and blob key config