AiDerm Cliniq
Multi-provider LLM failover
A clinical backend for AI-assisted dermatology. It routes analysis requests across three LLM providers with priority-ordered failover, runs a three-round conversational diagnostic pipeline over patient-uploaded skin images, and keeps Celery task state recoverable so a worker crash never loses a patient session.
1 / 3Analysis survives a single-provider outage via priority-ordered failover
Zero task loss with late-ACK crash recovery
24-hour Redis result persistence
SnapshotAt a glance
AI/ML Engineer & Backend Architect
Ongoing
Analysis survives a single-provider outage via priority-ordered failover
Zero task loss with late-ACK crash recovery
24-hour Redis result persistence
10+ typed clinical audit events logged
Up to 3 automatic retries per failed task
Technologies Used
10 Technologies Integrated
Impact
Key Features
Feature Implementation
Project Vision
A clinical backend where provider failure is a routing decision, not an outage.
Core Process
The process of Developing it.
Architected multi-provider LLM routing, adaptive diagnostic pipelines, and fault-tolerant Celery task queues on GCP.
Build notesWhat I built
05Multi-Provider AI Routing with Automatic Failover
Architected an LLM router across Gemini 2.0 Flash, OpenAI GPT-4o, and DeepSeek with priority-ordered failover on rate limits or provider outages, so a single provider outage degrades throughput rather than stopping analysis, with runtime provider switching via Redis-backed model registry.
Adaptive AI Diagnostic Pipeline
Built a 3-round conversational diagnostic engine processing patient-uploaded skin images and structured symptom history to generate differential diagnoses, red flag detection, and personalised treatment plans via multi-stage Celery task chains.
Crash Recovery and Offline Data Sync
Engineered a fault-tolerant task queue with late-ACK acknowledgment, per-task retry policies (up to 3 retries), and 24-hour Redis result persistence, guaranteeing zero task loss on worker crash and so the Flutter client can resume where it left off.
Runtime AI Prompt Registry with Version Control
Designed a Redis-backed prompt management system supporting runtime overrides, full version history, and one-click rollback across all AI modules without redeployment, with append-before-write versioning ensuring zero silent data loss.
Clinical Workflow, Audit Trail and Secure Authentication
Delivered QR-based doctor assignment, append-only audit logging (10+ typed clinical events), FCM push notifications, automated xhtml2pdf report generation, and stateless JWT-RBAC authentication secured by SHA-256 OTP email verification and Google OAuth 2.0.
Make a dermatology triage tool that stays usable when an upstream provider does not.
Features
- Multi-provider LLM routing with automatic failover
- Adaptive 3-round conversational diagnostic engine
- Crash recovery and offline data sync
- Runtime AI prompt registry with version control
- QR-based doctor assignment
- Append-only clinical audit trail (10+ event types)
- JWT-RBAC + Google OAuth 2.0 authentication
- Automated xhtml2pdf report generation
- Firebase FCM push notifications
Challenges
- Keeping analysis available when a provider rate-limits or goes down
- Fault-tolerant task processing with crash recovery
- Managing prompt versions without redeployment
