Charlotte, NC
ProjectsJanuary 15, 2024

RapidEPR

Tap to enlarge, then pinch to zoom
RapidEPR is an AI writing tool for military performance evaluations and award citations, and it has over 500,000 users. A service member picks a branch and a format, describes what they did in plain language, and gets back options sized for that form, or a full narrative for an award. It covers the Air Force, Army, Navy, Marine Corps and Coast Guard, 43 formats in all. Rapid Regs, a second tool in the same app, answers questions with citations from more than 8,000 public military regulations and publications. I founded RapidEPR and run it through my company, RapidRoute Solutions. The name comes from the Air Force's Enlisted Performance Report, and I spent years writing performance reports in uniform. Every format has its own rules. An Air Force performance statement has to fit a 350-character field. An Army NCOER bullet has no character field at all, only a box on the form. A Navy Chief Eval groups its comments under named traits. Service members spend hours fitting an accomplishment into those rules, and that's the work RapidEPR does. RapidEPR started as a personal project. Early on it was a Next.js app and a Lambda behind API Gateway that called a language model directly, with each branch's prompts in TypeScript files next to the handler. A request came in, the function called the model, and the answer went back on the same HTTP connection. API Gateway closes an integration after 29 seconds, so in that design every generation had to finish inside that window. In June 2025 I moved generation off the request path. The API stored a pending task, invoked a worker Lambda asynchronously and gave the browser a task ID to poll. That August, as traffic grew, the async path started returning 504s and throttling errors. The same day I put an SQS queue in front of the worker with a dead-letter queue behind it, and moved task status into its own DynamoDB table. That path needed a task row, a queue message, a worker, a status table and a polling loop for every answer. In January 2026 I replaced all of it with Lambda response streaming through an API Gateway REST API. The function writes server-sent events as the model produces text, so the browser shows output while it's being written. The queues, the dead-letter queues, the task tables and the polling route are all gone. Streaming still hit a 29-second limit in one place. In April 2026 Sentry caught a Navy eval whose stream stopped at 29.0 seconds with no completion event. The API was regional, but its custom domain was edge-optimized, and an edge-optimized domain puts an AWS-managed CloudFront distribution in front of the API that ends streams at about 30 seconds. The fix was one SST setting that makes the domain regional too. AWS won't change a domain's endpoint type in place, so the deploy had to replace the domain resource and cut DNS over while it ran. The frontend is Next.js 16 and React 19, deployed with SST v4, which runs it on Lambda behind CloudFront with AWS WAF in front. Cognito handles sign-in, including Google, and its tokens authorize both APIs. Generation goes through the streaming REST API, with one Lambda each for bullets, awards and Rapid Regs. Accounts, generation history, credits, reports and Stripe webhooks go through an API Gateway HTTP API with a small Lambda per route. Application data lives in DynamoDB, accessed through ElectroDB. None of it runs on a server I manage. Lambda and CloudFront add capacity as traffic grows, so I never size servers. Every push to main deploys to staging and runs a health check, and production waits for a manual approval in GitHub Actions. Every bullet and award generation writes one structured log line with the prompt version, whether it needed a repair, its timing and its token counts. A CloudWatch dashboard reads only those lines, and Sentry watches both the frontend and the Lambdas. That's how the 29-second cut showed up in the first place. Rapid Regs is the one piece that works differently. It searches a library of public regulations for each branch plus a joint DoD set, and its answers come back with the publications they drew on. When I moved generation to streaming, the prompts moved into the model provider's dashboard, and the code referenced each one by ID. In August 2026 I moved all 43 back into the monorepo as versioned files. The Lambdas render the prompt locally now, and a build step generates the format registry, which holds each format's shape and length limits, from the same files. A test fails if the two drift apart. The move also showed that some copies I'd kept in the repo no longer matched what production was running, which is a good argument for having one source. The bigger change was checking every output before it ships. The Lambda checks each generation against its format's rules, and if the output breaks one, it makes a single repair attempt before the member sees the final version. Before these changes, about one in six generated options was too long for its form field. Checks tell me whether output is usable. They can't tell me whether a change made it better, so prompt and generation changes go through evaluation before rollout. A sweep generates every format and confirms each one is usable. Then a model judge compares the new output with what production already shipped for the same input, and it scores each pair in both orders so the order it sees them in can't decide the result. The build that moved prompts into the repo and added the check and repair won 30 of 43 formats against production, tied 7 and lost 6, on the same model. It became the default generation path that evening. The rollout still broke staging once. A bundling change made the streaming functions fail at startup, so every generation request on staging returned a 502, even though lint, the test suite and the web build had all passed. Only the Lambda logs showed why. CI now builds each streaming handler with the same bundle settings as the deploy and imports the result under Node, which is what Lambda runs. The judge still isn't calibrated against what service members actually pick. The app now records which option a member copies, and once enough of those accrue, that's what I'll measure the judge against.
  • Next.js 16, React 19 and Tailwind CSS 4 on SST v4, with CloudFront and AWS WAF
  • API Gateway REST API with Lambda response streaming for generation, and an HTTP API for everything else
  • AWS Lambda, DynamoDB through ElectroDB, Cognito with Google sign-in, SES and S3
  • Strands Agents TypeScript SDK for generation and evaluation
  • Bun workspaces, Vitest, and GitHub Actions with a manual production gate
  • Sentry, AWS Lambda Powertools logging, and a CloudWatch dashboard built on Logs Insights
  • Stripe for subscriptions and credits

Related projects

Solomon Thrift Store Pricing

A phone-first pricing app for a ministry thrift store, grounded in completed sales and manager review, and simplified after a backtest on real staff prices.

Tracecheck

Evidence-backed code review for AI coding agents, with exact source references, independent Jev judgments, and explicit limits on what a review can prove.

Obsidian Vault RAG

Open-source retrieval for Obsidian vaults, with local search, a shared MCP service, project-scoped profiles, and source-checked citations for AI agents.

Rollo Label Printer

Personal label-printing tool that finds the real shipping label inside messy return PDFs and images, normalizes it to 4x6, and prints through direct IPP.

Garmin MCP Server

Open-source MCP server that exposes 34 Garmin Connect health and fitness tools to any AI assistant, with parallel fetching and Docker support.

blakemccarn.dev

Portfolio and blog built with Next.js 16, deployed to AWS via SST v4 with Cloudflare DNS, staging environments, and full IaC.

Charlotte Wire & Cable

Full-stack business website for a specialty wire distributor: searchable catalog, admin dashboard, and serverless AWS infrastructure via SST.

Paperless OCR Enhanced

Open-source Paperless-ngx companion service that uses LLM vision models to repair weak OCR and improve downstream document search.

Paperless Knowledge Graph

A knowledge graph over my Paperless-ngx archive that answers plain-language questions with citations and, in its audited modes, checks every claim against the original OCR.