AWS Builder Center

Weekend Productivity Challenge: GoalMate

A native desktop accountability assistant built with PySide6 and an AWS serverless backend. It proactively triggers stays-on-top check-in alarms and delivers dynamic, context-aware AI coaching feedback via a resilient multi-model routing pipeline.

Infrastructure & Cloud enthusiast. Building, automating, and learning through hands-on projects.



🌟 Vision & What the App Does

Most productivity and goal-tracking tools fail because they are passive. They sit quietly on your phone or web browser, relying entirely on your manual discipline to open them. If you fall out of your routine, you simply avoid opening the app.
GoalMate is a native desktop application designed to solve this by being proactive:
  1. Silent Background Assistant: GoalMate lives in your operating system's system tray, consuming minimal resources.
  1. Proactive Check-In Popups: At your scheduled hour, the app intercepts your workspace with a stays-on-top modal prompt demanding a quick accountability check-in.
  1. Frictionless Action Logging: Users choose between completing their task (Start Learning), taking a rest day (Take a Break - streak neutral), or skipping (Skip Today - breaks your active streak).
  1. Context-Aware AI Coaching: An AI model evaluates your check-in action and drafts tailored, context-specific feedback based on your chosen coaching style:
  • 🤝 Friendly: Warm, encouraging, and supportive.
  • 🎓 Coach: Guidance-focused, practical, and reflective.
  • ⚠️ Strict: Firm, direct, and sets high expectations.
  • 🎖️ Military: Direct, intense, disciplinary, and focused on absolute execution.
  • 🧘 Stoic: Calm, focused on control, logic, and self-discipline.
  1. Interactive Dashboard: Summarizes your current streak count, today's goal status, and lists a chronological 30-day history of your daily logs and custom coach feedback.



🛠️ How You Built It

GoalMate was built using a hybrid desktop-cloud approach, choosing technologies that balance native desktop performance with scalable cloud processing.

Key Technical Decisions

  • PySide6 (Qt for Python): We chose PySide6 over heavy frameworks like Electron to achieve a lightweight memory footprint (~35MB RAM vs 150MB+ in Electron).
  • Qt Thread Concurrency: To prevent the UI from freezing during remote API calls, network operations are offloaded to background threads ( QThread ) which communicate back to the main UI thread via thread-safe Qt  Signals .
  • FastAPI + Mangum: The backend is built using the FastAPI framework and wrapped with Mangum, allowing the same codebase to run locally during development and serverless on AWS Lambda in production.

Engineering Hurdles & Workarounds

  • WSLg Wayland Quirks: Developing inside WSLg presented graphical struggles. WSLg lacks a taskbar compositor, causing tray icon errors. We wrote a kernel detector ( microsoft-standard ) to bypass tray widgets in WSL and handle clean exits. Dropdown menu focus grabs and stays-on-top window placement issues were resolved using event listeners and coordinate placement timers.
  • AWS Bedrock Quotas & Marketplace Blocks: On new AWS accounts, text model quotas default to 0 tokens per day ( ThrottlingException ), and third-party models (like Claude) require Marketplace permissions ( AccessDeniedException ).
  • The Multi-tier AI Routing Pipeline: To bypass these limits, we engineered a fallback routing system:
  1. Google Gemini (Primary): The Lambda function uses the Gemini 3.1 Flash Lite API (gemini-3.1-flash-lite) if a GEMINI_API_KEY is present.
  1. AWS Bedrock (Secondary): Refactored Bedrock to use the unified Converse API targeting the native Amazon Nova Micro model ( amazon.nova-micro-v1:0 ) as a secondary fallback.
  1. Templates (Tertiary): Falls back to local preset templates if both cloud APIs return errors, preserving app availability.



☁️ AWS Services Used / Architecture Overview

GoalMate connects a native PySide6 client to a fully managed, serverless AWS backend:
Architecture

AWS Infrastructure:
  • Amazon API Gateway: Serves as the HTTPS endpoint routing client requests to the serverless backend.
  • AWS Lambda (Python 3.12): Runs the FastAPI web server serverless.
  • Amazon DynamoDB: A Single-Table database hosting user metadata, goal configurations, and history logs (partitioned via  PK  and  SK  keys).
  • Amazon Bedrock: Serves as the secondary AI coaching engine, invoking Amazon's native Nova Micro model via the unified Converse API.
  • Terraform: The entire infrastructure is declared as IaC, including custom IAM execution policies.



🧠 What You Learned

  • GUI Thread Concurrency: Learned how to design thread-safe asynchronous GUI applications, mapping worker outputs back to Qt widgets using Qt's signal-slot architecture.
  • Terraform State Management: Discovered how to handle state drift when adding console-configured keys (like GEMINI_API_KEY) by using Terraform sensitive variables and git-ignored local .tfvars config files.
  • Model Lifecycle Management: Navigated real-world model deprecation EOL errors and learned to utilize modern, unified converse interfaces to prevent API breakages.



🔗 Link to App or Repo

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article