Back to Case Studies
SkinGenii2024

Building an AI Skincare Platform with Computer Vision & E-Commerce

Full Stack Engineer (Solo)

Next.jsMongoDBGemini AIRazorpayTypeScriptDocker

SkinGenii is an AI-driven dermatological e-commerce platform that personalizes skincare recommendations through computer-vision analysis, ingredient intelligence, and quiz-based profiling. I built the entire platform solo — from database schema design to AI integration to payment processing.

The Problem

The skincare industry suffers from information asymmetry — consumers can't decode INCI ingredient lists, recommendations are one-size-fits-all based on popularity not skin parameters, and professional assessments cost ₹500–2000 per session. Users are left guessing about their skin type and concerns.

1

Consumers can't understand chemical ingredient nomenclature

2

Product recommendations ignore individual skin parameters

3

Professional skin assessments are expensive and appointment-gated

4

No way to verify if a product's ingredients are safe for sensitive skin

The Approach

Deploy AI-at-the-edge: a quiz + photo analysis pipeline that produces dermatologist-grade scores and uses them as a filtering layer over a product catalog with multi-dimensional scheduling metadata.

AI Skin Analysis

Google Gemini 1.5 Flash analyzes facial photos to generate scores across 14 dermatological dimensions (blemishes, wrinkles, pores, oiliness, acne, etc.).

Scheduling Matrix Engine

Products have customSchedule arrays with suitability indices per skin parameter — enabling O(1) matching via MongoDB $elemMatch queries.

Ingredient Safety Intelligence

OCR-powered ingredient scanning with a database of 91 classified cosmetic functions and EWG/CMG hazard ratings.

Full E-Commerce Stack

Razorpay integration with HMAC-SHA256 verification, order lifecycle state machine, automated email notifications via MSG91.

System Architecture

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

Data Flows (click a node to filter)

Next.js 14 (App Router)Server ActionsServer Actions
Server ActionsPrimary AI analysisGoogle Gemini 1.5 Flash
Server ActionsFallback AIOpenAI GPT-4o-mini
Next.js 14 (App Router)Client-side OCRTesseract.js OCR
Server ActionsMongoose CRUDMongoDB Atlas
Next.js 14 (App Router)Payment modalRazorpay Gateway
Razorpay GatewayHMAC verifyServer Actions
Server ActionsOrder notificationsMSG91 + Nodemailer
Server ActionsImage uploadCloudinary CDN
frontendbackenddatabaseserviceexternalai

The Build

Solo-built from zero to production, handling every layer from AI integration to payment security.

Foundation

Next.js 14 App Router setup, MongoDB schemas for 11 collections, NextAuth JWT authentication with role-based middleware.

AI Pipeline

Integrated Gemini 1.5 Flash with structured JSON output schema, built fallback to OpenAI GPT-4o-mini, added Tesseract.js OCR for ingredient label scanning.

Recommendation Engine

Designed the scheduling matrix architecture — each product maps suitability across 14 skin parameters. AI scores transform directly into MongoDB filter predicates.

E-Commerce & Payments

Razorpay order creation + cryptographic verification, order status state machine (Pending→Processing→Shipped→Delivered), automated transactional emails.

What Was Built

A complete AI skincare platform with quiz-based profiling, photo analysis, ingredient safety checking, product recommendations, shopping cart, payments, and a full admin panel.

Dual-AI skin analysis: Gemini 1.5 Flash (primary) + OpenAI GPT-4o-mini (fallback)

Product scheduling matrix enabling instant personalized recommendations

OCR + NLP ingredient extraction with 91-function safety classification

Complete e-commerce: cart, checkout, Razorpay, order lifecycle, email notifications

The Results

A live production platform at skingenii.com serving real users with AI-powered skincare intelligence.

14
Dermatological parameters scored per analysis
91
Ingredient safety functions classified
O(1)
Product matching via scheduling matrices
6
Order lifecycle states with automated emails

Lessons Learned

Structured AI output > free-form parsing

Forcing Gemini to return responseMimeType: 'application/json' with a strict schema eliminated 100% of parsing failures vs free-text responses.

Scheduling matrices beat collaborative filtering

For skincare, explicit dermatological parameter matching is more accurate than user-behavior-based recommendations. The matrix approach is also debuggable.

Multi-layer validation prevents bad data

Zod schemas → Mongoose type constraints → pre-save hooks → business logic guards. Four layers mean bugs are caught early and consistently.

Tech Stack

Frontend

Next.js 14React 18TypeScriptRecoilTailwind CSSMantine UI

Backend

Next.js Server ActionsNextAuthZodMongoose

AI/ML

Google Gemini 1.5 FlashOpenAI GPT-4o-miniTesseract.js OCR

Database

MongoDB AtlasMongoose ODM

Payments

RazorpayHMAC-SHA256 verification

DevOps

DockerGitHub ActionsSelf-hosted VPS
Next Case Study

Digitizing a Non-Profit's Financial Operations from Paper to Production

BSRSTSep 2023 – Present

Want to build something like this?

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

Let's Talk