DEV Community

Cover image for RecallLoop: I Built an AI That Turns Forgotten Bookmarks Into Lasting Knowledge
Arun Yadav
Arun Yadav

Posted on

RecallLoop: I Built an AI That Turns Forgotten Bookmarks Into Lasting Knowledge

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission πŸ¦₯

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.

I have a habit that I suspect many developers share.

I discover an interesting article about system design, Python, databases, or something completely new. I think, "This looks useful. I'll read it properly later."

I bookmark it.

Then I find another article. And another.

A few weeks later, my bookmarks have become a collection of things I wanted to learn but barely remember.

The problem isn't that I can't save information. It's that saving information doesn't mean I've learned it.

For this week's Slow and Steady challenge, I wanted to build something that does the repetitive preparation work for me, while making it easier to build knowledge over time.

That's how RecallLoop started.

Save it. Learn it. Remember it.

What I Built

RecallLoop is an open-source, AI-powered learning companion that transforms saved articles into active-recall questions and schedules future reviews using spaced repetition.

Instead of manually rereading every article or creating flashcards from scratch, users can save a URL and let RecallLoop prepare the learning material.

Here's the experience:

1. Save an article

Paste a public article URL into RecallLoop. The application fetches the page and extracts its readable content, removing much of the surrounding website clutter.

2. Let AI find the important ideas

Google's open-weight Gemma 4 model analyzes the extracted text and generates up to three meaningful concepts, with explanations, questions, answers, and supporting excerpts from the original article.

3. Practice active recall

RecallLoop presents a question without immediately revealing the answer.

Try to remember it, reveal the answer, and assess how well you recalled the concept.

4. Choose how well you remembered

Each review has three options:

  • Forgot: Review again in approximately 10 minutes.
  • Hard: Review again sooner, initially after one day.
  • Easy: Start with a longer interval, initially three days.

Future intervals adapt to your review history using a deterministic scheduling algorithm.

5. Return when it's time to review

RecallLoop tracks due cards, upcoming review dates, and review history.

You don't have to repeatedly decide what to study next.

Who is it for?

I built RecallLoop for developers, students, self-learners, and anyone who saves useful articles but struggles to revisit them.

The idea is simple:

Let the machine prepare the questions. Let the learner do the remembering.

That distinction matters. RecallLoop doesn't eliminate learning effort. It eliminates some of the repetitive work surrounding learning.

Demo

Live application: https://recallloop-web.onrender.com/

Source code: https://github.com/itsdevcode/recallloop

RecallLoop interface

RecallLoop landing page

RecallLoop's landing page introduces a simpler way to turn saved knowledge into something useful.

RecallLoop dashboard

The dashboard brings together saved articles, due reviews, and learning progress.

RecallLoop active recall

The review experience focuses on one question at a time, with the answer hidden until the learner is ready.

The demo is hosted using Render's free-tier infrastructure. Free services may sleep after inactivity, so the first request can take longer while the application wakes up.

The demonstration is intended for evaluation rather than uninterrupted production usage.

Code

The complete project is open source:

GitHub logo itsdevcode / recallloop

Turn saved articles into lasting knowledge with AI-powered recall and spaced repetition.

RecallLoop

Save it. Learn it. Remember it.

RecallLoop is an open-source learning companion that turns saved articles into recall cards and schedules focused reviews with a deterministic spaced-repetition policy Bookmarks preserve a link. RecallLoop gives its ideas a reason to return Save a public article, let hosted Gemma create source-grounded questions, and practice one card at a time. Your recall ratings determine when each card returns.

Implemented and planned

Implemented:

  • Independently runnable FastAPI API and Next.js frontend.
  • PostgreSQL users with database-generated UUIDs, normalized unique emails Argon2 password hashes, active status, and timezone-aware timestamps.
  • Registration, login, current profile, and logout endpoints.
  • Fifteen-minute HS256 JWTs transported only in an HttpOnly cookie.
  • Same-origin API proxies, CSRF protection, registration/login pages, and a protected dashboard.
  • Per-user article saving, paginated library, readable text details, and confirmed deletion.
  • Bounded, SSRF-protected public HTML fetching and Trafilatura extraction in Celery.
  • Hosted Gemma concepts and recall questions/answers with source evidence…

