AWS Builder Center

Building Jawabdehi: An AI-Powered RTI Accountability Copilot with AWS SAM, LocalStack and Cedar

From a plain-language grievance to an RTI application, a 30-day accountability workflow, and a First Appeal - all developed locally with AWS's open-source stack.

Introduction

What happens after a citizen files an RTI?
The application has been submitted, but the process doesn't necessarily end there. The citizen needs to keep track of the response timeline, determine whether a response was received, remember the statutory deadline, and understand what to do if there is no response.
This led me to build Jawabdehi (जवाबदेही) — an AI-powered RTI accountability copilot.
The idea is simple:
Don't just help citizens file an RTI. Help them follow it through.
Jawabdehi takes a citizen's grievance in plain language and helps transform it into a structured RTI application. It then tracks the 30-day lifecycle and, when a response is not received, helps generate a Section 19(1) First Appeal.
I built this project as an individual developer for the WeMakeDevs × AWS First Commit | Bharat Builds Tour Hackathon, specifically targeting the Build It track.
The interesting part of the project is that I wanted to understand not only how to build the application, but also how to design a cloud-oriented architecture while developing completely locally.



1. The Problem I Wanted to Solve

RTI is a powerful mechanism for citizens to request information from public authorities, but the process can feel intimidating to someone who has never filed an RTI before.
There are several friction points:
  • What exactly should I ask for?
  • How should I structure the application?
  • Which authority should receive it?
  • When should I expect a response?
  • What happens if the deadline passes?
  • How do I proceed if I receive no response?
A typical application can therefore look like:
Problem → Search for information → Understand RTI format → Draft application → File → Remember deadline → Follow up → Figure out First Appeal
I wanted to reduce that complexity.
Jawabdehi turns this into:
Grievance → AI-assisted RTI → File → Track → Deadline → Overdue → First Appeal
The objective isn't to replace the citizen's decision-making. Instead, the system organizes the process and prepares useful next steps.



2. What Jawabdehi Does

Jawabdehi currently provides an end-to-end RTI accountability workflow.

Step 1 — Describe the grievance

The user describes their issue in normal language.
For example:
"The road near my locality has been damaged for several months and repeated complaints have not resulted in any visible action."
The user doesn't need to start by understanding formal RTI drafting terminology.

Step 2 — Generate a structured RTI

Jawabdehi converts the grievance into a structured RTI application containing:
  • Subject
  • Relevant authority
  • Applicant information
  • Information requested
  • Numbered questions
  • Supporting context
The goal is to turn a vague complaint into information-seeking questions.

Step 3 — File and track

After reviewing the generated application, the user can mark the request as filed.
Jawabdehi then begins tracking the accountability lifecycle.
The application moves through states such as:
Drafted → Filed → Waiting for Response → Reminder → Overdue

Step 4 — Simulate the 30-day lifecycle

Obviously, a hackathon demonstration cannot wait 30 days.
Therefore, I implemented a time-machine/demo mode that allows the lifecycle to be accelerated.
For example:
Day 0 → Day 7 → Day 29 → Day 30
This makes it possible to demonstrate reminder and deadline behaviour during development.

Step 5 — Generate the First Appeal

If the deadline passes without a response, Jawabdehi can generate a Section 19(1) First Appeal using the original RTI context and the current request status.
The citizen can then review the generated appeal instead of starting the entire process again.



3. Why I Chose a Local-First AWS Architecture

One of my biggest constraints during this project was that I wanted to build using AWS architecture, but I did not have access to sufficient cloud credits to continuously deploy and test the entire application on AWS.
Instead of treating this as a blocker, I decided to explore the Build It approach.
The Build It track focuses on open-source AWS technologies that can run on a developer's machine.
For Jawabdehi, this led me to:
  • AWS SAM CLI
  • LocalStack
  • Cedar
AWS SAM CLI can be used to run serverless applications locally, while LocalStack provides local AWS-compatible service implementations. This approach allows developers to test serverless workflows before moving them to AWS.
This was particularly useful because I could iterate without provisioning cloud resources for every small change.



4. Architecture

