Weekend Productivity Challenge: Synergy AI — Personal Productivity Suite
Modern professionals juggle tasks, emails, meetings, and habits across a dozen disconnected tools. Synergy AI is a single AI-powered productivity dashboard that brings all four together — built entirely on AWS serverless infrastructure and powered by Amazon Bedrock.
The app has four core tools:
• Focus Board (Task Prioritizer): You add a task with a title, urgency (1–5)
, and impact (1–5). Amazon Bedrock's Claude 3 Haiku model evaluates it and
returns a dynamic priority score from 0–100 plus a two-sentence coaching
rationale. Your task list auto-sorts by AI priority, so you always know what to
work on first.
• Email Summarizer: Paste any email thread. Bedrock condenses it into a one-
sentence summary, extracts action items, and suggests ready-to-create tasks and
meetings directly from the email content — one click to add them.
• Meeting Prep Bot: Enter a meeting title, participants, and context.
Bedrock generates a structured agenda with timings, up to five talking points,
and three pre-meeting action items.
• Habit Hub: Track daily or weekly habits with a streak counter. A single
"Generate Insights" button calls Bedrock to analyze your log history and return
behavioral insights and habit-stacking recommendations grounded in habit
science.
The frontend is a React + TypeScript Vite app served via CloudFront. The backend
is a single Python Lambda function behind API Gateway. All data lives in a
single DynamoDB table using a PK/SK pattern. Daily email notifications are sent
via SNS + EventBridge when tasks are overdue or habit streaks are at risk.
How I Built It
Day 1 — Architecture & Backend
I started with the data model. A single DynamoDB table with a composite key (PK
/ SK) handles all four entities cleanly — PK=TASK, PK=MEETING, PK=HABIT,
PK=EMAIL — avoiding the cost and complexity of multiple tables while staying
well within Free Tier limits.
The Lambda function (main.py) is a single-file API router. It reads rawPath and
HTTP method from the API Gateway v2 payload and dispatches to the correct
handler. Every handler has a Bedrock call with a structured JSON prompt, and a
math-based fallback in case Bedrock is unavailable or the model isn't yet
enabled in the account.
The Bedrock integration supports both Anthropic Claude (Messages API) and Meta
Llama 3 (instruct format) — switchable via a single BEDROCK_MODEL_ID environment
variable set in Terraform.
Key challenge: Claude sometimes wraps JSON responses in markdown code fences (
json ). I added a stripping step before json.loads()
on every Bedrock response to handle this reliably.
Day 1 — Infrastructure as Code
All infrastructure is in Terraform across six files:
main.tf — provider and shared variables
- dynamodb.tf — Pay-Per-Request table
-
lambda.tf — function packaging, IAM role, Bedrock + DynamoDB policy
apigateway.tf — HTTP API v2 with a catch-all ANY /{proxy+} route
- s3_ cloudfront.tf — private S3 bucket + CloudFront OAC distribution
- sns.tf — SNS topic, email subscription, EventBridge daily cron, notification Lambda
The notification Lambda (
notifications.py
) runs at 9 AM UTC daily via EventBridge. It queries DynamoDB for overdue tasks and habits with streaks at risk, builds a formatted alert message, and publishes to SNS — which emails it directly to my inbox.
Day 2 — Frontend
The React app is fully offline-capable. If no API URL is configured, it falls back to
localStorage
with realistic mock data so the UI is always functional. When an API URL is saved in Settings, it switches to live cloud data automatically.
The settings tab lets you paste your Terraform
api_endpoint output and saves it to localStorage
— no environment variable rebuilds needed after deploy.
Deployment flow:
bash
cd terraform && terraform apply # provisions all AWS resources
cd ../frontend && npm run build # builds the React app
aws s3 sync dist/ s3://ai-productivity-dashboard-632144225367 --delete
AWS Services Used / Architecture Overview
Service | Role |
|---|---|
Amazon Bedrock (Claude 3 Haiku) | AI priority scoring, meeting agendas, email summaries, habit insights |
AWS Lambda (Python 3.12) | API handler + daily notification checker |
Amazon DynamoDB | Single-table data store (Pay-Per-Request) |
Amazon API Gateway v2 | HTTP API routing all frontend requests to Lambda |
Amazon S3 | Static frontend hosting (private, OAC-protected) |
Amazon CloudFront | CDN serving the React app globally over HTTPS |
Amazon SNS | Email delivery for daily productivity alerts |
Amazon EventBridge | Cron trigger (9 AM UTC daily) for notification Lambda |
Architecture flow:
User Browser
│
├──► CloudFront ──► S3 (React app)
│
└──► API Gateway ──► Lambda (main.py)
├──► DynamoDB (read/write)
└──► Bedrock (Claude 3 Haiku)
EventBridge (cron 9AM UTC)
└──► Lambda (notifications.py)
├──► DynamoDB (query overdue/at-risk)
└──► SNS ──► Email ( nanjiladavid2@gmail.com )
Everything runs on AWS Free Tier. Bedrock charges per token (~$0.00025 per 1K input tokens for Haiku), but typical usage stays well under $1/month.
What I Learned
1. Single-table DynamoDB design pays off immediately. Using
PK as the entity type and SK as the UUID means one table, one IAM policy, and one Terraform resource handles the entire app. Querying by PK='TASK' returns all tasks instantly.2. Bedrock model access must be manually enabled. The API call will fail silently if you haven't gone to the Bedrock console → Model Access and requested the model for your region. I built math-based fallbacks for every AI call so the app stays functional during this setup step.
3. API Gateway v2 payload format matters. The v2 payload puts the HTTP method at
event["requestContext"]["http"]["method"] and the path at event["rawPath"] — different from v1. Getting this wrong means all routes return 404.4. CloudFront + S3 OAC is the right pattern. Origin Access Control (OAC) replaced the older OAI approach. The S3 bucket stays fully private; only CloudFront can read it via a bucket policy scoped to the distribution ARN.
5. Offline-first frontend UX matters. Building the app to work with
localStorage mock data first meant I could develop and test the entire UI before the backend existed. The live API integration was a drop-in swap.Link to App & Repo
- GitHub Repo: https://github.com/stoicdavi/julyWeekendChallenge/
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article