RecallLoop uses a monorepo structure with separate frontend and backend applications.

recallloop/
β”œβ”€β”€ recallloop-api/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ ai/
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── workers/
β”‚   β”œβ”€β”€ alembic/
β”‚   └── tests/
β”œβ”€β”€ recallloop-web/
β”‚   β”œβ”€β”€ src/
β”‚   └── tests/
β”œβ”€β”€ docs/
β”œβ”€β”€ render.yaml
└── render.free.yaml
Enter fullscreen mode Exit fullscreen mode

The repository contains the source code, database migrations, AI integration, review scheduling, deployment configurations, and tests.

How I Built It

RecallLoop combines an open-weight language model, background processing, a relational database, and a focused web interface.

Tech stack

Layer Technology
Frontend Next.js, React, TypeScript, Tailwind CSS
Backend FastAPI, Python
Database PostgreSQL
ORM and migrations SQLAlchemy, Alembic
Background processing Celery
Message broker Redis-compatible Valkey
Article extraction Trafilatura
AI model Gemma 4 (gemma-4-26b-a4b-it)
AI integration Google GenAI SDK
Hosting Render
Testing pytest, Playwright

1. Extracting useful content

A normal article webpage contains navigation, advertisements, menus, and other elements that aren't helpful when generating learning material.

RecallLoop uses Trafilatura to extract readable article text.

The fetching layer includes protections such as URL validation, public-network restrictions, redirect checks, and resource limits.

This was important because the application accepts URLs supplied by users.

2. Generating concepts with Gemma

The core AI component uses Google's open-weight Gemma 4 26B model through hosted inference.

I chose Gemma because I wanted an open-weight model to power the most important feature of the application: turning source material into useful learning questions.

The model is instructed to return structured information:

{
  "concepts": [
    {
      "title": "Database Indexes",
      "explanation": "A database index helps locate records efficiently.",
      "source_excerpt": "Exact supporting passage copied from the article",
      "question": "Why can an index improve database query performance?",
      "answer": "It provides an efficient lookup path instead of requiring every row to be examined."
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Illustrative structure; not a verbatim model response.

Each concept must satisfy validation rules.

For example:

  • Questions and answers must be meaningful.
  • Duplicate questions and concepts are rejected.
  • The supporting source excerpt must appear in the extracted article text.
  • Invalid responses can trigger a bounded repair attempt.

The model is not allowed to invent source evidence.

This makes RecallLoop more than a generic text-generation interface. The AI output has to be usable within a real learning workflow.

3. The unexpected JSON problem

One of the interesting technical challenges appeared during live Gemma testing.

My first smoke test failed with a generic AIError.

After adding safer diagnostics, I discovered that the model sometimes returned valid JSON wrapped in Markdown code fences.

For example:

{
  "concepts": []
}
Enter fullscreen mode Exit fullscreen mode

The original parser expected raw JSON, so it rejected that response.

I added a JSON extraction step while keeping Pydantic validation and source-evidence verification.

Later testing also revealed occasional schema-validation failures. A subsequent real smoke test successfully generated and validated three concepts in approximately nine seconds.

That was a valuable lesson: a successful model response isn't automatically a valid application response.

When using AI inside software, output validation is part of the product, not an optional extra.

4. Background processing with Celery

Article processing involves multiple steps:

Save URL
   ↓
PostgreSQL: PENDING
   ↓
Celery worker
   ↓
Fetch and extract article
   ↓
Gemma generates learning material
   ↓
Validate concepts and evidence
   ↓
PostgreSQL: READY
   ↓
Recall session
Enter fullscreen mode Exit fullscreen mode

I didn't want users to sit on a loading screen while extraction and AI generation happened inside an HTTP request.

FastAPI saves the article and queues processing. Celery handles extraction and generation in the background.

The implementation includes retry limits, processing leases, and recovery logic to handle interrupted jobs.

5. Spaced repetition without asking AI to schedule reviews

I deliberately kept scheduling separate from Gemma.

AI generates the concepts and questions.

A deterministic Python algorithm decides the next review time.

For example, a forgotten card comes back quickly, while an easily remembered card receives a longer interval.

The system persists review history, timestamps, repetition counts, and scheduling state in PostgreSQL.

This approach makes scheduling predictable, testable, and independent of model output.

It's a simplified learning policy, not a claim to implement FSRS or the full SM-2 algorithm.

6. Deploying on Render's free tier

RecallLoop has two Render configurations:

  • render.yaml for the original paid production architecture.
  • render.free.yaml for a lower-cost demonstration setup.

The free configuration runs:

  • Next.js frontend
  • FastAPI backend
  • PostgreSQL database
  • Valkey broker

Because dedicated background workers require paid compute, the free demonstration colocates FastAPI and Celery in one web service.

That introduces trade-offs: both processes share limited memory, the service can sleep, and the free database has a limited lifetime.

I chose to document those limitations rather than describe the demo architecture as production-ready.

Why Does Open Innovation Matter?

For RecallLoop, open innovation is about control over the technology that makes the product valuable.

Gemma's open-weight availability means that the learning-generation component is not conceptually tied to one proprietary model endpoint.

Today, my implementation uses hosted Gemma inference through Google's API. It does not run offline.

However, an open-weight model creates opportunities for future development:

Model portability: The inference layer can potentially be adapted to different compatible hosting environments.

Experimentation: Developers can study how prompt design, validation rules, and model selection affect generated learning material.

Customization: The system could eventually support models adapted for different subjects or learning styles.

Transparency: Developers can inspect how RecallLoop extracts articles, validates model responses, and schedules reviews.

A closed API could also generate flashcards. The advantage of the open-weight approach is the flexibility to explore alternatives without making the underlying model permanently dependent on one proprietary provider.

Open innovation makes experimentation and collaboration easier.

And because RecallLoop itself is open source, other developers can examine its architecture, improve the scheduling algorithm, or build new learning experiences around it.

The Lazy Payoff

The repetitive work I wanted to eliminate wasn't the act of studying.

It was everything around studying.

Before RecallLoop, turning an article into a review routine meant manually identifying concepts, writing questions, recording answers, and deciding when to revisit them.

With RecallLoop, that preparation is handled by the application.

Before RecallLoop With RecallLoop
Manually identify important ideas Gemma proposes source-grounded concepts
Write flashcard questions Questions and answers are generated
Track review dates manually Reviews are scheduled automatically
Search through old bookmarks Due cards appear in one place
Decide what to revise next A focused review queue guides the session

I haven't measured long-term retention improvements or time saved across real users yet.

But the core workflow already demonstrates the benefit: a saved article can become structured learning material without manually creating each flashcard.

The learner still has to think.

The application handles much of the preparation and organization.

That's the kind of laziness I wanted to reward.

What I Learned

This project taught me several practical lessons.

First, model output needs careful validation. Even when a model is available and responding, the output can violate a strict schema.

Second, background processing requires recovery planning. Fetching content and generating questions aren't always reliable operations.

Third, simpler algorithms can be useful. A transparent scheduling policy was easier to reason about and test than introducing unnecessary complexity.

Finally, deployment constraints shape architecture. Running a backend and worker on a limited free instance requires compromises that should be documented openly.

What's Next?

There are several directions I'd like to explore:

  • More sophisticated spaced repetition, potentially using FSRS.
  • Better article organization.
  • Importing existing bookmarks.
  • Improved question quality and personalization.
  • More flexible open-weight model hosting.
  • Better learning analytics.

For now, I wanted RecallLoop to solve one focused problem:

Help people remember more from the things they already save.

Prize Categories

I'm entering:

Best Use of Gemma

RecallLoop uses the open-weight Gemma 4 model as its central AI component. Gemma transforms extracted articles into source-grounded learning concepts, questions, and answers.

Best Use of Render

RecallLoop's live demonstration is deployed on Render using its web services, PostgreSQL, and Key Value infrastructure. I also built a free-tier deployment configuration that combines the API and Celery worker within a constrained demonstration environment.


If you've ever saved an article and never opened it again, I'd love to hear how you deal with that problem.

Try RecallLoop: https://recallloop-web.onrender.com/

Explore the code: https://github.com/itsdevcode/recallloop

Save it. Learn it. Remember it.

Top comments (0)