AWS Builder Center

Weekend Showcase Challenge: SchemeSaathi

SchemeSaathi is a multilingual health-scheme companion that uses deterministic eligibility rules to identify relevant government schemes and AI to explain the results. Built as a PWA and deployed on AWS Amplify, it combines accessible user interaction with a secure serverless architecture prepared for Amazon Bedrock.

The Vision

Finding the right government scheme should not require people to understand complicated eligibility rules or search through dozens of websites. SchemeSaathi is a multilingual health-scheme companion designed to make that process simpler.
SchemeSaathi helps users discover government schemes that may match their profile through a simple voice or text-based experience.
The application currently contains structured information for 32 government schemes, including central and state schemes, and supports 12 languages.
The core design principle is:
The rules determine eligibility. AI explains the results.
The AI model never decides whether a user is eligible. SchemeSaathi first runs a deterministic eligibility engine against the user's profile and filters the scheme dataset. Only the already-filtered candidates are passed to the AI layer for ranking and explanation.
User Flow
👤 User ↓ 🌐 Select Language ↓ 📝 Profile Input ↓ ⚙️ Deterministic Eligibility Filter ↓ 🎯 Matching Government Schemes ↓ ✨ AI Explanation & Ranking ↓ 📱 Clear, Actionable Results
This separation makes the most important part of the application predictable, testable, and independent of an LLM.

What I Built

SchemeSaathi is a client-side Progressive Web Application (PWA) built with HTML, CSS, and JavaScript.
It provides:
  • Deterministic eligibility filtering
  • 12-language multilingual support
  • Voice and text input
  • Scheme benefits and eligibility explanations
  • Required document information
  • Official scheme links
  • Follow-up conversational assistance
  • WhatsApp sharing
  • PWA installation and offline support
  • Local fallback when cloud services are unavailable
For the Showcase, I focused on taking the existing project further rather than rebuilding it. The major improvement was preparing the AI layer for a secure AWS serverless architecture.

The Core Engineering Principle

Government scheme eligibility is a rules problem first and an AI problem second.
The deterministic eligibility engine remains the source of truth for candidate selection.
If a scheme requires a particular age range, income level, gender, disability status, or other structured condition, the eligibility engine evaluates those conditions directly.
Only after the candidates have been filtered does AI become involved.
AI Decision Flow
Government Scheme Data ↓ Deterministic Rules ↓ Eligible Candidates ↓ Amazon Bedrock ↓ Explanation + Ranking ↓ User-Friendly Answer
This separation reduces the risk of an LLM inventing eligibility rules and makes the system easier to test and reason about.

AWS Architecture Prepared for SchemeSaathi

The frontend is deployed using AWS Amplify Hosting.
The serverless AI architecture prepared for SchemeSaathi is:
👤 User ↓ ☁️ AWS Amplify Hosting ↓ 📱 SchemeSaathi PWA ↓ ⚙️ Eligibility Engine ↓ 🎯 Eligible Schemes ↓ 🌐 Amazon API Gateway ↓ λ AWS Lambda ↓ ✨ Amazon Bedrock ↓ 📊 Structured AI Response ↓ 📱 SchemeSaathi UI
AWS Lambda handles the server-side AI request, with IAM permissions controlling Lambda's access to Amazon Bedrock.
The frontend does not need AWS credentials or an Anthropic API key.
The backend is defined using AWS SAM and uses the AWS SDK for JavaScript to communicate with Bedrock. The Bedrock model is configurable through the backend rather than being exposed in frontend code.
Follow-up chat requests are designed to use the same secure backend architecture.

Deployment and Engineering Challenges

The AWS deployment process exposed an important real-world challenge.
The SchemeSaathi frontend was successfully deployed through AWS Amplify Hosting and is publicly accessible.
My AWS account could authenticate successfully and list available Amazon Bedrock foundation models. The SAM application also built successfully and the SAM template validated successfully.
However, an end-to-end Bedrock Runtime invocation returned:
ValidationException: Operation not allowed
Because of this account-level restriction, I am not claiming that Lambda-to-Bedrock inference is currently live in production.
The deployment status can be summarized as:
AWS Authentication ↓ Bedrock Models Listed ✓ ↓ SAM Build ✓ ↓ SAM Validation ✓ ↓ Bedrock Runtime ↓ ⚠️ Operation not allowed ↓ Account-Level Restriction ↓ Local Fallback ✓
Instead, SchemeSaathi preserves its deterministic eligibility engine and local fallback system. If the cloud AI service is unavailable, the application can still provide locally generated results.
This reinforced an important engineering lesson:
A successful infrastructure build is not the same as a verified end-to-end deployment.
Rather than hiding the limitation, I documented the exact boundary where cloud inference is currently blocked.

Security and Reliability

The AWS migration improved the application's security boundary.
The frontend no longer requires users to enter an Anthropic API key.
AWS credentials are not placed in the browser.
Lambda uses IAM permissions for Bedrock access.
The application also follows a graceful-degradation approach. Its service worker supports cached PWA assets, while the local eligibility and fallback engines allow the core experience to continue when network or cloud services are unavailable.
Before preparing the repository for deployment, I performed a secret audit and found no hardcoded AWS credentials, Anthropic API keys, or bearer tokens in the application source.

Testing

The final local verification included:
  • Backend tests: 10/10 passed
  • Application and eligibility tests: 13/13 passed
  • AWS SAM build: successful
  • AWS SAM validation: successful
  • Secret audit: no hardcoded API credentials found
The deterministic eligibility engine remained intact throughout the AWS migration.

What I Learned This Summer

The Summer Build Series taught me that building an AI application is not simply about connecting an LLM to a user interface.
The most valuable lesson from SchemeSaathi was learning where AI should not be used.
Eligibility is a rules-based problem, so it belongs in deterministic, testable software. AI is useful after that point for explanation, prioritization, and conversational assistance.
I also learned the importance of designing for failure. External services can fail, networks can disappear, and cloud accounts can have restrictions. A useful application should degrade gracefully instead of becoming unusable.
Finally, I learned that deployment is part of engineering, not just the final button you press after development.
The AWS deployment experience also taught me to distinguish clearly between infrastructure that has been built, services that have been verified, and functionality that is actually running in production.

Inspiration

A special thanks to @shubhadip15 and the AuraAudit project for inspiring me to think more carefully about combining deterministic logic with generative AI.
That perspective influenced how I approached the architecture of SchemeSaathi, particularly the separation between deterministic eligibility decisions and AI-powered explanation.

Try SchemeSaathi

Live Application:
GitHub Repository:
SchemeSaathi is my attempt to make discovering government health schemes simpler, more accessible, and more understandable — especially for people who should not need to be technology experts to find support they may qualify for.

Final Takeaway

Let deterministic software decide eligibility. Let AI make the answer understandable. Let AWS provide the secure infrastructure to connect the two.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article