Skip to content
C

CityTwin

Experiment on a city b4 experimenting on the city

Created on 2nd September 2026

•

C

CityTwin

Experiment on a city b4 experimenting on the city

The problem CityTwin solves

City planning decisions can have unexpected ripple effects. Closing a road, changing traffic patterns, or introducing an infrastructure intervention may reduce congestion in one area while creating delays, rerouting traffic, and affecting emergency response elsewhere.

CITYTWIN lets planners test these “what-if” scenarios virtually before implementing them. It simulates the impact of road closures on traffic and other urban systems, then uses AI to explain the results and recommend the least disruptive option.

This makes urban planning faster, safer, and more data-driven, helping decision-makers understand potential consequences before making changes to the real city.

Challenges we ran into

One of our biggest challenges was integrating multiple systems without breaking existing work. The project combines OSM road-network data, traffic simulation, FastAPI, a React frontend, and Groq AI.

We also ran into issues with environment dependencies and API integration, including missing Python packages and a port conflict while running the backend. We resolved these by setting up the project dependencies correctly, verifying the backend independently, and testing the API integration with mocked Groq responses.

Another challenge was ensuring that AI failures would not break the simulation. We designed Groq as an optional analysis layer: the simulation still produces its quantitative results if the AI service is unavailable, while Groq interprets those results when configured.

Finally, we had to handle API keys securely. We separated local secrets into .env, added the appropriate Git ignore rules, and kept .env.example free of real credentials.

Discussion

Builders also viewed

See more projects on Devfolio