🎧 Listen to this article: हिंदी · English · தமிழ் · తెలుగు
Pune, a bustling city in India, faces a significant traffic problem. But it’s not just about congestion. There's a gap in communication. People notice issues like broken signals or potholes but have no formal way to report them. Enter ChowkChakra, a civic traffic app designed to bridge this gap. Let’s dive into how this app was created using Amazon DynamoDB and Vercel.
The Problem
Pune's traffic issues aren't just about the jams. They stem from a lack of communication. Citizens see problems like traffic lights stuck on red or massive potholes but have nowhere to report them formally. This often leaves traffic officers in the dark, responding to issues only when they stumble upon them or get a call.
ChowkChakra aims to change that by providing two user interfaces:
- For Citizens: A platform to report issues in real-time.
- For Officers: A command center to act upon these reports.
Citizens can also be notified when an issue is resolved and can verify the fix themselves.
The Technical Stack
Building ChowkChakra required a robust backend and an intuitive frontend. Here's the tech stack that powers it:
- Frontend/Backend: Built using Next.js 15, a popular framework for building web applications. It’s deployed using Vercel, which simplifies the deployment process.
- Database: Amazon DynamoDB serves as the sole datastore. It’s known for handling high-throughput writes and quick key-based reads, perfect for an app that relies on real-time data.
- Storage: AWS S3 is used for storing photos and videos uploaded by citizens.
- AI Services: Google Gemini 1.5 Pro helps with function calls and vision processing, while the Gemini Live API aids in streaming audio input.
- Mapping & Live Data: Mapbox GL JS provides mapping capabilities, and live data is sourced from HERE Traffic API and OpenWeatherMap.
- Notifications: SendGrid handles email notifications, and the Web Push API with VAPID keys manages push notifications.
Designing with DynamoDB
DynamoDB was chosen for its ability to handle high-volume data efficiently. Here’s how it’s used:
- Table Structure: There are seven tables, each serving a specific purpose, like storing junction registries or handling citizen notifications.
- Hot vs. Cold Table Separation: Active incidents are stored in one table, while resolved ones move to another. This prevents unnecessary full-table scans.
- Atomic Operations: Using
TransactWriteCommand, multiple updates occur simultaneously, ensuring data consistency. - Global Secondary Index (GSI): This allows querying data like junction risk scores without scanning entire tables.
- Time-to-Live (TTL): Automatically cleans up outdated data, ensuring the system remains efficient without manual intervention.
Features: The Citizen PWA
ChowkChakra offers a Progressive Web App (PWA) for citizens with four reporting modes:
- Voice Tap-to-Speak: Uses AI to understand location, issue type, and severity, automatically tagging the GPS location.
- Commute Mode: A hands-free mode that listens continuously, allowing users to report issues without stopping their commute.
These features ensure that citizens can report issues quickly and efficiently, making the app a crucial tool in managing Pune's traffic woes.
Key Takeaways
- Real-time Reporting: ChowkChakra enables citizens to report traffic issues as they occur.
- Efficient Data Handling: Using DynamoDB's capabilities ensures fast and reliable data access.
- User-Friendly Interfaces: Both citizens and officers benefit from intuitive interfaces, making communication seamless.
- Automated Cleanup: DynamoDB’s TTL feature ensures data stays relevant, reducing manual maintenance.
ChowkChakra is a great example of how technology can solve real-world problems by improving communication and efficiency. With tools like DynamoDB and Vercel, developers can build applications that not only function well but also make a meaningful impact on everyday life.


Responses
Sign in to leave a response.