AI / ML · E-commerce
Cartly
Cartly is a full-stack fashion e-commerce platform built for Bangladesh: a Vue 3 storefront and admin, a NestJS + Prisma commerce API, and a FastAPI AI service, sharing PostgreSQL with pgvector and Redis. Its assistant, Pip, runs on Claude, answers in the shopper's own language, searches the catalog by meaning, and acts in the store (adding to cart, starting a virtual try-on). I designed and built all three codebases.
- Role
- Solo full-stack & AI engineer
- Client
- Product build
- Timeline
- 2026
- Year
- 2026
Claude-powered shopping assistant that takes 13 in-store actions
Virtual try-on, voice, and semantic search, each with a fallback
bKash, Nagad, SSLCommerz payments and Pathao, Steadfast, RedX delivery
Overview
Most online fashion stores in Bangladesh are a catalog and a checkout. Cartly asks what shopping would look like if a knowledgeable assistant came with the store: one that understands what you mean, speaks your language, shows you how a piece looks on you, and handles the cart for you, on top of the local payment and courier rails people actually use.
Architecture
Three codebases: a Vue 3 storefront, a Vue 3 back-office, and a backend made of a NestJS 12 + Prisma commerce API (auth, catalog, cart, payments, delivery, returns, analytics) and a separate FastAPI service that owns everything AI. They share PostgreSQL 16 with pgvector, where the AI service keeps its own schema for product embeddings, and Redis for carts, assistant memory, rate limits, caches, and pub/sub events.
The AI layer
Pip runs on Claude with the catalog and persona in a cached system prompt, so most turns are a single call. Every reply is structured JSON (text, speech, products, actions, suggestion chips), and every product id and action is checked against the catalog before it reaches the shopper. A separate tool call with web search keeps trend answers current, cached per topic. Each turn carries the shopper's cart, orders, locale, season, and upcoming festivals, and Pip answers in the language and script the shopper used.
Every AI feature has a working fallback (a rule-based brain, a dependency-free embedder, browser speech), the storefront asks the API which capabilities are on, and every paid call is metered per feature against a daily budget. Evaluation scripts compare models on the same conversations and score try-on quality under a spend cap.
Commerce for Bangladesh
Payments cover bKash Tokenized Checkout, Nagad's encrypted merchant API, Rocket and cards through SSLCommerz, and cash on delivery, with gateway credentials encrypted at rest and orders marked paid only after server-side confirmation. Delivery integrates Pathao, Steadfast, and RedX, each with its own webhook authentication and a periodic sweep for missed updates, plus a phone-friendly rider app. Stock is checked and decremented inside the checkout transaction.
Outcome
Cartly is a complete, tested platform ready to deploy, with a documented plan for scaling to 10,000 concurrent shoppers. Gateway and courier integrations are exercised against local stand-ins in the test suite.
Key features
Pip: structured JSON replies validated against the real catalog, with prompt caching and a web-search tool for live trends
Replies in Bangla, English, Banglish, or Hinglish, aware of season and festivals like Eid and Durga Puja
Hybrid search: pgvector similarity + filters + keywords, with suggestions streamed over WebSocket as the shopper speaks
Layered virtual try-on (FASHN) with per-step Redis caching, consent, EXIF stripping, and an on-device MediaPipe accessory preview
Voice in and out with ElevenLabs, falling back to the browser's speech APIs
Encrypted payment-gateway credentials, server-confirmed payments, and settle-once callbacks
Per-feature AI spend metering with daily budgets, and a 21-view admin with RFM, cohort, and district-level analytics
35 end-to-end API tests against real Postgres and Redis, plus 61 pytest tests for the AI service
Built with
Have a project like this?
I take products from first sketch to shipped, design, build, and the AI in between. Tell me what you’re working on.

