
Weekend Productivity Challenge: ADR Generator
An AI-powered tool that generates complete Architecture Decision Records from a brief description, built with Amazon Bedrock, Lambda, and S3 in a weekend.
Vision & What the App Does
Architecture Decision Records (ADRs) are essential for any engineering team, yet they're one of those things everyone agrees should exist but nobody wants to write. The friction of opening a blank document, remembering the correct format, and articulating alternatives and consequences means most decisions go undocumented.
ADR Generator solves this by turning a brief description into a complete, well-structured ADR in seconds. You provide a title (e.g., "Use PostgreSQL instead of MongoDB for payments"), a short context describing why the decision is needed, and optionally your tech stack and constraints. The AI generates a full ADR with all standard sections: Title, Date, Status, Context, Decision, Alternatives Considered, and Consequences.

From a user perspective, the flow is simple:
- Fill out a short form with your decision context
- Choose a detail level (Brief, Standard, or Detailed)
- Click "Generate ADR" and wait a few seconds
- Review the generated ADR rendered as formatted markdown
- Download it as a
.mdfile ready to commit to your repo
The app also maintains a list of all your generated ADRs, lets you view any past decision, download it, or delete it when it's no longer relevant.
How You Built It
I followed a spec-driven development approach using Kiro, starting with formal requirements (user stories with acceptance criteria), then a technical design document, and finally a task list that guided implementation step by step.
Key decisions made during development:
- S3 over DynamoDB for storage — ADRs are markdown files by nature. Storing them in S3 as actual
.mdfiles is more natural than serializing them into database fields. Anindex.jsonfile in the bucket serves as the catalog.
- Single Lambda, multiple handlers — Instead of deploying 4 separate Lambda functions, I used one Lambda with routing logic. This reduces cold starts (shared runtime), simplifies deployment, and keeps the codebase cohesive.
- Client-side download — Rather than creating a separate download endpoint, the frontend generates the file from the already-fetched content using a Blob. No extra API call needed.
- Dark theme with AWS branding — A navy + orange color scheme that feels professional and is immediately recognizable to anyone familiar with the AWS ecosystem.
Challenges encountered:
- Partial failure handling — What happens if Bedrock generates the ADR successfully but S3 fails to save it? I implemented a
SaveFailedErrorcustom class that carries the generated content, allowing the frontend to show the ADR to the user with a "retry save" option. The HTTP 207 response code signals this state.
- Front matter stripping — The stored markdown includes YAML front matter for metadata, but the viewer shouldn't display raw YAML to the user. A
stripFrontMatterutility handles this cleanly.
- Bedrock model compatibility — The service supports both Amazon Nova and Anthropic Claude models with different request/response formats, detected automatically by model ID prefix.
AWS Services Used / Architecture Overview
The application uses 5 AWS services:
Service | Role |
|---|---|
AWS Amplify | Hosts the Next.js frontend (auto-deploy from GitHub) |
AWS Lambda | Runs the backend business logic (1 function, 4 handlers) |
Amazon API Gateway | REST API with CORS, routes requests to Lambda |
Amazon S3 | Stores ADR markdown files and the index catalog |
Amazon Bedrock | Invokes Nova Lite model to generate ADR content |
Architecture:

Infrastructure is defined as code using AWS SAM (
template.yaml ), deployable with a single sam deploy command. The template provisions the S3 bucket, Lambda functions with appropriate IAM policies, and the API Gateway with CORS configuration.What You Learned
- Amazon Bedrock is remarkably simple to integrate — With the AWS SDK, invoking a model is just a few lines of code. The Nova Lite model produces well-structured markdown output reliably, and the cost per generation is negligible (less than $0.01 per ADR).
- Spec-driven development pays off for weekend projects — Having formal requirements and a design document before coding meant I never got stuck wondering "what should this do?" Every component had a clear spec to implement against.
- SAM makes serverless deployment trivial — From zero infrastructure to a fully deployed API in one command. The
template.yamlis readable, reproducible, and version-controlled.
- Property-based testing reveals edge cases — Using fast-check to test the filename generation utility (slugify) caught edge cases I wouldn't have thought of: accented characters, trailing hyphens, mid-word truncation.
- The 207 status code is underrated — It perfectly communicates "partial success" in a RESTful way, letting the client decide how to handle the situation.
Link to App or Repo
- GitHub Repository: gmoyamor/Weekend-Productivity-Challenge-ADR-Generator.git
- Live App: ADR-GENERATOR-AMPLIFY
Built with Next.js, AWS Lambda, Amazon Bedrock (Nova Lite), AWS AmplifyApp and deployed using AWS SAM.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article