AWS Builder Center

Building PageBhasha: Using AWS to Support a Regional-Language Learning Assistant

How our team built a textbook learning assistant using Gemini, with AWS Parameter Store for credentials, S3 for lesson backups, and DynamoDB for doubt-chat records—and what we learned when AI requests failed.

A textbook explanation can be technically correct and still leave a student confused. Sometimes the missing piece is another example. Sometimes it is the opportunity to ask a follow-up question. Sometimes it is simply hearing the explanation in a familiar language.
That is the problem we chose to work on with PageBhasha.
I’m Harshika Thopte, the team leader and backend developer. I built the backend, AI integration, and AWS integrations, while my teammate Ishan Sonawane worked on UI/UX and frontend development.
We built PageBhasha for First Commit, part of the Bharat Builds Tour.

From a textbook passage to a lesson

The learning flow starts with material the student already has. They can upload a textbook photo or PDF, or paste a passage. They then choose their explanation language, class level, and preferred level of detail.
Google Gemini generates the learning content. PageBhasha presents it as a structured lesson, with explanations, important terms, revision notes, and practice questions.
The doubt chat lets students continue the conversation around the current lesson. For example, after reading about food chains, a student might ask why energy decreases at each stage. Keeping the lesson as context helps the follow-up stay connected to what they are studying.
Building this involved more than sending text to a model. We needed to handle credentials, preserve generated material, record chat interactions, and make failures understandable.

Three places where we used AWS

We integrated AWS into three parts of the backend.
AWS Systems Manager Parameter Store
The backend needs the Gemini API key to make AI requests. We store that key as an encrypted parameter in Parameter Store.
At startup, the backend retrieves the parameter with decryption and loads the value into memory. This keeps the API key out of the frontend and source repository.
Moving the credential into Parameter Store also gave us a clear separation between application code and the secret required to run it.
Amazon S3
A successful lesson contains structured information that we can store as JSON.
After generation succeeds, the backend packages the lesson into a JSON file and uploads it to an S3 bucket. This provides a cloud copy of the generated material.
In this implementation, S3’s role is lesson storage. Saving these objects does not automatically create a complete student account or cross-device notebook; those are separate features we would need to build.
Amazon DynamoDB
For follow-up questions, we record the session ID, timestamp, question, AI answer, and selected language in DynamoDB.
These records give us a foundation for conversation history and future analysis of how the doubt feature is used. We have implemented the logging; a full analytics dashboard remains future work.
The overall flow is straightforward: the backend retrieves its credential from Parameter Store, uses Gemini to generate learning content, saves successful lessons to S3, and records doubt-chat interactions in DynamoDB.

The failures taught us something useful

During development, we encountered request limits and temporary AI service errors.
These failures affected multiple languages, which made diagnosis important. A failed response did not necessarily mean a language was unsupported. The request could be blocked by provider quota or temporary availability.
We also had to think about what the student would see when that happened. Their input should remain available. The error should explain that generation failed, and the interface should offer a way to retry.
A prepared demo can help someone explore the product while the AI service is unavailable, but it should remain clearly labelled. It should never quietly replace the answer to a student’s own textbook page.

What we want to improve next

We need more testing of regional-language output with fluent speakers. A language appearing in a selector is only the beginning; the explanation must also be accurate and readable.
We also want to improve reliability and define clearer retention and deletion controls for stored lessons and chat records.
This project helped me see how much happens around an AI response. The model generates the content, but the surrounding application determines whether that content is stored properly, presented clearly, and handled honestly when something goes wrong.
That is the part of PageBhasha we want to keep strengthening.
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