Inspiration

Skincare is incredibly frustrating. Like many people, I've spent a small fortune on clinical products, only to mix ingredients that clashed and completely wrecked my skin barrier. Skincare isn't a one-size-fits-all formula; it’s a long-term journey. I realized we didn't need another generic habit tracker. We needed an AI skincare copilot that actually remembers our history, tracks our daily reactions, and makes increasingly accurate decisions to keep our skin safe. That’s why I built RoutineIQ.

What it does

RoutineIQ is a clinical-grade skincare agent powered by Alibaba Cloud Qwen. It reads dermatologist notes via Qwen-3.5-OCR, registers skincare products on your shelf, checks molecular compatibility, and builds a personalized, conflict-free AM/PM routine. As you check off steps and log daily skin reactions (like redness or dryness), the agent adapts, suggests routine simplifications for better adherence, and answers questions in chat using your retrieved history.

How we built it

The application is a Next.js project powered by:

  • Alibaba Cloud Model Studio: Qwen-plus handles AI reasoning, routine optimization, and chat, while Qwen-3.5-OCR extracts label and document data.
  • Hosting & Database: Deployed on an Alibaba Cloud ECS Ubuntu server with Nginx and PM2, connected to ApsaraDB RDS Serverless (MySQL) via Prisma ORM inside a secure VPC.
  • Authentication: Firebase Auth handles secure user sessions.

The Challenge & Breakthrough

  • The Challenge: Skincare history spans months, accumulating dozens of daily logs and chats. If the LLM context window gets flooded with daily pleasantries and routine check-ins, the agent runs out of tokens and "forgets" critical safety details—like a severe reaction to high-strength Retinol logged weeks ago.
  • The Breakthrough (Persistent Memory & Compaction): I built a database-backed memory compaction system. Instead of feeding raw history to Qwen, the system runs a compaction routine. Qwen-plus processes the verbose timeline and consolidates minor logs into unified, high-level clinical insights (e.g., "Patient has high sensitivity to L-Ascorbic Acid; transitioned to Ceramides in month 2"), safely deleting the noise. This ensures critical alerts are always prioritized in the limited context window and never forgotten.

What's next for RoutineIQ

I plan to add clinician dashboards so dermatologists can remotely monitor patient routine compliance, identify adverse reactions early, and adjust prescriptions directly through the RoutineIQ agent timeline.

Built With

  • alibaba-cloud-ecs
  • alibaba-cloud-model-studio
  • apsaradb-rds-serverless
  • firebase-authentication
  • lucide-icons
  • mermaid.js
  • mysql
  • next.js
  • nginx
  • node.js
  • pm2
  • prisma
  • qwen-3.5-ocr
  • qwen-plus
  • qwen-vl-ocr
  • react
  • tailwind-css
  • typescript
  • vpc
  • zod
Share this project:

Updates