The View
City Right Now uses Claude to transform your queries into dynamic, real-time NYC data dashboards with custom generative layouts.
Project Description
City Right Now is a real-time NYC ambient intelligence dashboard where the query is the interface. Unlike standard chat windows or fixed dashboards, there are no pre-built layouts — every user query dispatches to Claude’s API, which returns a typed JSON widget array that gets rendered directly as the UI. Ask “what’s breaking?” and you get an alert banner, prose briefing, and story grid. Ask “show me the quiet spots” and you get a borough activity chart, stat row, and pulse feed. The same input box produces structurally different pages every time.
This is the core innovation: Claude acts as a layout engine, not a text generator. It reasons over live NYC signal data — 100 events across all five boroughs, neighborhoods from Flushing to Riverdale to Brighton Beach — and decides which widgets to include, in what order, with what content. The interface itself is the Claude response.
Stability is achieved through a Zod discriminated union schema that validates every widget before rendering. If Claude’s output fails validation, a fallback view is returned gracefully. An AbortController with a 20-second timeout ensures the UI never hangs. The three-state machine (idle → loading → ready) gives users full control to cancel mid-request.