Problem
Traditional online shopping lacks the ability to try clothes virtually, leading to uncertainty, higher return rates and less customer satisfaction.
Full-Stack E-commerce Platform + AI Virtual Try-On
MONO is a modern e-commerce platform that combines a seamless shopping experience with an AI-powered virtual try-on, allowing customers to see how clothes look on them before they buy.

Storefront — the shipped homepage
A complete full-stack e-commerce platform with AI virtual try-on, built to deliver a smooth, modern and intelligent shopping experience.
Traditional online shopping lacks the ability to try clothes virtually, leading to uncertainty, higher return rates and less customer satisfaction.
Modern full-stack architecture: Next.js frontend, Node.js + Express REST API, Prisma ORM with a MySQL database, and an AI service for virtual try-on.
A full-stack e-commerce platform with AI virtual try-on, allowing users to visualise clothing on their own body, with a seamless and secure shopping experience.
Everything a store needs, plus the AI module that makes MONO different.
Fashion e-commerce is one of the largest markets online, but customers still cannot try clothes on before buying. That uncertainty means more returns, more frustration and less trust in online stores.
MONO — a modern e-commerce platform with an AI-powered virtual try-on, so customers can see how a garment fits on their own body before they order it.
1import { NextResponse } from "next/server";2import { prisma } from "@/lib/prisma";34export async function GET(request: Request) {5 try {6 const products = await prisma.product.findMany({7 where: { isActive: true },8 include: { category: true, images: true },9 });1011 return NextResponse.json({ products });12 } catch (error) {13 return NextResponse.json(14 { message: "Failed to fetch products" },15 { status: 500 }16 );17 }18}Develop a modern e-commerce platform
Build a high-performance full-stack architecture
Integrate an AI virtual try-on system
Improve the user experience
See how it looks on you, in real time. MONO's AI pipeline maps the garment onto your own photo and returns a realistic preview you can compare before ordering.
Realistic results
Powered by advanced AI models
Multiple poses
View from different angles
Accurate fit
Better shopping decisions

Real screen · product page, where the try-on starts
The module running end to end: photo upload, generation and the before → after comparison.
From the “Try On” click to the Before → After comparison: the 15 steps of the AI try-on, across the frontend, the backend, the AI provider and the database.
The user opens a product page, clicks “Try On”, selects a photo and clicks “Generate AI Try-On”.
Frontend calls POST /api/upload/try-on. The backend stores the file (uploads/try-on/<timestamp>.jpg) and returns its public URL.
POST /api/ai-try-on with { "productId": "...", "userImage": "http://.../uploads/..." }.
The controller stays thin — Route → Controller → Service → Response. No business logic inside the controller.
findProduct(productId) reads the product from the database and resolves its main image.
The internal path /assets/products/... is turned into an absolute public URL so the AI provider can fetch it.
The service only calls createAIProvider(). The factory reads AI_PROVIDER from .env and instantiates the right provider (new HuggingFaceProvider(), or a MockProvider) — the Provider Pattern.
The provider receives two inputs: the person image and the garment image.
HuggingFace cannot read localhost, relative or backend paths, so resolveAndHandleFile() downloads the URL to a temp file first.
handle_file() converts the image into Gradio's FileData format ({ type: "command", command: "upload_file" }).
The provider tries Space1 → Space2 → Space3 → Space4 until it finds an endpoint exposing /tryon or /process_hd.
Person + garment + parameters are sent to the IDM-VTON model (GPU inference), which returns the generated image.
The generated image is read from the raw response (e.g. data.url).
The service stores generatedImage through repository.update() and sets the TryOnJob status to SUCCESS.
The frontend fetches generatedImage and shows a Before → After comparison.
A scalable and secure architecture designed for performance, modularity and AI integration.
01
Next.js
(Web App)
02
Node.js + Express
(REST API)
03
MySQL
(Prisma ORM)
04
Virtual Try-On
(AI Model)
Fully responsive, animation-driven interface.
Layered REST API with JWT authentication.
Normalized, scalable and maintainable schema.
Provider Pattern — swap the AI without touching the app.
User
Accounts, credentials, roles
Product
Catalog, images, collections
Variant
Size / colour, stock and price
Collection
Curated product groupings
Cart / CartItem
Active basket and its line items
Order / OrderItem
Placed orders, status, line items
Wishlist
Saved products per user
TryOnJob
Person image, garment, generated image, status
15+ normalized entities in total — the eight above are the core of the schema. A user can create multiple orders, add products to the cart and the wishlist, and run the AI Try-On module — every relation is enforced by the schema.
Secure login and registration, JWT tokens and protected routes.
Product catalog, categories, search and filters — full CRUD.
Add, remove and manage items in your cart.
Save your favourite items for later.
Track orders, history and invoices.
Upload your photo (or use the webcam) to see clothes on you.
Six blockers hit while wiring the AI try-on to a real model — and how each one was fixed.
External limitation · The remaining “Could not resolve app config” that occurs across all public Spaces (Nymbo/IDM-VTON, John6666/IDM-VTON, yisol/IDM-VTON, levihsu/OOTDiffusion) is an EXTERNAL limitation — Spaces removed, renamed or sleeping, or a gradio_client update — not an application bug.

ISMAGI
Licence Professionnelle en Développement Web et Mobile
MONO
MONO AI Fashion Store : Plateforme e-commerce intelligente avec essayage virtuel assisté par l'IA
Full-Stack E-commerce Platform + AI Virtual Try-On
Project Report
Author — Saad Bouhamou · Encadrant — Nassim Kharmoum · Président du jury — Yassine Rayri · Examinateur — Kamal Najem · Year — 2025 – 2026
48 pages · PDF · 2.3 MB
Deliverables
The two PFE deliverables, published with the project: the full written report and the defence slide deck — both served as local files, never from an external host.
48 pages · PDF · 2.3 MB
The complete final-year report (French): context, architecture, implementation, results, difficulties and perspectives.
16 slides · PPTX · 1.4 MB
The defence deck used in front of the jury: the same story, slide by slide.
Presentation Slides
“AI-Powered Fashion E-Commerce with AI Virtual Try-On”
The defence deck — 16 slides, French — follows the same structure as the report.
A complete, production-ready full-stack e-commerce platform with AI virtual try-on, showcasing modern web development, scalable architecture and real-world AI integration.
Live demo coming soon · full source code on GitHub