This document provides a visual guide to the Maharashtra MLA lookup feature in the VishwaGuru application.
When users open VishwaGuru, they see three main options:
┌─────────────────────────────────────────────────┐
│ │
│ VishwaGuru │
│ Civic action, simplified. │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Start an Issue │ │
│ └─────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Who is Responsible? │ │
│ └─────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Find My MLA (Maharashtra) ✨ │ │ ← NEW FEATURE
│ └─────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────┘
What happens: User clicks the purple "Find My MLA (Maharashtra)" button.
The user is presented with a simple input form:
┌─────────────────────────────────────────────────┐
│ │
│ Find Your Maharashtra MLA │
│ │
│ Enter your 6-digit pincode │
│ ┌─────────────────────────────────────────┐ │
│ │ 411001 _ │ │
│ └─────────────────────────────────────────┘ │
│ │
│ Currently supporting limited pincodes in │
│ Maharashtra (MVP) │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Find My Representatives │ │
│ └─────────────────────────────────────────┘ │
│ │
│ Cancel │
│ │
└─────────────────────────────────────────────────┘
What happens:
- User enters their 6-digit pincode (e.g., 411001)
- Form validates the input (must be exactly 6 digits)
- User clicks "Find My Representatives" button
- API call is made to backend:
GET /api/mh/rep-contacts?pincode=411001
After successful lookup, comprehensive information is displayed:
┌─────────────────────────────────────────────────┐
│ │
│ Find Your Maharashtra MLA │
│ │
│ ┌───────────────────────────────────────┐ │
│ │ 🏢 Your Location │ │
│ │ │ │
│ │ Pincode: 411001 │ │
│ │ District: Pune │ │
│ │ Constituency: Kasba Peth │ │
│ └───────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────┐ │
│ │ 👤 Your MLA │ │
│ │ │ │
│ │ Sample MLA Pune │ │
│ │ Party: Sample Party │ │
│ │ Phone: 98XXXXXXXX │ │
│ │ Email: pune.mla@example.com │ │
│ │ │ │
│ │ ───────────────────────────────── │ │
│ │ │ │
│ │ "Sample MLA Pune represents the │ │
│ │ Kasba Peth assembly constituency │ │
│ │ in Pune district, Maharashtra. │ │
│ │ MLAs handle local issues such as │ │
│ │ infrastructure, public services, │ │
│ │ and constituent welfare." │ │
│ └───────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────┐ │
│ │ 📝 File a Grievance │ │
│ │ │ │
│ │ [ Central CPGRAMS Portal ] │ │
│ │ [ Maharashtra Aaple Sarkar Portal ] │ │
│ │ │ │
│ │ This is an MVP; data may not be │ │
│ │ fully accurate. │ │
│ └───────────────────────────────────────┘ │
│ │
│ Back to Home │
│ │
└─────────────────────────────────────────────────┘
What is displayed:
-
Location Information (Purple card)
- Pincode entered
- District name
- Assembly constituency name
-
MLA Information (White card with blue header)
- MLA's full name
- Political party affiliation
- Phone number for contact
- Email address
- AI-generated description of their role
-
Grievance Portals (Green card)
- Central CPGRAMS Portal button (green)
- Maharashtra Aaple Sarkar Portal button (orange)
- Disclaimer about MVP accuracy
┌─────────────────────────────────────────────────┐
│ │
│ Find Your Maharashtra MLA │
│ │
│ Enter your 6-digit pincode │
│ ┌─────────────────────────────────────────┐ │
│ │ 999999 _ │ │
│ └─────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────┐ │
│ │ ⚠️ Unknown pincode for Maharashtra │ │
│ │ MVP. Currently only supporting │ │
│ │ limited pincodes. │ │
│ └───────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Find My Representatives │ │
│ └─────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────┐
│ │
│ Find Your Maharashtra MLA │
│ │
│ Enter your 6-digit pincode │
│ ┌─────────────────────────────────────────┐ │
│ │ 12345 _ │ │
│ └─────────────────────────────────────────┘ │
│ │
│ Button is disabled (need 6 digits) │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Find My Representatives [disabled] │ │
│ └─────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────┘
- Purple (#9333EA): Primary action color for MLA lookup feature
- Blue (#2563EB): General UI elements, info cards
- Green (#059669): Success states, grievance portal links
- Orange (#EA580C): Maharashtra state portal
- Red (#DC2626): Error messages
- Gray (#6B7280): Secondary text, hints
User Input (Pincode)
↓
Frontend Validation (6 digits, numeric only)
↓
API Call: GET /api/mh/rep-contacts?pincode=411001
↓
Backend Validation
↓
Pincode → Constituency Lookup
↓
Constituency → MLA Lookup
↓
Generate AI Description (Optional, via Gemini)
↓
Return JSON Response
↓
Display Results in UI
{
"pincode": "411001",
"state": "Maharashtra",
"district": "Pune",
"assembly_constituency": "Kasba Peth",
"mla": {
"name": "Sample MLA Pune",
"party": "Sample Party",
"phone": "98XXXXXXXX",
"email": "pune.mla@example.com"
},
"description": "AI-generated description...",
"grievance_links": {
"central_cpgrams": "https://pgportal.gov.in/",
"maharashtra_portal": "https://aaplesarkar.mahaonline.gov.in/en",
"note": "This is an MVP; data may not be fully accurate."
}
}- ✅ Real-time validation (6 digits required)
- ✅ Numeric-only input enforcement
- ✅ Button disabled until valid input
- ✅ Clear error messages
- ✅ Loading states during API call
- ✅ Success confirmation with full details
- ✅ Error messages for invalid/unknown pincodes
- ✅ Helpful hints about MVP limitations
- ✅ Clear labels and instructions
- ✅ Proper form structure
- ✅ Keyboard navigation support
- ✅ Responsive design (mobile-friendly)
- ✅ Direct links to grievance portals
- ✅ Opens in new tabs (target="_blank")
- ✅ Secure external links (rel="noopener noreferrer")
- Full-width cards with comfortable padding
- Large, clickable buttons
- Clear information hierarchy
- Single-column layout
- Touch-friendly button sizes
- Optimized text sizes
- Proper spacing for thumb navigation
The component manages several states:
- view: Current screen ('home', 'mh-rep', etc.)
- maharashtraRepInfo: Stores API response data
- pincode: User input value
- loading: Shows loading indicator
- error: Displays error messages
- 🔜 Add all Maharashtra pincodes
- 🔜 Real MLA data from official sources
- 🔜 Auto-detect location via GPS
- 🔜 Save recent searches
- 🔜 Add MP (Member of Parliament) lookup
- 🔜 Include municipal councillor information
- 🔜 Show constituency boundaries on map
- 🔜 Track MLA's recent activities
Expected User Flow:
- Click button: 1 action
- Enter pincode: 6 keystrokes
- Click find: 1 action
- View results: Immediate
Total Actions: 2 clicks + 6 keystrokes = ~5 seconds to result
Success Indicators:
- ✅ Clear call-to-action
- ✅ Minimal steps required
- ✅ Fast response time
- ✅ Actionable next steps (grievance portals)
The UI includes helpful hints:
- "Currently supporting limited pincodes in Maharashtra (MVP)"
- "This is an MVP; data may not be fully accurate."
- AI description explains MLA's role and responsibilities
This sets proper expectations and educates users about:
- MVP nature of the feature
- MLA's responsibilities
- How to file grievances
Version: 1.0.0 (MVP)
Last Updated: December 2024
Status: ✅ Production Ready