A highly scalable, multi-lingual, and completely Voice-First intelligent assistant designed exclusively for the agricultural, healthcare, governance, and educational sectors of rural India.
- 🎙️ 100% Voice-First Interface: Zero-typing UI. Simply press the microphone, speak naturally (in Hindi, Marathi, or English), and the AI instantly responds with contextual voice audio.
- 🛡️ Deep Domain Isolation: The AI physically refuses to answer off-topic queries, guaranteeing that village users receive highly accurate, actionable information explicitly mapped to their requested sector (Agriculture, Health, Edu, Govt).
- 🌐 Dual-Brain Fallback API: Runs securely on Google Gemini 1.5 Flash. Should the primary cloud fail, the backend instantly intercepts the error and routes the exact context to Sarvam AI (sarvam-30b). Zero downtime.
- 📱 Progressive Web App (PWA): Easily installable to any local home screen directly from the browser window (
Add to Home Screen), with completely off-grid offline local-database caching. - 🔒 Zero-PII Secure Engine: The API explicitly deletes and aggressively scrubs sensitive PII (Aadhaar Data, Phone Numbers) using Regular Expressions before any payload hits cloud endpoints.
- 🎨 Premium Glassmorphism: Features a highly optimized
100dvhCSS layout rendering absolute Frosted Glass panels against an infinite natural-moving gradient, maximizing visual engagement globally without external CSS/JS bloatware.
- Core: React 18, Vite (HMR)
- Styling: Pure Modern CSS-in-JS Variables, Dynamic Glassmorphic Viewports
- Build/Offline: Vite-Plugin-PWA (Progressive Web Application standard)
- Audio Pipeline:
window.SpeechRecognition(STT Input)
- Core: Python 3.10+, FastAPI (ASGI Asynchronous Routing), Uvicorn
- Database:
sqlite3natively handling session recall and caching mechanisms - Inference APIs: Google Gemini SDK,
sarvamai(Fallback pipeline) - Audio Pipeline:
gTTS(Response Output)
-
Clone the Repository:
git clone https://github.com/your-username/gramsathi-ai.git cd gramsathi-ai -
Configure Environment Variables: Open the root
.envfile and strictly insert your API keys:GEMINI_API_KEY=your_gemini_key_here SARVAM_API_KEY=your_sarvam_key_here VITE_OLLAMA_URL=http://localhost:11434
-
Initialize the Python Backend: Open a terminal into the
/backendfolder.cd backend pip install fastapi uvicorn google-genai sarvamai Pydantic gTTS python-dotenv python main.pyThe server dynamically creates
gramsathi.dbmemory instances and spins up onhttp://localhost:8000. -
Initialize the React Frontend: Open a separate terminal in the root project folder.
npm install --legacy-peer-deps npm run dev
The blazing frontend will instantly boot on
http://localhost:3002.
If you want to install GramSathi natively to your mobile device:
- Since browsers tightly lock Progressive Web Apps to secure contexts, use a secure tunnel mapping to your laptop (e.g.,
ngrok http 3002). - Open the secure
httpslink on Chrome/Safari. - Open the Settings Panel (⚙️) in the application, and hit the blue 🚀 Install App button!
- Presentations? See the included
gramsathi_ppt_content.mdfor immediate deck copy-paste. - Code architecture breakdown? Read
gramsathi_architecture.mdfor a strict line-by-line methodology of the Dual-Brain Python stack and CSS grids.
Engineered with precision for a connected, smarter future.