Inspiration
Traditional language learning often feels like a chore, centered around high-pressure memorization that leads to burnout. I wanted to build something that removed that stress. LangLearn was inspired by the idea of "flow"—combining the addictive nature of typing games with an AI companion that actually understands how you feel. I wanted a tool that doesn't just teach you words, but adapts to your emotional state to keep you engaged and curious.
What it does
LangLearn is a full-stack web application that helps users learn a new language through three interconnected modes:
Chat AI — A conversational AI companion that adapts its tone based on the user's emotional state.
Word Bank — A personal vocabulary manager with soft-delete and restore functionality.
Typing Game — Timed typing challenge that generates sentences using the user's saved words.
The app supports 17 languages including French, Spanish, German, Italian, Portuguese, Japanese, Korean, Mandarin Chinese, Arabic, Russian, Dutch, Swedish, Polish, Turkish, Hindi, Vietnamese, and Thai.
How I built it
The app follows a sleek, single-server architecture:
Backend: Python with FastAPI to handle REST API calls and serve static files.
Frontend: Vanilla HTML, CSS, and JavaScript (no frameworks) for a lightweight, responsive UI.
AI/NLP: Amazon Bedrock (using the Nova-lite model) for text generation and Amazon Comprehend for real-time sentiment analysis.
Storage: SQLite for local data persistence and Amazon S3 for file management.
Infrastructure: Hosted on AWS EC2 (Ubuntu).
Challenges I ran into
Being a first-year university student who only know a bit of coding, when the hackathon started, given so many resources, I don't even know what to build, and what I should do, and also I ran into lots of challenges (below), thankfully that I have overcome these challenges, and gained lots of new experiences and knowledge.
AWS Permissions and Region Configuration: The EC2 instance's IAM role didn't have permission to call Bedrock or Comprehend initially, and the AWS region wasn't configured. This caused AccessDeniedException and NoRegionError errors that took time to debug.
Bedrock Model Format Changes: The model was switched from Claude to Amazon Nova mid-development, which required updating the entire request/response format — different JSON schema, different response parsing, and a cross-region inference profile ID (us.amazon.nova-lite-v1:0) instead of a direct model ID.
IME Keyboard Support: Vietnamese and Thai use IME composition — multiple keystrokes combine into one character. The original keydown-based typing game broke completely with these keyboards. Switching to input events fixed it but required rethinking the entire character-by-character comparison logic.
Consistent AI Output Parsing: Getting the AI to reliably return structured data (sentence + translation + per-word annotations) in a consistent format was tricky. The model would sometimes add extra text or skip sections. The fix was switching to strict labeled line format (SENTENCE:, TRANSLATION:, WORDS:) and parsing line by line.
Network Access: The EC2 instance's security group blocked port 8000, making it impossible to access the app from a browser during development. This required using ngrok as a tunnel to get a public URL for demos and testing.
Accomplishments that I'm proud of
I am incredibly proud of me not giving up, as mentioned before that I felt lost when the ceremony opened and we were introduced about this CloudHacks and were given so many incredible resources. Talking about one thing in the project that I have built, the Sentiment-Aware Chat is actually one of the accomplishments I'm proud of. Successfully connecting Comprehend to Bedrock so the AI "feels" the users' mood is a huge technical win. Additionally, building a custom soft-delete system in SQLite and getting full IME support for 17 different languages makes the app feel like a professional, polished product.
What I learned
How to integrate Amazon Bedrock using boto3 and structure prompts to get structured, parseable responses from large language models.
How Amazon Comprehend sentiment analysis works and how to use it to build emotionally-aware applications.
How to build a single-page application with client-side routing using vanilla JavaScript — no framework needed.
How IME (Input Method Editor) keyboards work for languages like Vietnamese and Thai, and why input events are more reliable than keydown for multilingual typing.
How to design a soft-delete system with time-based auto-purge using SQLite timestamps.
The importance of structured prompt engineering — getting the AI to return consistent, machine-parseable output (like ACTION:, SENTENCE:, TRANSLATION:, WORDS: blocks).
What's next for Langlearn
The next step is adding Amazon Polly to provide high-fidelity audio for every generated sentence so users can practice their listening skills. I also plan to implement Amazon Rekognition so users can take photos of objects in the real world and have them automatically added to their Word Bank for translation.
Built With
- amazon-bedrock
- amazon-bedrock-rest-api
- amazon-comprehend
- amazon-comprehend-rest-api
- boto3
- css
- custom-rest-api-built-with-fastapi
- ec2
- fastapi
- html
- javascript
- ngrok
- pydantic
- python
- sqlite
- uvicorn
- vanillajs-with-client-side-spa-routing
Log in or sign up for Devpost to join the conversation.