The high-level architecture of Jawabdehi is:
┌─────────────────────┐
│ Next.js App │
│ User Interface │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Local API Layer │
│ SAM CLI │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Lambda │
│ Backend Logic │
└──────┬──────┬───────┘
│ │
┌────────────┘ └─────────────┐
▼ ▼
┌─────────────────┐ ┌──────────────────┐
│ DynamoDB │ │ Step Functions │
│ Request State │ │ Deadline Workflow│
└─────────────────┘ └────────┬─────────┘
│
▼
┌──────────────────┐
│ Event-driven │
│ Reminders │
└──────────────────┘

┌─────────────────────┐
│ Cedar │
│ Authorization │
│ Policies │
└─────────────────────┘

For local development, the AWS-compatible services are provided through LocalStack, while SAM CLI provides the local serverless execution environment.
The application also contains a cloud-oriented architecture that can later map the same application to managed AWS services.



5. Using AWS SAM CLI

One of the first AWS technologies I explored was AWS Serverless Application Model (SAM).
Instead of manually configuring every backend component, I defined the serverless resources in:
template.yaml

The template describes components such as:
  • API Gateway
  • Lambda functions
  • DynamoDB tables
  • Step Functions
  • Permissions
  • Environment variables
This gives the infrastructure a declarative representation.
For example, conceptually:
API Request
↓
API Gateway
↓
Lambda
↓
DynamoDB

can be represented through infrastructure configuration instead of manually setting up each component.
I found this particularly useful because the infrastructure becomes part of the repository rather than something that exists only inside a cloud console.



6. Using LocalStack

The next challenge was:
How can I test AWS-style services without continuously deploying them to AWS?
This is where LocalStack became important.
I configured a local environment containing AWS-compatible services such as:
  • DynamoDB
  • Lambda
  • API Gateway
  • Step Functions
  • EventBridge
  • SES
The LocalStack environment is defined through Docker Compose.
Conceptually:
Developer Machine
│
▼
Docker
│
▼
LocalStack
│
├── DynamoDB
├── Lambda
├── API Gateway
├── Step Functions
├── EventBridge
└── SES

This allowed me to test the architecture without creating a collection of real cloud resources for every development iteration.
AWS Builder Center examples also demonstrate this type of workflow: LocalStack can provide local AWS-compatible infrastructure while SAM CLI runs Lambda/API functionality locally.



7. Lambda Functions

I separated backend responsibilities into focused Lambda functions.
For example, Jawabdehi contains functions for responsibilities such as:
draftRequest
requestsCrud
fileRequest
checkReplyStatus
draftAppeal
sendReminder

Instead of creating one large backend service, each function is responsible for a specific part of the workflow.
This helped me think in terms of:
Event → Function → Result
rather than:
Request → One giant backend application
That separation also makes the architecture easier to extend.



8. DynamoDB for Request State

The RTI workflow requires persistent state.
An application cannot track a deadline if it doesn't remember:
  • Request ID
  • User
  • Filing date
  • Authority
  • Current status
  • Response status
  • Deadline
  • Appeal information
I therefore designed DynamoDB tables around the RTI request lifecycle.
Conceptually:
RTIRequest
├── requestId
├── userId
├── authority
├── filingDate
├── deadline
├── status
├── responseStatus
└── appealStatus

This makes the RTI request a persistent entity rather than simply a generated document.



9. Step Functions for the Accountability Workflow

One of the more interesting parts of Jawabdehi is the deadline workflow.
A 30-day deadline isn't just a number.
It represents a sequence of states:
Filed
↓
Waiting
↓
Reminder
↓
Final Reminder
↓
Deadline Reached
↓
Check Response
↓
┌───────────────┐
│ │
Response No Response
│ │
▼ ▼
Closed Overdue
│
▼
First Appeal

This is where AWS Step Functions becomes useful in the cloud architecture.
Instead of writing complicated timer logic into individual application functions, the workflow itself can represent the lifecycle.
During local development, I use the local environment and demo controls to accelerate this lifecycle.
This was one of the biggest architectural lessons from the project:
A business process with multiple states should often be represented explicitly as a workflow rather than hidden inside application code.



10. Cedar for Authorization

Another interesting part of the Build It implementation is Cedar.
I didn't want authorization logic to become scattered across frontend components and backend functions.
Instead, I created a dedicated policy:
infra/policies/jawabdehi-policy.cedar

