MySarkar
Multilingual AI Revolution in Government Services
Created on 6th September 2025
β’
MySarkar
Multilingual AI Revolution in Government Services
The problem MySarkar solves
ποΈ MySarkar β AI-Powered Government Scheme Discovery
Problem
Government schemes are scattered, complex, and often inaccessible due to language barriers, lack of awareness, and digital divide. Citizens miss out on benefits they deserve.
Solution
MySarkar is a multilingual AI platform that makes scheme discovery intelligent, inclusive, and accessible β even on feature phones.
π Key Highlights
π Intelligent Discovery
- Vector-based semantic search with MiniLM embeddings
- Location & profile-based personalization
- Real-time eligibility checks via backend rules engine
π€ AI Assistant
- Powered by Google Gemini + Hugging Face Transformers
- Trained for Indian government schemes knowledge base
- Multilingual support (IndicTrans2 + Google Translate API)
π Universal Access
- IVR system (Twilio + Ngrok) for feature phones
- Voice + DTMF navigation
- Indic TTS/ASR for natural conversations in Indian languages
π Document Intelligence
- Tesseract OCR + Transformers (NER) for field extraction
- AI-guided form filling & audio instructions for semi-literate users
π₯ Community Platform
- Role-based access for Citizens, NGOs, Officials, Admin
- AI moderation using sentiment analysis & hate speech detection
βοΈ Tech Backbone
- Frontend: React + Tailwind (PWA ready)
- Backend: Node.js + Express + MongoDB Atlas (with Vector Search)
- AI Services: FastAPI + Transformers (NLP, OCR, CV)
- Voice: Twilio APIs + IndicTrans2 for speech/translation
- AI Models: state-of-the-art all-MiniLM-L6-v2, microsoft/dit-base-finetuned-rvlcdip, cardiffnlp/twitter-roberta-base-sentiment-latest, TF-IDF Vectorizer
- Auth & Security: JWT + bcrypt + role-based access
π Why MySarkar?
| Current Problem | MySarkar Impact |
|---|---|
| Manual, confusing searches | AI-powered discovery, 10x faster |
| Language barriers | Multilingual support |
| Paperwork complexity | OCR + AI assistance |
| Smartphone gap | IVR access on feature phones |
| Scattered info | Unified citizen platform |
β‘ MySarkar bridges citizens and government services with AI β ensuring no Indian is left behind.
Challenges we ran into
π οΈ Challenges I Ran Into
Building MySarkar with multiple services and AI integrations came with some tough hurdles. Here are the main ones and how we solved them:
π CORS Errors in Microservices
-
Problem: With 3 services (React, Node.js, FastAPI) running on different ports, we hit CORS errors when the frontend tried to call the backend or AI services.
-
Solution:
- Enabled CORS middleware in Node.js (
corspackage) and FastAPI (fastapi.middleware.cors). - Configured allowed origins (
http://localhost:3000for React, and production domain later). - Used environment variables so CORS configs change automatically in dev vs. prod.
- Enabled CORS middleware in Node.js (
π€ Hugging Face Model Availability
-
Problem: Many Hugging Face models (especially multilingual embeddings & OCR-related) were not available on Inference API (free tier), causing failures.
-
Solution:
- Installed models locally with Transformers instead of relying only on API.
- Used lightweight alternatives like
Xenova/all-MiniLM-L6-v2for vector search (works directly in Node.js). - Cached embeddings in MongoDB Atlas Vector Search to reduce repeated inference.
π Multilingual OCR with Pytesseract
-
Problem: Extracting text from Aadhaar, income docs, etc. in multiple Indian languages (Hindi, Bengali, Kannada) caused poor accuracy with default English OCR.
-
Solution:
- Installed language packs (
hin,ben,kan) for Tesseract. - Used
pytesseract.image_to_string(img, lang='eng+hin+ben+kan')for combined recognition. - Post-processed OCR output with IndicTrans2 translation to normalize into userβs preferred language.
- Installed language packs (
Tracks Applied (1)
Best Use of Akash
Akash Network

