01 / Systems / Cairn

Cairn

Study streaks that only count once you've proved the work.

Role
Sole developer, final year project
Stack
Java 21, Spring Boot, React
Cloud
AWS, Amazon Bedrock
Status
In progress, to Dec 2026
Cairn on AWS: the learner's browser loads the React client from CloudFront and calls a Spring Boot API. The API stores uploads in S3 and runs a RAG pipeline that reads chunks from RDS Postgres with pgvector and generates questions with Claude on Bedrock, using an IAM role. AWS LEARNER phone or laptop CLOUDFRONT + S3 React client SPRING BOOT API Docker container S3 study material RAG PIPELINE grounded questions IAM ROLE, NO KEYS AMAZON BEDROCK Claude, Titan RDS POSTGRES pgvector
Fig. 1 · Planned architecture on AWS

I was studying for AWS Solutions Architect Associate on my own when a friend at college and I started quizzing each other. That short exchange showed me what I actually knew.

We looked for a tool to keep it going and couldn't find one. Accountability apps only record that you said you studied, and the days you didn't are the ones that matter.

  • A check has to prove you studied your material, not that you can guess.
  • It can't be a daily quiz, or nobody will use it.
  • It has to run on a student budget.

Each study day you log starts as pending. On random days, Cairn gives you a short spot-check built from the material you attached to that milestone. Pass it and every pending day turns verified. Fail it and the streak freezes until you pass a retake. You never know which day will be checked.

The questions come from a retrieval-augmented generation pipeline. Study material is split into chunks, embedded with Amazon Titan and stored in PostgreSQL with pgvector. Claude on Amazon Bedrock writes questions from the retrieved chunks only, and each question has to cite the chunk that answers it. A validation pass drops anything unsupported, ambiguous or duplicated.

On AWS, the React client is served from S3 and CloudFront, the Spring Boot API runs in Docker, the database is RDS for PostgreSQL, and uploads go to S3. The API reaches Bedrock through an IAM role, so no AI keys live in the app.

A random check means some fake days slip through. The bet is that never knowing which day will be checked does more than a quiz every day would.

Keeping vectors in Postgres instead of a separate vector store means one database to run and nothing to keep in sync.

Before building, I ran a feasibility spike on 50 generated questions. Grounding the questions in source material raised the share that tested the actual material from about half to 90% or more.

The full build runs through December 2026.