Shrayak: Shramik Sahayak (श्रमिक सहायक)
Link to open source: https://github.com/akanksha-dot-dev/Shrayak.git
Shrayak: Shramik Sahayak (श्रमिक सहायक)
Inspiration
The inspiration for "Shrayak" was born right here in the National Capital Region. Every day in Delhi and Gurugram, millions of migrant workers form the invisible backbone of our city—building our infrastructure, driving our transport, and managing our homes. Yet, despite being the foundation of the local economy, they suffer from a massive information asymmetry.
Labor laws (like the Delhi Minimum Wages Act or e-Shram guidelines) are dense, bureaucratic, and exclusively available in formal English or complex Hindi. A construction worker arriving from Bihar cannot navigate a 50-page gazette to find out if being paid ₹400 a day is legal. We wanted to build an agent that wasn't just "smart," but deeply empathetic. We envisioned an AI that spoke to workers in their colloquial language, knew their exact vulnerabilities, and backed up its advice with hard, real-time legal data.
What it does
Shrayak is a highly accessible, GenAI-powered web application built specifically for Delhi's migrant workforce.
-
Persona-Driven Context: Users can select profiles like "Ramesh (Construction Worker)" or "Sita (Domestic Worker)." The app dynamically updates its context to understand their specific vulnerabilities.
-
Colloquial Legal Advice: Workers can ask questions in broken Hindi, and the app retrieves the exact, legally binding statute (e.g., the July 2026 minimum wage for skilled masonry) and explains it simply.
-
Geospatial Routing: If a worker needs an e-Shram card, they provide their pin code, and Shrayak finds the exact coordinates of the nearest Delhi Labour Welfare Board office.
-
Proactive Live Data (GRAP Alerts): Shrayak fetches real-time Delhi Air Quality Index (AQI) data. If pollution hits "Severe" levels triggering the Graded Response Action Plan (GRAP), the agent proactively alerts construction personas that work is legally halted and advises them on claiming mandatory paid compensation.
How we built it
We designed Shrayak using a Zero-Trust, real-time RAG (Retrieval-Augmented Generation) architecture, utilizing a lightweight Vite frontend and a serverless Node.js backend to stay under the strict 10MB repository limit.
The true "brain" of the operation is Elastic Cloud Serverless:
-
Vector Search & RAG: We utilized
@elastic/elasticsearch-serverlessto chunk and index the latest labor circulars. When a query comes in, we run a semantic search to pull the exact legal context before generating the LLM response, effectively eliminating hallucinations. -
Geospatial Queries: We leveraged Elastic's
geo_distancequeries to calculate the shortest path between the user's pin code and our indexed NoSQL datastore of welfare offices. -
Observability & Security: We implemented a Regex-based "PII Stripper" utility that intercepts inputs and redacts 10-digit phone numbers and Aadhar numbers before logging the interaction metadata (latency, dropped queries) into a
telemetry_logsindex in Elastic.
Challenges we ran into
-
The 10MB Hackathon Constraint: Building a robust RAG application while keeping the repository microscopic meant abandoning heavy frameworks (like Next.js or massive Python data science libraries). We relied heavily on optimized Vanilla JS, CDNs, and Vercel Serverless Functions.
-
Elastic API Role-Based Access Control: Initially, our API keys lacked index-creation privileges, causing backend crashes. We had to dive deep into Elastic's security models and write a custom JSON Role Descriptor to grant exact
create_index,read, andwriteprivileges, rigorously applying the Principle of Least Privilege. -
Preventing AI Hallucinations: Early on, the AI would confidently invent minimum wage numbers. We had to engineer an incredibly strict wrapper prompt that forced the LLM to output only the rupee amounts retrieved directly from Elastic Search.
Accomplishments that we're proud of
-
Successfully executing a Zero-Trust Architecture: Protecting vulnerable users by stripping PII at the edge before it ever reaches our telemetry databases.
-
The Live AQI Integration: Tying environmental APIs to legal labor rights (GRAP) completely elevated the app from a static chatbot to a dynamic, real-world survival tool for outdoor workers.
-
Deploying on Vercel flawlessly: Maintaining a highly professional, WCAG AAA-compliant light-themed UI while keeping the architecture incredibly lean.
What we learned
This Buildathon was an incredible masterclass in moving beyond basic API wrappers to building a production-grade, secure architecture. We learned how to utilize Elastic Cloud Serverless not just as a search engine, but as a dynamic RAG database, a geospatial router, and an observability monitor. Ultimately, we learned that AI is only as powerful as the real-world data grounding it.
What's next for Shrayak
-
Voice Integration: Integrating Google Cloud Speech-to-Text. Many of our target users have low literacy levels, and voice notes are their primary method of digital communication.
-
WhatsApp Deployment: Porting the core Elastic logic into a WhatsApp Business API webhook to provide zero-friction access without requiring web navigation.
-
Pan-India Scaling: Expanding our Elasticsearch indices to ingest state-specific labor laws across India, starting with Maharashtra and Karnataka.