The policy describes what different actors can do.
For example, the model distinguishes between:
Citizen
and
SystemWorkflow
A citizen should only be able to access their own RTI requests.
The system workflow, meanwhile, needs permissions for operations such as:
  • Checking response status
  • Drafting an appeal
  • Sending reminders
I also added restrictions around modifying requests after they move beyond editable states.
This made authorization more explicit and easier to reason about.



11. The AI Layer

AI is used primarily for the drafting experience.
The goal isn't simply:
"Give me an AI-generated letter."
Instead, Jawabdehi uses the user's grievance and application context to generate structured RTI content.
The workflow is approximately:
User Grievance
↓
Context Extraction
↓
RTI Intent
↓
Structured Questions
↓
RTI Application

The same context can later be reused for the First Appeal:
Original RTI
+
Filing Information
+
Response Status
+
Deadline Status
↓
First Appeal

The cloud architecture is designed to support Amazon Bedrock for the AI generation layer.
However, because my hackathon submission is targeting Build It, I have kept the local development experience separate from the production/cloud architecture rather than incorrectly presenting a cloud-only Bedrock invocation as a local service.
This separation was important for maintaining an honest and reproducible local demo.



12. A Major Challenge: Local vs Cloud

One of the biggest challenges I faced was understanding that:
A local AWS-compatible environment is not exactly the same thing as AWS itself.
This sounds obvious, but it became very important during development.
Some managed AWS services and capabilities cannot simply be reproduced locally in exactly the same way.
For example, the production architecture can use Amazon Bedrock, while the local development environment needs a different approach if it has no AWS credentials or model access.
Instead of hiding this difference, I designed the application around separable interfaces.
The principle became:
Application Logic
│
▼
Service Interface
│
┌─────┴──────┐
▼ ▼
Local Cloud
Implementation

This means the application can be developed locally while maintaining a clear path toward real AWS services.
This approach is also reflected in other AWS Builder Center projects that explicitly distinguish local implementations from production services instead of pretending that managed AWS services are fully available offline.



13. Another Challenge: Time-Based Workflows

The RTI deadline is inherently time-based.
But testing something that should happen on:
Day 7
or
Day 30
is obviously inconvenient during development.
I therefore created a demonstration time machine.
Instead of waiting:
Day 0
↓
7 real days
↓
Day 7

I can simulate:
Day 0
↓
+7 days
↓
Reminder

and then:
Day 30
↓
No Response
↓
Overdue
↓
First Appeal

This significantly improved development speed and made the complete workflow demonstrable during the hackathon.



14. Challenge: Debugging Distributed Components

Another challenge was debugging multiple components simultaneously.
The application involves:
Frontend
↓
API
↓
Lambda
↓
Database
↓
Workflow
↓
Events

When something failed, the problem wasn't always where I expected it to be.
For example, a frontend failure could actually be caused by:
  • Incorrect API payload
  • Lambda environment variable
  • DynamoDB schema
  • LocalStack service configuration
  • Step Functions input/output
  • Permission configuration
This forced me to become much more systematic about debugging.
I started checking the system layer by layer:
1. Is the frontend sending the correct request?
2. Is the API receiving it?
3. Is Lambda executing?
4. Is the data being persisted?
5. Is the workflow receiving the correct input?
6. Is the next state executing?
7. Is the final result reaching the frontend?

This was one of the most valuable lessons from building the project.



15. Challenge: Keeping the Local Environment Reproducible

A local AWS environment can quickly become difficult to reproduce if developers manually configure everything.
I therefore tried to keep the infrastructure configuration inside the repository.
The important files include:
template.yaml
localstack-compose.yml
infra/
lambdas/
stepfunctions/
policies/

The idea is that another developer should be able to inspect the repository and understand:
What services exist?
What functions exist?
What workflows exist?
What policies exist?
This is one of the reasons infrastructure-as-code was valuable for this project.



16. What I Learned

This project changed how I think about building applications.
Initially, I was primarily thinking about the product:
"How do I build an RTI assistant?"
But AWS pushed me to think about:
"How should this application behave as a distributed system?"
I learned about:
  • Serverless architecture
  • AWS SAM
  • LocalStack
  • Lambda-based application design
  • DynamoDB data modelling
  • Step Functions workflow design
  • Event-driven architecture
  • Cedar authorization
  • Infrastructure as code
  • Local/cloud portability
  • Debugging distributed systems
