Inspiration

A café owner should be able to explore a decision before risking money on it. Large companies can invest in customer research and repeated experiments, while a small business may have to rely on a few conversations and intuition.

We wanted to make that first step more accessible. Towncast lets owners ask their community a question, explore possible reactions, and decide what deserves a real-world test.

The theme, Crafting Constellations, inspired us to connect individual perspectives into visible patterns across a community.

What it does

Towncast is a simulated community where small businesses can explore pricing, offers, and other decisions.

An owner can ask, “What happens if I raise coffee prices by one dollar?” or compare a five-dollar coffee against a six-dollar coffee-and-pastry bundle. Towncast generates responses from 10,000 synthetic residents whose demographic foundation comes from U.S. Census American Community Survey data.

Owners can compare demographic groups, inspect individual explanations, and open the web sources used to inform predictions. Events and previous tests remain in memory, providing context for later questions.

Constellation connections highlight shared simulated perspectives across the moving city. These responses are estimates for exploring tradeoffs, rather than evidence of what actual customers will do.

How we built it

We built on the existing simfrancisco foundation and adapted it into Towncast’s small-business decision workflow.

JavaScript and Canvas render the city, residents, and constellation connections. A Rust backend connects the population data, prediction services, and storage.

Gemini interprets questions and generates ordinary predictions. Brave Search retrieves relevant web context with clickable sources. Jev through TypeSafe produces structured A/B choices that the backend validates.

Instead of making one AI request per resident, Towncast groups similar residents into representative archetypes and processes them in batches. Our verified comparison across 10,000 residents used three Jev calls.

Neo4j stores event and resident memory, while SQLite supports simulation state and caching. The frontend runs on Vercel, with the backend and persistent memory hosted on Railway. API keys remain on the backend.

We used AI assistance for implementation, debugging, and verification.

Challenges we ran into

Our main challenges were keeping predictions efficient, preserving memory across restarts, and making demographic results understandable without overwhelming the interface.

We also had to replace a temporary connection to a developer’s computer with an independently hosted backend. Another issue involved multiple visitors reopening the same population and accidentally resetting active scenarios.

Accomplishments that we're proud of

We connected a complete decision workflow: ask a question, inspect a prediction, compare offers, explore demographic differences, and reopen saved results.

We verified live Gemini, Brave, and Jev integrations, tested the public deployment, and confirmed that saved events and results survive backend and database restarts.

What we learned

A useful simulation needs more than convincing responses. It needs a clear data foundation, inspectable sources, reliable persistence, and an honest explanation of its limits.

We also learned that thoughtful batching can make a large simulated population practical without thousands of separate AI calls.

What's next for Towncast

Our next step is to work with café owners and compare simulated responses against small, real customer experiments. We want to improve calibration and help owners turn a prediction into a clear, affordable test before making a larger commitment.

Built With

Share this project:

Updates

Submission history