AWS Builder Center
How I Built HydroPulse AI: A Scalable Full-Stack Smart Drainage Grid for Kolkata

How I Built HydroPulse AI: A Scalable Full-Stack Smart Drainage Grid for Kolkata

A technical walkthrough of HydroPulse AI—a solo-engineered full-stack automated drainage grid dashboard built for Kolkata using Python, Flask, and MySQL to streamline municipal flood logistics.

**Introduction:** As a first-year computer science engineering student living in Kolkata, monsoon floods and sudden waterlogging are not just technical problems for me—they are disruptive real-life issues. Conventional municipal relief grids are purely reactive, dispatching cleaning crews only after severe street gridlocks have already occurred. To solve this, I built HydroPulse AI—a completely dynamic, solo-engineered full-stack architecture that automates sewer health monitoring and emergency fleet routing for urban management frameworks like the Kolkata Municipal Corporation (KMC).
**The Tech Stack Deployed:** - Frontend UI Layer: HTML5, CSS3 Responsive Flex-Layout Grid, and Jinja2 Templating Engine. - Analytical Backend Brain: Python 3 with Flask Web Framework. - Relational Database Server: MySQL Database Engine via XAMPP Server Local Host.
---
**How the Code Works Architecture-wise:**
**1. Predictive Silt Analytics & System Accountability:** Instead of manual tracking, my Python backend establishes an active connection stream with the local SQL database nodes mapping core Kolkata hotspots (Thakurpukur, Joka, Khidirpur, etc.). If ultrasonic sensors detect that underground sediment levels cross a critical threshold of 75%, the application dynamically triggers a "Pre-Rain Dispatch Active" red alert on the web interface. To solve the real-life problem of ground-level delays, I embedded live 2-Hour SLA (Service Level Agreement) target countdown timers to enforce municipal response windows.
**2. Automated Fleet Logistics Optimization:** Post-rain, sorting unstructured locations is inefficient. My application processes dynamic database entries to instantly recalculate an optimized Shortest-Distance Priority Sheet for operational dispatch drivers, ensuring vehicles reach the closest maximum severity locations first, minimizing fuel wastage and response delay.
**3. Dynamic Database Scalability (The Master Hack):** During implementation, I realized a static list fails if a citizen reports from an unmapped street. To solve this structural problem, I introduced a scalable custom input system. If a user selects 'Other Location' and types a new area (like Ballygunge or Alipore), the Flask backend checks the database matrix. If the string data is missing, the backend executes a live INSERT INTO SQL statement, creating a brand new row structure on the server and instantly generating a dynamic, responsive alert grid card on the live dashboard panel without a single line of manual frontend hardcoding.
---
**Major Engineering Breakthroughs (What I Fought Back):** Building a dynamic multi-directory local platform as a single contributor had its hurdles. My biggest challenge was handling the native architecture of the system frame. During deployment, the asset routing pipeline broke down completely because the visual structural directories (static and templates) accidentally nested inside each other, causing template lookup error codes on the local server.
I resolved this by manual directory isolation on my local explorer path environment, linking stylesheets via semantic Jinja loops (url_for('static', filename='style.css')), and forcing automated local data updates by adding robust .commit() operations into my relational Python handlers to override browser template caching.
**Conclusion:** HydroPulse AI proves that modern data frameworks can transform municipal rescue loops from chaotic manual operations into structured, automated mathematical precision.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article