Inspiration
Important neighbourhood information is often scattered across noisy messaging groups and social media. Safety alerts, local problems, and requests for help can easily get buried or reach people who are nowhere near the affected area.
We created Mohalla AI to make community communication more local, useful, and privacy-conscious.
What it does
Mohalla AI connects nearby residents through a GPS-aware community feed. Residents can:
- Publish safety alerts and community updates
- Report problems such as water shortages, power cuts, and damaged roads
- Request help and share local events
- Attach photos, reply to posts, and vote on useful information
- Post anonymously in the local feed to protect their identity
- Share wider announcements through a country-level feed
Mohalla also includes an optional AI Post Assistant. It can turn an informal message into a clearer community post, suggest a suitable category, and optionally translate it into English or Hindi.
For example:
water not coming from morning near main road please check
can become:
Water supply interruption near Main Road
Water has not been available near Main Road since this morning.
The AI suggestion is always shown as a preview. Nothing is published automatically, and the resident remains in control.
How we built it
The mobile application is built with Flutter and Dart, using Riverpod for state management and GoRouter for navigation.
Supabase provides authentication, PostgreSQL storage, row-level security, realtime updates, image storage, and the serverless Edge Function. Firebase Cloud Messaging supports notifications, while device location and reverse geocoding help provide a relevant local feed.
The AI Post Assistant is implemented through an authenticated Supabase Edge Function connected to the OpenAI Responses API. Structured outputs constrain each response to a predictable title, improved description, category, translation, and language.
The OpenAI API key is stored only as a server-side secret and is never included in the mobile application.
Live AI generation is currently disabled in the public test build because API billing is not enabled. The complete authenticated integration, structured-output contract, caching system, and usage controls are available in the repository. Normal community posting remains fully functional.
Challenges we ran into
One major challenge was protecting credentials in a mobile application. Calling the AI service directly from the APK would expose the API key, so we created an authenticated server-side Edge Function.
We also needed to control usage costs and make model output reliable. We addressed this with:
- A strict structured-output schema
- Three new AI generations per user per day
- SHA-256-based caching for repeated requests
- Usage rollback when generation fails
- Clear validation and error handling
- Prompts that prevent invented names, places, incidents, or accusations
Another challenge was supporting multilingual neighbourhood communication while preserving the facts and intent of the original message.
Accomplishments that we're proud of
We are proud that Mohalla AI adds useful assistance without taking control away from residents.
AI is optional, every result is previewed, repeated requests are cached, and users make the final publishing decision. The assistant fits naturally into the existing post-creation workflow instead of functioning as a disconnected chatbot.
We also implemented a privacy-conscious architecture using anonymous local identities, authenticated backend requests, PostgreSQL row-level security, and server-side secret management.
What we learned
We learned how Flutter, Supabase Edge Functions, PostgreSQL security policies, and the OpenAI Responses API can work together as a secure mobile AI architecture.
We also learned that predictable outputs, transparent limitations, strict cost controls, and visible user consent are especially important when applying AI to community-generated information.
What's next for Mohalla AI
Our next steps include:
- Server-side geospatial filtering
- Support for more Indian languages
- Grouping duplicate reports about the same local issue
- Stronger moderation and misinformation safeguards
- Accessibility improvements
- Status tracking for reported problems
- Workflows for RWAs, local volunteers, and municipal authorities
Our long-term goal is to make Mohalla AI a trusted digital neighbourhood layer where residents can quickly share useful information and work together to solve local problems.
Built With
- android
- api
- codex
- dart
- edge
- edge-functions
- firebase
- flutter
- functions
- gps
- gpt-5.6
- openai
- postgresql
- riverpod
- supabase
Log in or sign up for Devpost to join the conversation.