All projects

052024–25ML / Backend

FocusAid

A cross-platform ADHD productivity app combining task management, mood-adaptive prioritisation, Pomodoro tracking, gamified rewards and voice-based task capture.

Period
Nov 2024 - Nov 2025
Context
Final Year Project

The problem

Generic task apps assume the user can decompose work and judge what to do next. The premise here is that they often cannot - so ordering is computed rather than left to the user, by a deterministic four-factor engine scoring weighted priority, deadline urgency, mood-to-effort match and mood-to-task-type match. Keeping that scoring deterministic matters: the model assists with decomposition, but it never decides what you work on, and when it is unavailable the app degrades to manual entry instead of failing. Decomposition itself meant fine-tuning candidates small enough to serve cheaply behind an ordinary mobile client.

The system

The fine-tuned model breaks tasks down; a deterministic four-factor engine decides what comes next.

What I built

  1. Developed a deterministic four-factor prioritisation engine driven by a six-mood model mapped across effort levels and task categories, with a two-hour mood recency window and non-mood fallback ordering.
  2. Fine-tuned LLaMA 3, Gemma and Phi-2 with LoRA on PyTorch for task decomposition, comparing the candidates before settling on Gemma for deployment.
  3. Implemented AI-assisted task decomposition through a server-side Gemma inference endpoint, with tunable decoding parameters, numbered-list parsing with sentence-segmentation fallback, and graceful 502 degradation to manual subtask entry.
  4. Built a gamification system with a 21-badge catalogue across five categories, square-root XP-to-level progression, and streak and milestone checks after task, subtask and Pomodoro mutations, with timezone-offset-aware daily boundaries.
  5. Delivered 33 REST endpoints across eight routers over a seven-table PostgreSQL schema with Alembic migrations, JWT access/refresh authentication with bcrypt hashing, and server-proxied AssemblyAI speech-to-text so provider keys never reach the client.
  6. Validated through a four-layer strategy - Pytest unit and integration tests on a transactional test database, Postman/Newman API testing and end-to-end testing - reaching 74/74 passing API assertions across all feature areas.
  7. Built a 20-screen mobile client with Redux Toolkit slices and custom notification and rewards-realtime middleware, including analytics dashboards for focus time and task velocity with PDF, CSV and XLSX export.

Stack

PythonFastAPISQLAlchemy 2.0AlembicPostgreSQLNeonPydantic v2JWT (python-jose)passlib/bcrypthttpxPyTorchLoRALLaMA 3GemmaPhi-2AssemblyAIPytestPostman/NewmanColabReact Native 0.79Expo SDK 53React 19Redux ToolkitReact NavigationAxiosexpo-notificationsexpo-secure-storeLottie

Skills applied

  • Full-stack mobile development
  • Deterministic scoring model design
  • Language model fine-tuning (LoRA)
  • LLM integration and output parsing
  • Relational schema design and migrations
  • JWT refresh-token authentication
  • Gamification and progression system design
  • Background task processing
  • Third-party API proxying and key protection
  • Multi-layer test strategy
  • Data visualisation and report export