
Weekend Annoying Task Challenge: English Writing Assistant
A personal AI writing tool that rephrases my everyday messages into clear, professional English while quietly tracking my recurring grammar and vocabulary mistakes over time. Built with Amazon Bedrock (Nova Lite), Lambda, Cognito, DynamoDB, and Amplify Hosting.
English Writing Assistant is a personal AI-powered web app that rephrases my everyday writing — emails, messages, notes — into clear, professional English, while quietly tracking the specific grammar and vocabulary mistakes I keep making, so I can actually learn and improve over time instead of just getting a one-off correction.
Vision and What the App Does
As a non-native English speaker, I write a lot of workplace messages — emails, Slack updates, requests to teammates — where I want to sound clear, professional, and appropriate for the situation. Generic AI chat tools can rephrase a sentence, but they don't remember my recurring mistakes from one day to the next. Every conversation starts from zero.
The annoying task I wanted to automate: catching and correcting my own recurring English mistakes, without having to manually keep a running list of "things I get wrong."
English Writing Assistant solves this with two things working together:
- Instant rephrasing with tone control. I paste my text, pick a Style (Professional / Friendly / Simple) and optionally a Purpose (Team Leadership / Public Speaking / Negotiation / Polite Request), and get back a corrected version along with a plain-percentage writing score — in seconds.
- A silent, long-term mistake tracker. In the background, every mistake I actually use (i.e., every corrected sentence I copy) gets classified into one of 13 predefined mistake types across four categories — grammar, vocabulary, sentence structure, spelling — and rolled into a weighted running score per type. A "Check my progress" button surfaces my top 3 weaknesses, with real examples pulled from my own writing and plain-English practice tips.
The long-term goal is for the tool to make itself progressively less necessary: by surfacing the same 2–3 mistake patterns over and over with real examples, I should internalize them and eventually write these kinds of messages without AI help at all.



How I Built It
I started with a proper requirements and design pass before writing any code — partly because I wanted the AI response contract (what Bedrock returns, how it's parsed and stored) to be locked down early, since the whole mistake-tracking feature depends on that data being structured and reliable.
Key decisions:
- Copy-to-Confirm persistence. Nothing gets written to DynamoDB just because I rephrased something. A rephrase result is held only in browser memory (
PendingMistakeData) until I click Copy — which signals "I actually used this." If I rephrase again or close the tab without copying, that data is silently discarded with zero database writes. This keeps the mistake history meaningful — it reflects text I actually sent, not every experimental rephrase.
- Two-layer tone selection. Style is required and always applied; Purpose is optional and layered on top. The Lambda combines both into a single tone instruction string before it ever reaches the Bedrock prompt, so the model gets one clean instruction instead of two competing ones.
- A fixed, 13-type mistake taxonomy. Rather than letting the AI invent open-ended mistake categories (which would make long-term tracking meaningless — you can't trend "things vaguely related to word choice" over time), I constrained Bedrock to select only from 13 predefined types across 4 categories (e.g.,
grammar_tense,vocabulary_wrong_word,sentence_structure_run_on,spelling_confused_words). This keeps the Teacher Report stable and comparable across weeks/months.
- Weighted, decaying WeaknessScore. Each mistake type has a running score: high severity +3, medium +2, low +1, and it decrements by 1 (floored at 0) every time I use that construct correctly. This means the "top 3 weaknesses" reflect current patterns, not just historical totals — genuine improvement actually lowers the score over time.
- Single Bedrock call per rephrase. One prompt returns both the corrected text and the full structured mistake breakdown, keeping latency and cost down instead of chaining multiple AI calls.
Challenges encountered:
- Keeping the AI response schema honest. Early on, Bedrock would occasionally return a mistake type in both the "mistakes" list and the "correct usage" list for the same submission, which doesn't make sense. I added an explicit conflict rule in the Lambda: if a type appears in both, the "correct usage" entry is discarded and a warning is logged — the mistake takes precedence.
- Explaining grammar without grammar jargon. I wanted practice tips and examples usable by someone (like me) who doesn't necessarily know terms like "subject-verb agreement." So the prompt explicitly instructs the model to explain everything in plain, everyday language — as if explaining to a 10-year-old — no technical terms.
- Making ranking deterministic. With small amounts of data, ties in WeaknessScore are common. I settled on a clear tiebreaker: rank by score first, and only use recency (
lastSeen) to break exact ties — never let recency override an actual score difference.
AWS Services Used / Architecture Overview
Services:
- Amazon Bedrock (Nova Lite) — powers both the rephrasing and mistake classification in a single prompt/response per submission.
- AWS Lambda (Node.js 20.x) — three functions, each with a single responsibility:
Rephrase_Lambda(calls Bedrock, returns corrected text + structured mistake data),Save_Lambda(triggered only by the Copy action, writes to DynamoDB),Analyze_Lambda(computes the Teacher Report on demand).
- Amazon API Gateway (REST) — the public HTTPS entry point (
POST /rephrase,POST /save,GET /report), with a Cognito authorizer enforced on every route.
- Amazon Cognito — user authentication. Self-registration is off, since this is a personal tool — only I can log in.
- Amazon DynamoDB — two tables:
MistakesTable(individual mistake records, partitioned by mistake type) andWeaknessCounters(one row per predefined mistake type, holding the running weighted score, pre-seeded on deploy).
- AWS Amplify Hosting — hosts the React frontend, connected to GitHub for Git-based CI/CD deploys.
- Amazon CloudWatch — logs, per-invocation Bedrock token metrics, a cost/health dashboard, and an alarm if daily token usage crosses a threshold (important for a personal project paying its own AWS bill).
How it's triggered: Everything is user-initiated through the browser — there's no background job or scheduled trigger. I paste text and click Rephrase, which calls
POST /rephrase → Bedrock. If I click Copy, that separately calls POST /save → DynamoDB. The Teacher Report is generated on demand when I click "Check my progress" → GET /report .Architecture overview:
Browser (React SPA on Amplify Hosting)
│ Cognito JWT on every request
▼
API Gateway (Cognito Authorizer)
├── POST /rephrase → Rephrase_Lambda → Amazon Bedrock (Nova Lite)
├── POST /save → Save_Lambda → DynamoDB (MistakesTable, WeaknessCounters)
└── GET /report → Analyze_Lambda → DynamoDB (reads + aggregates)
CloudWatch: metrics, logs, dashboard, and a daily token-usage alarm across all three Lambdas[PLACEHOLDER: Architecture diagram image]
What I Learned
- Designing the AI response contract up front paid off. Because I fixed the mistake taxonomy and JSON schema before writing Lambda code, parsing and persistence stayed simple — the hard thinking happened in the prompt design, not in defensive code trying to handle arbitrary AI output.
- Not everything should be saved automatically. The Copy-to-Confirm model was the single decision that made the mistake-tracking feature trustworthy to me — I know the data reflects text I actually used, not every half-finished attempt.
- Cost visibility matters even for a single-user app. Setting up CloudWatch token metrics and an alarm early meant I could experiment with prompts freely without worrying about a surprise Bedrock bill.
- Manual AWS Console setup is a good way to actually understand each service, though I can see the value of moving to CDK/IaC if I ever need to rebuild this or replicate the environment.
- A personal tool doesn't need multi-user complexity. Keeping self-registration off and treating this as single-user software simplified auth, security, and the DynamoDB access patterns considerably.
Link to App or Repo
- Public GitHub repository (source code): github.com/N-D-Naveen/english-writing-assistant
- Live app: deployed via AWS Amplify Hosting (authentication-protected as a personal single-user tool — see screenshots and video walkthrough above for a full demo of the app in action).
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article