
Weekend Productivity Challenge: Recall
A second brain for students, built on Amazon Bedrock and DynamoDB. Log a quick note after any study session, and Recall remembers it — surfacing patterns, updating your goals, and telling you exactly what to tackle next.
Vision & What It Does
Most students don't have a memory problem, they have a pattern-recognition problem. You know you've struggled with recursion before — you just don't remember it was the third time this month, or that it always shows up right after you skip review sessions. Without that context, every study session starts from zero: no memory of what you've already tried, what's actually working, or what deserves attention today.
Recall fixes this by giving students a place to drop a quick note after every session — "struggled with recursion again," "finally got dynamic programming" — and having AI actually remember it. There's no login, no setup: opening the app generates a random ID in the browser, so a friend can be using it within ten seconds of opening the link. Every note gets logged, and each time you add a new one, Recall re-reads your last several sessions plus your running goal list and gives back three things: an updated set of goals (stale ones retired, new ones added based on what you've actually been struggling with), the top 3 concrete next tasks ordered by what unblocks you fastest, and a one-line reflection noticing a pattern — like flagging that recursion has come up three times this month.
The point isn't a fancier to-do list. It's closing the loop between "I studied something" and "the app actually remembers and adjusts what it recommends" — the same thing a good mentor does, minus needing a mentor available at 11pm before an exam.
How I Built It!
I built the memory layer first, before any UI, because that's the part that actually makes this different from a plain notes app. DynamoDB uses a single table with
userId as the partition key and a sort key that's either SESSION#<timestamp> for individual study notes or a fixed GOALS key for the current goal list — so one query with begins_with(sk, "SESSION#") pulls the last 10 sessions, and a second, separate exact-match query grabs the current goals. Simple enough that there's no need for a secondary index.Each new note triggers a full cycle: Lambda reads the last 10 sessions and current goals from DynamoDB, passes all of it — new note plus history plus goals — into a single Bedrock call (Nova Micro), and writes the result back: a fresh session entry, plus an overwritten goals record. The trickiest part of the prompt was getting the model to actually use the history instead of just reacting to the newest note in isolation — I had to be explicit in the system prompt that a struggle mentioned 3+ times across sessions should get flagged as a pattern, otherwise the model treated every note as a fresh, unconnected data point.
Bedrock's tendency to occasionally wrap JSON in markdown fences showed up here too, so the same defensive pattern applied: strip any code-fence artifacts, retry once on a parse failure, and if both attempts fail, fall back to returning the goals unchanged with a generic reflection rather than breaking the whole request. Lambda is exposed through a Function URL rather than API Gateway — no throttling or usage plans needed for a single endpoint — which meant CORS had to be handled manually in both the AWS-side config and the Lambda response headers, plus explicit
OPTIONS handling for the preflight request.The frontend is Next.js on Vercel, with a single API route proxying requests to the Lambda Function URL so the raw AWS endpoint never sits in client-side code. The real test wasn't whether Bedrock returned sensible-looking JSON — it was logging a session, refreshing the page, logging a second one, and confirming both showed up in history. That's the only way to actually confirm DynamoDB is persisting state and not just watching Bedrock respond to a single note in isolation.
AWS Services Used / Architecture
Browser (Next.js UI on Vercel, random userId in localStorage) | |-- POST /api/recall (Next.js API route, thin proxy) | └-- HTTPS POST --> Lambda Function URL --> AWS Lambda (Node.js 20.x) | |-- Query DynamoDB: last 10 sessions + current goals | |-- InvokeModel --> Amazon Bedrock (Nova Micro) | └-- Write DynamoDB: new session entry + updated goals- Amazon Bedrock (Nova Micro,
amazon.nova-micro-v1:0) reads the new note plus recent history and goals, and returns an updated goal list, 3 prioritized next tasks, and a one-line reflection.
- AWS Lambda (Node.js 20.x) orchestrates DynamoDB reads/writes around the Bedrock call, handles markdown-fence stripping and retry/fallback logic, and is exposed via a public Function URL with CORS enabled.
- Amazon DynamoDB is the actual "second brain" — a single table (PK:
userId, SK:SESSION#<timestamp>orGOALS) storing every session note and the current goal state, on PAY_PER_REQUEST billing.
- AWS IAM scopes the Lambda execution role to
dynamodb:Query/dynamodb:PutItemon the one table plusbedrock:InvokeModelon the Nova Micro model ARN — nothing broader.
- Amazon CloudWatch Logs captures Lambda execution traces and any Bedrock parsing failures.
Vercel hosts the frontend purely for fast global delivery — memory, reasoning, and state all live on AWS.
What I Learned
Memory is the feature, not the storage. It was tempting to treat DynamoDB as just "somewhere to save notes," but the actual product only works because the AI call is given that history every time — persistence without feeding it back into the prompt would just be a diary, not a second brain.
Pattern detection needs an explicit threshold in the prompt. Left to its own judgment, the model treated every note independently. Telling it explicitly "flag anything mentioned 3+ times across sessions" is what actually produced reflections that felt insightful instead of generic.
A single-table DynamoDB design stays simple if you pick the sort key carefully. Using a prefix (
SESSION# ) for one entry type and a fixed key ( GOALS ) for the other meant both query patterns — "recent history" and "current state" — stayed straightforward with no secondary indexes needed.The real test of a "memory" app isn't the first note, it's the second. Anyone can make session one look impressive. Refreshing the page and confirming session two actually built on session one is the only way to know persistence is doing its job rather than the app just looking stateful because of clever prompting on a single input.
The whole build — Lambda handler, DynamoDB table, and Next.js frontend — came in comfortably under a day, most of it spent on the DynamoDB key design and the prompt's pattern-detection logic rather than plumbing.
Link to Repo: https://github.com/Vijayshree25/productivity\_tool
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article