More importantly, I learned that choosing a cloud architecture isn't only about selecting services.
It is about understanding how those services interact.



17. Why Build It Was Valuable for Me

The Build It approach allowed me to experiment with AWS architecture without making cloud deployment a prerequisite for every development iteration.
Instead of:
Code
↓
Deploy
↓
Test
↓
Change
↓
Deploy again

I could iterate locally:
Code
↓
Run locally
↓
Test
↓
Debug
↓
Change
↓
Repeat

Tools such as SAM CLI and LocalStack made this workflow much more practical. AWS Builder Center has also highlighted local serverless development as a way to experiment without provisioning cloud resources during every iteration.



18. What I Would Improve Next

The next major step for Jawabdehi would be moving from the local Build It environment to a real AWS deployment.
The production architecture would map the local components to managed AWS services such as:
Frontend
↓
API Gateway
↓
Lambda
├── DynamoDB
├── Step Functions
├── EventBridge
└── Amazon Bedrock

This would allow me to evaluate:
  • Real deployment behaviour
  • IAM permissions
  • Service-to-service integration
  • Workflow reliability
  • Cold starts
  • Latency
  • AI response quality
  • Monitoring
  • Production security
  • Scalability
I was not able to fully perform this cloud deployment during the hackathon because I did not have sufficient AWS credits available for continuous cloud experimentation.
However, the local architecture gives me a foundation from which I can continue toward that deployment.



19. What I Would Like to Explore Next

There are several directions I want to explore.

Better AI-assisted drafting

Improve the quality of RTI questions and make the generation more context-aware while keeping the citizen in control of the final application.

Production Amazon Bedrock integration

Move the AI layer from the local development implementation to Amazon Bedrock and evaluate different models for drafting quality, latency and cost.

Stronger workflow automation

Expand the Step Functions workflow with more granular states for:
  • Reminder scheduling
  • Response detection
  • Deadline escalation
  • Appeal preparation

Better observability

Add production monitoring and structured logs so that failures across Lambda, workflows and data operations can be diagnosed more easily.

Stronger authorization

Expand the Cedar policy model as the application grows and introduce more granular permissions.



20. Final Architecture Vision

The long-term architecture I envision is:
┌───────────────────┐
│ Citizen │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Jawabdehi │
│ Next.js UI │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ API Gateway │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Lambda │
└─────┬─────┬───────┘
│ │
┌────────────┘ └─────────────┐
▼ ▼
┌─────────────┐ ┌──────────────┐
│ DynamoDB │ │ Step │
│ │ │ Functions │
└─────────────┘ └──────┬───────┘
│
┌─────────────────────────┼──────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌────────────┐ ┌────────────┐
│ EventBridge │ │ Bedrock │ │ Reminder │
│ │ │ AI │ │ Workflow │
└─────────────┘ └────────────┘ └────────────┘

Cedar
│
▼
Authorization

The local Build It architecture is the foundation for experimenting with this design before moving to managed AWS services.



Conclusion

Jawabdehi started with a simple question:
Can technology help citizens not only file an RTI, but also follow through when accountability breaks down?
The result is an AI-powered RTI accountability workflow that connects drafting, filing, deadline tracking and First Appeal generation.
But the most valuable part of the project for me wasn't only building the application.
It was learning how to design the system around serverless components, workflows, data, authorization and infrastructure.
AWS SAM CLI gave me a reproducible serverless infrastructure definition.
LocalStack allowed me to experiment with AWS-compatible services locally.
DynamoDB gave the application persistent request state.
Step Functions provided a natural model for the RTI deadline lifecycle.
Cedar allowed authorization rules to be expressed separately from application logic.
And the cloud architecture gives Jawabdehi a path toward a production deployment using managed AWS services.
For me, the biggest takeaway is this:
A good prototype demonstrates an idea. A good architecture makes that idea ready to grow.
Jawabdehi is still evolving, but this project gave me the opportunity to explore both sides.
Build locally. Learn deeply. Design for the cloud.
जवाब देना होगा.
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