
Full Stack Challenge: FocusForge: Stop Guessing. Start Engineering Your Focus.
FocusForge is a personal productivity app that ends the guesswork around focus. Track your work sessions, discover your ideal working conditions, run controlled experiments, and get AI-powered insights to understand what actually helps you do your best work.
Vision and What It Does
Anyone who codes for a living knows the feeling: some days you sit down and four hours vanish into flow state - you look up and the module is done, tests pass, you feel like you cracked something. Other days you stare at the same function for forty minutes, check Slack, open a tab you don't need, close it, and by 3pm you've produced nothing and you're not sure why.
The difference between those two days isn't random. It's conditions - time of day, energy level, task type, interruptions, even whether you picked 25 minutes or 90. But nobody tracks this. We track steps, sleep, screen time, calories. We don't track the thing that actually determines whether a workday felt productive or wasted.
That's the problem FocusForge solves. It answers one question: "What conditions help me do my best work?" Not through guesswork or generic productivity advice, but through your own data, accumulated session by session, surfaced as patterns you can actually act on.
Here's how it works in practice. You open FocusForge and start a Burn Session - set your intention ("Refactor the auth module"), pick your task type (Coding), choose your duration (45 minutes), and rate your current energy (High). A timer runs. When you're done, you rate how focused you actually were, count your interruptions, note the outcome. That's it - 30 seconds of reflection after each work block.
After five sessions, FocusForge generates your Focus Recipe. Not a generic "mornings are better" platitude - your specific patterns, derived from your specific data. It might tell you that your Coding sessions in the Morning with High energy and zero interruptions average 4.8/5 focus, while your Evening Planning sessions with Low energy average 2.3. It calculates a Forge Score (0-100) that tracks your overall focus effectiveness over time, so you can see whether you're improving.
Alongside the recipe, there's the Focus Forecast - a real-time score telling you how well current conditions match your best historical patterns. "Good (78/100) - Mornings are your strongest window for Coding." It's not a calendar telling you to block time; it's a compass pointing at the conditions that have actually produced your best work.
Then there are Forge Experiments. Instead of guessing whether a productivity tip works for you, you run a controlled test: "If I use do-not-disturb mode during evening sessions, will my focus improve?" FocusForge captures your baseline metrics for the preceding period, tracks the experiment period, and shows you a before/after comparison with exact percentage changes. No vibes, no anecdotes - just your numbers.
When you want a nudge, there's the AI Coach. Amazon Nova reads your patterns and gives you exactly three sentences - one signal detected, one actionable suggestion. "Your morning Coding sessions consistently outperform other windows. Zero-interruption sessions rate 1.5 points higher on average. Try another experiment: block notifications during your next three evening sessions." It never lectures, never judges, never says "you failed." It's a signal detector, not a productivity guru.
The furnace metaphor isn't decoration. Your forge starts cold. You ignite it with sessions. The recipe heats up as data accumulates. Your Forge Score tells you how hot the forge is running. It's a framing that makes the whole thing feel like building something - because you are. You're building a map of your own optimal conditions, one session at a time.
This is built for developers and knowledge workers who already know they do deep work - they just don't know the specific conditions that make it click. The dark-mode industrial minimalist interface is designed to feel like a tool, not an app trying to gamify your attention. It runs on AWS serverless (Lambda, DynamoDB, Bedrock, CDK), uses Amazon Nova Pro for AI insights, and keeps every piece of your data isolated behind Cognito authentication with zero credentials in code.
The word that drives FocusForge is the same one behind any good instrument: signal. There's signal in your work patterns. Most of it goes unrecorded and unnoticed. FocusForge captures it, computes it, and points you toward the conditions where you actually produce your best work - not the conditions you think should work, but the ones that measurably do.

