Inspiration

Urban traffic systems and environmental monitoring exist in two completely different silos. Current Intelligent Transport Systems (ITS) optimize strictly for vehicle throughput. Meanwhile, environmental dashboards just passively report that the air is toxic. We realized that by the time a smog alert is issued, it's already too late. Stop-and-go traffic increases harmful emissions by up to 20 times. We were inspired to build a system that acts as a bridge: an AI that proactively "cures" the city's lungs by preventing traffic congestion in high-risk zones before the smog can accumulate.

What it does

AeroFlow AI is a proactive smart city command center.

  • Predictive Mapping: It analyzes historical weather and simulated traffic data to predict PM2.5 pollution spikes up to 6 hours in advance, displaying them as heatmaps on a dark-mode dashboard.
  • Traffic Optimization Simulation: When a "smog island" is predicted, the system simulates extending "green waves" on perimeter routes, diverting traffic away from critical areas (like schools and hospitals) to disperse emissions.
  • Automated Action Reports: With a single click, it uses Generative AI to analyze the current prediction and generate a formal, actionable mitigation report for city officials.

How we built it

We built the solution with a focus on speed, scalability, and zero-hardware deployment.

  • Frontend: We used Next.js and Tailwind CSS to build a sleek, high-contrast dashboard. We integrated React-Leaflet with OpenStreetMap for rendering dynamic GeoJSON heatmaps without relying on paid map APIs.
  • Backend: A Python FastAPI service handles the data flow and serves our ML predictions.
  • Machine Learning: We utilized a Scikit-learn Random Forest model trained on mocked urban data. The core logic relies on minimizing the predicted pollution over a given time horizon $T$, which can be conceptually modeled as: $$ \min_{\mathbf{R}} \sum_{t=1}^{T} PM_{2.5}(t, \mathbf{R}) $$ Where $PM_{2.5}$ is a function of weather conditions and the dynamic traffic routing vector $\mathbf{R}$.
  • Generative AI: We integrated the Groq API (Llama 3 model) to process JSON data of the predicted hotspots and output human-readable, professional alerts instantly.

Challenges we ran into

Building a robust spatial dashboard in a hackathon timeframe was tough. Integrating React-Leaflet with Next.js caused some Server-Side Rendering (SSR) headaches, which we had to resolve using dynamic imports. Additionally, fine-tuning the Groq LLM prompt to output exactly what a city mayor needs to see without hallucinating extra data took several iterations. Lastly, since we didn't have access to live SCADA systems, writing a Python script to generate realistic, logically sound mock data for the MVP was a complex puzzle.

Accomplishments that we're proud of

We are incredibly proud of bridging the gap between transportation and ecology in a single, cohesive UI. We managed to deliver a fully functional pipeline: from data generation, through ML prediction and spatial visualization, all the way to LLM-powered reporting. The UI looks like a premium, enterprise-grade SaaS product, and the entire stack relies on free, open-source or highly efficient tools.

What we learned

We leveled up our skills in handling geospatial data (GeoJSON) on the frontend. We also learned how to effectively decouple our Next.js frontend from a Python backend using FastAPI, allowing us to leverage the best tools for both UI rendering and Data Science. Working with the Groq API showed us how incredibly fast LLM inference can be when optimized for specific tasks.

What's next for AeroFlow AI

The immediate next step is to replace our mocked data engine with real historical datasets from open city portals. We aim to build actual integration layers for widely used traffic management protocols. Ultimately, we want to pitch AeroFlow AI to municipal governments as a $0-hardware, software-only upgrade to their existing Smart City infrastructure.

Contributors

  • Kamil Piejko - Lead Full-Stack Developer & AI Architect (Built the core Next.js application, FastAPI backend, and integrated the ML/LLM pipelines).
  • Joanna Pich - Product Manager & UI/UX Designer (Designed the sleek dark-mode dashboard, user flow, and crafted the presentation narrative).
  • Dominika Zięba - Data Scientist & Environmental Domain Expert (Researched the impact of stop-and-go traffic, designed the PM2.5 simulation logic, and validated the prediction models).

Built With

Share this project:

Updates