Inspiration

The biggest hurdle in language learning isn't difficulty; it's consistency. Traditional flashcard applications, while effective, can often feel like a chore, making it difficult to maintain a daily habit. I noticed that people are great at integrating audio content like podcasts and music into their daily lives—during commutes, at the gym, or while doing chores.

The inspiration for MemorAI came from a simple question: What if I could merge the proven effectiveness of Spaced Repetition Systems (SRS) with the convenience and passive nature of audio? I wanted to create an application that transforms the daily grind of reviewing vocabulary into a seamless, engaging podcast you can listen to anywhere, making language learning feel less like work and more like a natural part of your day.

What it does

MemorAI is a smart, audio-focused Spaced Repetition System designed to help you master new languages.

Here's the user journey:

  1. Translate & Collect: A user can search for any word or phrase. The app provides both formal and informal translations to help them understand real-world context. They can then add these new translations as flashcards to organized, custom decks.
  2. Generate an Audio Review: Instead of manually flipping cards, the user goes to their Review Hub. The app shows exactly how many cards are due for practice in each deck. With a single tap on "Generate," a unique audio lesson is created from those specific cards.
  3. Listen & Learn: The user receives a real-time notification when their personalized MP3 file is ready. The audio is designed for active recall, providing a prompt, a pause to think, and then the answer. The in-app player also features synced subtitles that highlight words as they're spoken.
  4. Provide Feedback: After listening, the user rates their recall for each card ("Again," "Good," "Easy"). This feedback is crucial, as it updates the SRS algorithm to schedule the next review at the optimal time, personalizing the learning curve for each user.

How we built it

To bring MemorAI to life, I built it on a modern, serverless architecture on AWS, defined and managed as infrastructure-as-code using the AWS CDK and AWS Amplify Gen 2.

  • Frontend: A responsive Next.js application using Amplify UI components. The real-time, dynamic user experience is powered by AWS AppSync GraphQL subscriptions.
  • Authentication & API: User identity is managed by AWS Cognito, and the data layer is handled by an AWS AppSync API connected to an Amazon DynamoDB database.
  • Asynchronous Audio Generation: The core of the application is an event-driven workflow that ensures the UI is always fast and responsive:
    1. start-review-generation (Lambda): A user's request triggers this function, which "claims" due cards in DynamoDB and sends a message with card IDs to an Amazon SQS queue.
    2. process-card-sets (Lambda): Triggered by SQS, this is the workhorse. It retrieves the cards and makes two calls to Amazon Bedrock (using the Claude model): first, to creatively weave the vocabulary into a short story, and second, to convert that story and the cards into a structured SSML file for natural speech.
      This Lambda then initiates an asynchronous task in Amazon Polly, instructing it to generate the audio from the SSML and publish a completion notification to an Amazon SNS topic.
    3. notify-completion (Lambda): Triggered by the SNS message from Polly, this function updates the ReviewFile record in DynamoDB with the final S3 paths and a 'ready' status. It then creates a notification that instantly appears in the user's header via the AppSync subscription.

Challenges I ran into

  1. Designing a Robust Asynchronous Workflow: My primary challenge was designing a fully asynchronous, event-driven architecture that could handle the long-running process reliably in the background. I solved this by using SQS and SNS to decouple the initial user request from the heavy lifting, ensuring the work happens reliably in the background.
  2. Workaround for AWS Bedrock limits: during testing Claude Sonnet 4 on AWS Bedrock, I figured out there’s a limit on the number of out tokens. It seemed to be an account level limit which needed contacting AWS support. As I was facing a deadline for the Hackathon, I decided to directly use Anthropic Claude API until I get feedback from the AWS support.

Accomplishments that I'm proud of

  1. The Event-Driven Architecture: I'm proud of the resilient and scalable asynchronous workflow I was able to engineer. It's designed to handle a high volume of requests, with the goal of keeping the user experience fast and fluid at all times.
  2. Creative Use of Generative AI: I tried to go beyond simple text-to-speech. Using Bedrock to create contextual stories from flashcards is a feature that I believe can significantly enhance learning and memorization.

What I learned

My biggest takeaway from this project was how enjoyable and productive building a full-stack application with AWS Amplify Gen 2 can be. I was surprised at how easy it was to set up a complete backend, from authentication with Cognito to a real-time GraphQL API with AppSync, directly from a TypeScript schema. Defining data models, relationships, and authorization rules in one place streamlined the entire development process. This powerful abstraction allowed me to focus my time and energy on creating the unique features of MemorAI, rather than on boilerplate infrastructure and configuration.

What's next for MemorAI

The vision for MemorAI is to make it the most engaging audio-based learning tool available. I'm just getting started, and my roadmap is focused on three key areas:

  • Multi-language Support: Expanding beyond German to include popular languages like Spanish, French, and Japanese.
  • Gamification and Streaks: Adding points, badges, and daily streak tracking to further motivate users and encourage daily practice.
  • Community Decks: Creating a feature for users to share their high-quality decks with the community, allowing others to subscribe and learn from them.
  • Deeper Analytics: Leveraging the DailyStats model to provide users with more detailed charts on their performance, accuracy, and learning velocity over time.

Built With

Share this project:

Updates

Submission history