Back to Case Studies
Hairscope.aiMay 2024 – Present

Building an AI-Powered Diagnostic Platform from Zero

Lead Product Engineer (Founding Team)

Next.jsGraphQLMongoDBPyTorchTypeScript

Hairscope.ai started as a bold idea: what if hair clinics could diagnose scalp conditions using AI, giving patients answers in minutes instead of weeks? As a founding engineer, I took this from a blank canvas to a production platform serving real clinics — navigating the unique challenges of building AI-powered healthcare tools where reliability isn't optional.

The Challenge We Faced

Hair clinics were relying on manual visual assessments — slow, inconsistent, and impossible to scale. Patients waited days for results. Clinics needed a digital tool that could analyze scalp images, generate diagnostic reports, and adapt to each clinic's unique workflow. The catch? AI image analysis is inherently slow, and clinics had zero tolerance for a tool that felt sluggish or required constant engineering support to configure.

1

Manual diagnosis was slow, taking days to deliver results to patients

2

Every clinic had different workflows, requiring custom setup each time

3

AI processing takes 10-30 seconds — an eternity in a user interface

4

The founding team was small, so every recurring task had to be automated

How I Thought About the Solution

I needed an architecture that was flexible enough to serve different clinic workflows without code changes, fast enough to keep users engaged during slow AI operations, and clean enough that a small team could maintain it long-term. I chose to build a layer of abstraction between the clinics and the AI — a dynamic configuration system paired with an optimistic UI pattern.

Flexible Data Layer with GraphQL

Built a GraphQL API with Apollo Server so the frontend could request exactly what it needed — no over-fetching, no rigid REST endpoints that would need rewriting as requirements shifted.

Dynamic Configuration Engine

Created a template-based configuration system where clinic admins could customize their diagnostic workflows through a visual interface, eliminating the need for engineering tickets.

Optimistic UI for AI Latency

Designed the interface to immediately show progress and partial results while PyTorch-based processing happened in the background, so users never felt like they were waiting.

Iterative Shipping with Clinic Partners

Delivered the MVP within 3 months using a tight feedback loop with early clinic partners, validating assumptions quickly before building further.

System Architecture

Interactive architecture map — click any node to trace its connections.

Data Flows (click a node to filter)

Next.js FrontendApollo ClientGraphQL API (Apollo)
GraphQL API (Apollo)Mongoose + DataLoaderMongoDB Atlas
GraphQL API (Apollo)Image analysis requestPyTorch AI Pipeline
PyTorch AI PipelineStore resultsMongoDB Atlas
Next.js FrontendTemplate renderingDynamic Config Engine
Dynamic Config EngineClinic settingsMongoDB Atlas
GraphQL API (Apollo)Image storageGoogle Cloud Storage
frontendbackenddatabaseserviceexternalai

The Building Process

Building Hairscope wasn't a straight line. Every week brought new learnings about what clinics actually needed versus what we assumed they'd want.

Month 1: Foundation

Set up the GraphQL API, MongoDB schemas, and core Next.js application. Got the first PyTorch AI pipeline working end-to-end, even if it was slow and rough around the edges.

Month 2: Making It Feel Fast

Implemented optimistic mutations and loading state choreography. Users reported the app felt responsive even during 15-second AI processing windows. Also built the dynamic clinic configuration module.

Month 3: Production Ready

Hardened error handling, added monitoring, and shipped to the first paying clinics. The configuration system meant onboarding a new clinic took minutes instead of days of engineering work.

Ongoing: Iteration & Scale

Continued refining based on real usage data. The GraphQL layer made adding new features painless — the frontend team could move independently of backend changes.

What We Built

The final platform is a complete AI diagnostic suite that clinics can adopt and customize without engineering support. It handles the full journey from image upload to diagnostic report generation.

A self-service configuration dashboard where clinic admins customize their diagnostic workflows visually

Real-time progress indicators and partial result rendering that keeps users engaged during AI processing

A GraphQL API that serves multiple frontend surfaces (web app, widget, mobile) from a single data layer

Automated template rendering that eliminated 100% of recurring engineering configuration requests

The Impact

The numbers tell the story of a platform that shipped fast, runs efficiently, and keeps users happy despite the inherent latency of AI operations.

35%
Faster feature iteration through GraphQL flexibility
40%
Reduction in redundant database queries
100%
User retention maintained during AI processing
0
Manual engineering tickets for clinic configuration

What I Took Away

Perceived speed matters more than actual speed

Users don't mind waiting if they feel progress. The optimistic UI investment paid for itself in retention metrics. The AI didn't get faster — but the experience of using it did.

Build for the non-technical user from day one

The dynamic configuration system wasn't in the original spec — I pushed for it early because I saw the pattern of repeated clinic setup requests. It saved hundreds of engineering hours.

GraphQL enables true team independence

Once the schema was solid, frontend and backend could evolve independently. This was crucial for a small founding team where everyone needed to move fast without blocking each other.

Tech Stack

Frontend

Next.jsTypeScriptTailwind CSS

API Layer

GraphQLApollo ServerNode.js

Database

MongoDBMongoose

AI/ML

PyTorchImage Processing Pipelines

Infrastructure

GCPCloud Functions
Next Case Study

Scaling a Multi-Tenant OTT & LMS to 10,000+ Users

Skyline Meridian / ZicopsApr 2022 – Present

Want to build something like this?

I'm available for high-impact product engineering work.

Let's Talk