Full Stack Breakdown
The Full Stack series walked through pitch, prototype, MVP, UX, and launch as five distinct muscles, and building FocusForge in a 48-hour window made all five show up - sometimes simultaneously, sometimes fighting each other for priority.
Pitch. The first version of this idea in my head was "a focus timer with session tracking." That's not a pitch, that's Toggl with a Pomodoro skin. The pitch only became real once I reframed it: this isn't about timing work sessions, it's about discovering the specific conditions under which you personally produce your best work - and proving it with data rather than vibes. The moment I said "FocusForge answers 'What conditions help me do my best work?'" it stopped being a timer app and became a personal analytics engine wearing a timer's clothes.
Prototype. Most people would prototype the session form first. I didn't. The part of this idea I was least sure I could pull off wasn't the UI - it was the Recipe Engine. What does it even mean to identify someone's "best" time window when they have five sessions in the morning and two in the evening? What happens when all their interruption-free sessions are also their highest-energy ones - do you attribute the focus to the interruptions or the energy? Before writing a single React component, I built the pure engines in packages/shared/engines - classifyTimeWindow, computeForgeScore, computeRecipe - with property-based tests proving they never produce NaN, always stay in bounds, and handle degenerate cases (zero sessions, all-same-task-type, every session interrupted). Those engines are the actual prototype. Everything else is built around protecting the correctness of those computations.
MVP. The smallest version of FocusForge that could prove the idea worked was: create a session, complete it with ratings, see a dashboard with real aggregated data, and after five sessions see your Focus Recipe appear. No experiments, no AI coach, no weekly report - just the core loop of record-rate-learn. I built that end-to-end against real CDK-deployed infrastructure (DynamoDB, Cognito, API Gateway, Lambda) rather than local mocks, because I've been burned before by the gap between "works against a mock" and "works against a real conditional write with attribute_not_exists." Only once a session created on the SPA actually appeared in the dashboard with correct aggregations did I let myself add the Forecast, Experiments, and AI Coach.
UX. I gave myself a very specific design brief: "dark-mode industrial minimalist." The furnace metaphor isn't whimsy - it's the emotional arc of the app. Your forge starts cold (zero sessions: "Your forge is cold - start your first Burn Session to ignite it"). Your recipe heats up (under five sessions: "Your recipe is heating up - complete 3 more sessions"). Your Forge Score is the temperature gauge. The palette (#0B1020 background, #E94F37 primary accent, #4ECDC4 secondary) was chosen for developer-tool aesthetics - dark enough to use at 11pm after a coding session, warm enough to not feel clinical. Every transition is under 300ms. The timer notification uses a subtle Web Audio tone rather than a jarring browser alert, because the whole point of the app is to not break your focus at the exact moment you've built it up. And it's responsive: full sidebar on desktop, condensed icon rail on tablet, bottom nav on mobile - because you might start a session at your desk and complete it on the couch.
Launch. Shipping meant more than "it runs locally." It meant surviving real AWS deployment: CDK synth-time validation that the Bedrock model ID is Amazon Nova (not accidentally Anthropic), 13 CDK assertion tests enforcing no wildcard IAM resources, no credentials in Lambda environment variables, Cognito authorizer on every API method, explicit log groups with retention. It meant a gitleaks step in CI that fails the build if any credential-shaped string enters the repo. It meant a generate-env script that reads CloudFormation outputs into a git-ignored file so no ID or URL is ever hardcoded. Most of my actual engineering time went here - not because the infrastructure is complex (it's serverless, it's deliberately simple) but because making it provably secure required writing tests that inspect the synthesized template for exactly the things that would silently go wrong in production.


AWS Services / Architecture
Every piece of this app is serverless, which felt right for something that gets used in short, intense bursts - a developer starting a 45-minute session, rating it, then going silent until the next one -rather than constant background traffic.
Amazon API Gateway (REST API) is the single entry point for the entire backend. It validates JWTs from Cognito on every request before Lambda ever executes, enforces payload size limits, handles CORS, and maps all 13 endpoints into the { data, error, meta } response envelope. Every non-OPTIONS method carries a COGNITO_USER_POOLS authorizer - there's no path into the system without a valid token.
AWS Lambda (Node.js 20, ARM64, six functions sharing a common handler harness) does all the actual work - session CRUD with idempotent creates and conditional completions, recipe and forecast computation, experiment lifecycle management, dashboard aggregation, weekly report generation, and AI insight orchestration. Each function gets exactly the IAM permissions it needs: read-write for sessions and experiments, read-only for recipe, forecast, and dashboard. No function can touch Bedrock except the insights function.
Amazon DynamoDB holds everything in a single table with a deliberate single-table design: partition key userId, sort key entityId prefixed with SESSION#, EXPERIMENT#, or PROFILE. Two GSIs - gsi1-startedAt for date-range queries with an INCLUDE projection that deliberately excludes intention and notes (they're large text that listing queries don't need), and gsi2-taskType for task-filtered queries. On-demand billing, point-in-time recovery enabled, conditional writes enforcing idempotent session creation and the single-active-experiment rule at the database level.
Amazon Bedrock, specifically Amazon Nova Pro (amazon.nova-pro-v1:0), is what makes FocusForge feel like it has a coach rather than just a spreadsheet. It reads your Focus Recipe and recent session summaries (never your free-text intentions or notes - those stay out of the prompt entirely) and generates a three-sentence insight with exactly one actionable suggestion, using non-judgmental vocabulary: "Signal detected," "Your pattern is changing," "Try another experiment." A 3-second timeout, one jittered retry on throttling, and graceful fallback to "The forge is resting. Try again shortly." - AI unavailability never becomes a 5xx for the user.
Amazon Cognito (User Pool with SPA app client) handles email/password sign-up, sign-in, and silent token refresh. No client secret (browser SPA), SRP auth flow, 1-hour access tokens, 30-day refresh tokens, token revocation enabled, and preventUserExistenceErrors: true so failed sign-ins never reveal whether an email is registered. The entire auth surface returns one generic message for every failure mode.
AWS CDK (TypeScript) codifies the entire infrastructure in six constructs - Data, Auth, Functions, API, AI Policy, Monitoring - with synth-time validation that rejects any bedrockModelId not matching the Nova family regex. Thirteen CDK assertion tests run in CI verifying no wildcard IAM resources, no credentials in environment variables, Cognito authorizer on every method, explicit log groups with retention, no hardcoded account IDs or regions, and that the Bedrock policy scopes to exactly bedrock:InvokeModel and bedrock:Converse on the configured Nova ARN only.
Amazon CloudWatch captures structured JSON logs from every Lambda with correlation IDs that match the ones returned in API responses, plus alarms on error rates and p95 latency. When something goes wrong at 2am, the correlation ID in the user's error toast is the same one in the log entry - one search finds the full trace.
Architecture Diagram

App-flow Diagram

What I Learned
I went into this challenge already comfortable with AWS serverless and TypeScript, but comfortable is not the same as battle-tested against a 48-hour clock, and this project found the gaps between those two words pretty quickly.
The biggest one was realizing that "pure engines" isn't just an architectural pattern - it's a survival strategy for a time-constrained build. The decision to keep all analytics logic (Recipe, Forecast, Dashboard, Forge Score) as zero-dependency pure functions in a shared package, completely divorced from any AWS SDK import, meant I could write and property-test the hardest math in the system at thousands of iterations per second with no mocks, no LocalStack, no credentials. That single decision probably saved me eight hours of debugging that would have otherwise been spent untangling "is the bug in my formula or in my DynamoDB marshalling?" I now reflexively ask "can this be pure?" before reaching for any I/O.
I also came out of this with a much more disciplined relationship with DynamoDB's single-table design. The theory is clean - prefixed sort keys, GSIs for access patterns, conditional writes for invariants. The practice has sharp edges: an INCLUDE projection that accidentally carries your largest text fields doubles your read costs and your response times. A conditional write on attribute_not_exists(entityId) gives you idempotent creates for free, but only if you understand that the condition is evaluated against the item that would be created, not an existing one. These aren't gotchas once you know them - they're features - but they only became obvious to me once I wrote CDK assertion tests that inspect the synthesized template for exactly the projection attributes I intended.
Probably the thing I'm personally most satisfied by is realizing that the Forge Score formula was a product decision as much as a technical one. It would have been easy to just average the focus ratings and call it a metric. But (avgFocusRating/5 * 40) + (completionRate/100 * 30) + (interruptionScore * 30) with an explicit clamp and NaN-proof substitution of zero for missing components - that's not arbitrary. The 40/30/30 weighting says "your subjective focus quality matters most, but finishing what you start and maintaining an interruption-free environment matter too." That distinction only became clear once I sat with the formula and property-tested it against degenerate inputs (empty sessions, all-interrupted, single session) rather than just eyeballing the output once.
I also learned something unexpected about credential security: it's not enough to just not put secrets in your code - you need to make it structurally impossible for them to accidentally appear, and then prove it with automated tests. Writing a CDK assertion that scans every Lambda's environment variables against a credential-pattern regex, a gitleaks step that fails CI on any finding, and a repository guard test that scans every tracked file for access-key-shaped strings - that's three independent layers of the same guarantee. Any one of them catches the mistake. All three together mean you stop worrying about it entirely, which frees mental space for the actual product.
The Bedrock integration taught me that AI in a product isn't about the model call - it's about the contract around the model call. The actual ConverseCommand is five lines. The 95% of engineering effort is in: what goes into the prompt (structured data only, never user free text), what comes out (enforced three-sentence limit, vocabulary constraints), what happens when it fails (jittered retry on throttling, graceful fallback message, never a 5xx), and what happens when there isn't enough data yet (skip the model entirely, return templated onboarding encouragement). The model is the easy part. The discipline around it is where the product quality lives.
And finally, a smaller but genuinely useful lesson about monorepo TypeScript: sharing Zod schemas between frontend and backend via a workspace package sounds elegant in theory, but only works smoothly if your arbitraries (fast-check generators) are tested against those same schemas. The moment I added a test that says "for all generated sessions, the Zod schema must accept them" I created a living contract: if the schema drifts from the types, or the generators drift from the schema, the build breaks before any human needs to notice. That's the kind of infrastructure that pays for itself every single day of a project's life.


Link to App or Repo
Conclusion
FocusForge started as a frustration about not knowing why some work days feel effortless and others feel like pushing through concrete, and ended up teaching me more about pure-function architecture, DynamoDB single-table design, Bedrock prompt contracts, and property-based testing than I expected from a 48-hour challenge. What I'm most proud of isn't the tech stack - it's that the Recipe Engine actually works the way I hoped it would. It finds the specific conditions under which you personally do your best work, not through generic productivity advice but through your own accumulated data, proven by your own numbers. If nothing else, the next time I sit down to code and wonder whether this is going to be a good session or a wasted one, I finally have somewhere to check.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article