Project · April to July 2026 · Retired

CityBrew

A weekly local newsletter, picked and written by AI.

  • AI agents
  • Web
  • Cloud
  • Automation
  1. The problem

    Local events are easy to find. Picking the few worth my week took a well-connected friend or a lot of digging.

  2. How I used agentic coding

    Claude Code built it, then found most of its running cost was a daily web search and an always-on server, and rebuilt it as one weekly run.

  3. The outcome

    It sent real readers their weekly picks. Once a Claude scheduled task could do the same job with no servers, I retired it.

The weekly email
  1. The issue opens with the week, a short note and the weekend weather.
  2. Happening This Week: events picked for one reader, each with when and where.
  3. Always Worth a Stop: places from a library of local favorites.
  4. Every pick has More like this and Less links. The footer has feedback and unsubscribe links.
The issue opens with the week, a short note and the weekend weather.The real email design, with demo picks

$70 to 125

$1 to 2

a month, before and after

Monthly cost by line item, before and after the redesign, high end of each range
Line itemBeforeAfter
Event discovery (web search)
$95
$1.50
A server running all day
$20
$0
Job queue
$10
$0
Curation and writing
$2
$0.50
Dollars a month, the high end of each estimate. Source: CityBrew's cost redesign proposal, July 16, 2026.
34
events in a 62-second run

As of July 2026

Deep dive

Three charts, with sources

What each change saved

Scraping weekly cut the search bill sevenfold, leaving the always-on server as the biggest monthly cost; the rebuild removed both.

Daily scrape

  • Finding events$55 to $95Web search, 15 jobs a day
  • Server on all week$10 to $20
  • Job queue$0 to $10
  • Picking and writing$1 to $2

Weekly scrape

  • Finding events$8 to $14Web search, once a week
  • Server on all week$10 to $20Now the biggest line
  • Job queue$0 to $10
  • Picking and writing$1

One weekly job

  • Finding events$0.5 to $1.5Pages fetched, then read by a small model
  • Server on all week$0Gone: the job starts, runs and exits
  • Job queue$0Gone: Postgres keeps the little state there is
  • Picking and writing$0.5
As a table
Daily scrape
ValueNote
Finding events$55 to $95Web search, 15 jobs a day
Server on all week$10 to $20
Job queue$0 to $10
Picking and writing$1 to $2
Weekly scrape
ValueNote
Finding events$8 to $14Web search, once a week
Server on all week$10 to $20Now the biggest line
Job queue$0 to $10
Picking and writing$1
One weekly job
ValueNote
Finding events$0.5 to $1.5Pages fetched, then read by a small model
Server on all week$0Gone: the job starts, runs and exits
Job queue$0Gone: Postgres keeps the little state there is
Picking and writing$0.5
  • The daily scrape cost the same whatever the subscriber count: 15 web-search jobs a day, with every page a search read billed as model input.

    Habit: design for cost

  • The server ran all week to host a timer that ticked every 60 seconds, for about an hour of real work a week.

  • The weekly job ran on GitHub Actions, about 80 of the 2,000 free minutes a month by the proposal's estimate, and disabling it was the off switch.

As of July 16, 2026. Chart: CityBrew docs/COST-REDESIGN-PROPOSAL.md, the TL;DR table, in dollars a month: directional estimates, not invoices. Facts: CityBrew docs/COST-AND-ARCHITECTURE-BRIEFING.md, section 3; CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 1; CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 2.1.

Cost as subscribers grow

The rebuild cut the fixed cost, not the cost per subscriber: at 5,000 subscribers they're about 7% apart.

Subscribers
10 subscribers
Daily scrape
$72
One weekly job
$3

Slide to change the count.

