Inspiration
I was driving home from class one day when my usual 7-minute commute turned into 20 minutes. The reason? Construction.
Normally, I don't mind sitting in traffic because of roadwork. Maintaining roads is more important than saving 10 minutes of my time. But this situation was ridiculous. Three lanes were forced to merge into a single right lane, and almost immediately afterward, traffic had to merge again into a single left lane.
It made me wonder how something like this gets planned in the first place. Could the construction have been scheduled differently? Could the lane closures have been coordinated better? And how many other projects are causing unnecessary delays or expenses because different departments aren't working together?
That's where the idea for CivilPlAIn came from.
What it does
CivilPlAIn is an AI assisted infrastructure planning platform designed to help municipalities make better decisions about road maintenance, construction, and project coordination.
The core idea isn't entirely new. Cities already have software for managing infrastructure and construction projects. What I wanted to explore was how responsible AI could make that process more useful, especially when it comes to identifying conflicts and explaining the tradeoffs behind different decisions.
CivilPlAIn brings road information into one interactive map. Users can explore streets, inspect available pavement condition data, view construction permits, and investigate where work might be happening.
Instead of simply displaying information, the platform also helps users explore decisions. It can compare repair cost estimates using stated assumptions, screen construction plans for potential scheduling and location conflicts, and evaluate alternative plans.
For example, if a road is scheduled to be resurfaced shortly before another project requires excavation in the same area, CivilPlAIn can flag the potential conflict for review before the city spends money repairing a road that might need to be dug up again.
AI helps explain these findings, compare the available evidence, and communicate the risks and limitations of different options. Importantly, it doesn't invent missing information or make final decisions. Its purpose is to help engineers and city planners understand their options, not replace their judgment.
How we built it
I built CivilPlAIn using React, TypeScript, and Vite for the frontend, with MapLibre powering the interactive map. The backend uses Python, FastAPI, and SQLite to manage infrastructure records, calculations, and saved planning results.
One of the biggest parts of development was integrating real public infrastructure data from New York City, including road geometry, pavement inspection records, and street construction permits.
I also built a separate simulated planning environment so I could demonstrate repair estimates, construction conflicts, and alternative schedules without presenting fictional data as real municipal information.
The actual calculations are handled by deterministic algorithms rather than a language model. These calculate costs from supplied quantities and rates, compare project locations and dates, and identify potential conflicts.
AI is used to help explain the results. Rather than allowing a model to generate unsupported costs or recommendations, the system restricts it to verified calculation outputs and approved explanations. I also implemented a deterministic fallback so the application remains useful without an AI API key.
Throughout development, I used AI-assisted programming alongside testing and manual verification, particularly to help build and validate different parts of the application.
Challenges we ran into
One of the hardest challenges was working with real government data. Just because two datasets contain information about the same street doesn't mean their records can be matched reliably. Different identifiers, incomplete locations, outdated inspections, and missing construction schedules made this much harder than I originally expected.
Another major challenge was figuring out how to incorporate AI responsibly. It would have been easy to send all the information to a language model and ask it to recommend the best construction plan. The problem is that AI can confidently produce answers that aren't supported by the underlying data.
I had to separate the actual calculations from the AI explanations, preserve the original data sources, and make sure missing information stayed missing instead of being filled with guesses.
Building all of this as a solo developer was also challenging. I had to balance creating a usable interface, implementing backend logic, researching infrastructure data, and testing everything together.
Accomplishments that we're proud of
I'm proud that CivilPlAIn became more than just an interactive map.
I built an application that connects infrastructure data with actual planning workflows. Users can explore roads, examine available evidence, compare repair estimates, investigate potential construction conflicts, and review different scheduling options.
I'm especially proud of the responsible AI implementation. The application distinguishes real observations from estimates and assumptions, preserves information about where its data came from, and explains when there isn't enough evidence to reach a conclusion.
I also built automated tests covering the calculations, API, frontend, and AI safeguards.
Most importantly, I was able to take a frustrating experience on my drive home and turn it into a working prototype of something that could eventually help solve a much larger problem.
What we learned
The biggest thing I learned was that having more data doesn't necessarily mean having better information.
Government datasets can contain thousands of records, but those records aren't automatically complete, accurate, or compatible. Making useful decisions requires understanding where the information came from and what it actually represents.
I also learned that responsible AI isn't just about adding disclaimers. It's about designing the software so AI cannot silently invent information or make decisions it shouldn't be making.
Before this project, I was focused primarily on what AI could do. Working on CivilPlAIn made me think much more about what AI should be allowed to do.
What's next for CivilPlAIn
I want CivilPlAIn to eventually become a platform that municipalities could realistically use, rather than just a hackathon prototype.
The next major step is improving how real infrastructure data is verified and connected. I also want to integrate traffic information so users can compare how different construction schedules and lane closures might affect congestion.
Beyond that, I plan to expand the planning system with better cost data, more infrastructure types, and tools that help cities prioritize maintenance while considering budgets, disruption, and long-term road conditions.
Eventually, I want the platform to help answer a simple question: Before a city starts a project, is there a better way to do it?
My goal isn't to have AI run a city. It's to give the people responsible for running one better information before they make expensive decisions.
Built With
- fastapi
- maplibre
- python
- react
- sqlite
- typescript
- vite