As a table
SubscribersDaily scrapeOne weekly job
5 subscribers$71$2
10 subscribers$72$3
100 subscribers$87$18
1,000 subscribers$243$174
5,000 subscribers$937$868
  • Each subscriber adds $0.04 a week to both lines, about $0.17 a month (× 52 ÷ 12): the proposal's figure without its batch discount, which was never built.

  • The fixed costs are each design's low monthly estimate, $70 for the daily scrape and $1 for the weekly job.

  • The proposal planned a shared writing pass past about 25 subscribers, to cut the cost per subscriber to about a cent a week. It was never built.

    Habit: design for cost

As of July 16, 2026. Chart: CityBrew docs/COST-REDESIGN-PROPOSAL.md, the TL;DR and section 4: directional estimates, computed for each count. Facts: CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 4; workers/src has no batch calls; CityBrew docs/COST-REDESIGN-PROPOSAL.md, the TL;DR table; CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 2.4.

One live run, source by source

Fetching pages instead of searching took 62 seconds for 34 events, but four of the eight sources gave nothing.

  • Source 121 events
  • Source 210 events
  • Source 32 events
  • Source 41 events
  • Source 50 eventsPages fetched, but no events read from them
  • Source 60 eventsPages fetched, but no events read from them
  • Source 70 eventsIts pages need JavaScript, so the fetch got an empty shell
  • Source 80 eventsIts pages need JavaScript, so the fetch got an empty shell
As a table
ValueNote
Source 121 events
Source 210 events
Source 32 events
Source 41 events
Source 50 eventsPages fetched, but no events read from them
Source 60 eventsPages fetched, but no events read from them
Source 70 eventsIts pages need JavaScript, so the fetch got an empty shell
Source 80 eventsIts pages need JavaScript, so the fetch got an empty shell
  • Each source gets up to five paths tried; the first two pages with at least 500 characters of text go to one extraction call, each capped at 40,000.

  • A source that fails to fetch or extract is logged and returns nothing, so one dead source never stops the run.

    Habit: enforce rules in code, not only in prompts

  • The notes put the run at about 10 to 15 cents, against an estimated $1.80 to $3.20 for a week of web-search scraping.

As of July 17, 2026. Chart: CityBrew CLAUDE.md, the Phase 2 verification run, July 17, 2026. Facts: workers/src/events/extract.ts, MAX_PAGE_TEXT_CHARS; CityBrew workers/src/events/fetch-scrape.ts, fetchScrapeSource; CityBrew CLAUDE.md, Phase 2; docs/COST-REDESIGN-PROPOSAL.md, section 4.

Sources

Built with Next.js, TypeScript, Supabase, GitHub Actions, Resend. CityBrew _bmad-output/planning-artifacts/prd.md, Executive Summary; CityBrew docs/COST-AND-ARCHITECTURE-BRIEFING.md and docs/COST-REDESIGN-PROPOSAL.md, July 16, 2026; workers/src/run-weekly.ts; CityBrew CLAUDE.md, the July 16, 2026 baseline: 52 newsletters; owner, Workshop kickoff, 2026-10-06; CityBrew CLAUDE.md, Phase 2; CityBrew docs/COST-REDESIGN-PROPOSAL.md, the TL;DR table, in dollars a month: directional estimates, not invoices; CityBrew docs/COST-AND-ARCHITECTURE-BRIEFING.md, section 3; CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 1; CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 2.1; CityBrew docs/COST-REDESIGN-PROPOSAL.md, the TL;DR and section 4: directional estimates, computed for each count; CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 4; workers/src has no batch calls; CityBrew docs/COST-REDESIGN-PROPOSAL.md, the TL;DR table; CityBrew docs/COST-REDESIGN-PROPOSAL.md, section 2.4; CityBrew CLAUDE.md, the Phase 2 verification run, July 17, 2026; CityBrew workers/src/events/fetch-scrape.ts; workers/src/events/extract.ts, MAX_PAGE_TEXT_CHARS; CityBrew workers/src/events/fetch-scrape.ts, fetchScrapeSource; CityBrew CLAUDE.md, Phase 2; docs/COST-REDESIGN-PROPOSAL.md, section 4.