Artistry Cart

RoleFull-Stack Architect & DevOps Engineer
CategorySaaS · E-Commerce
TimelineJun 2025 – Jun 2026 (12 Months)
Status
Production Deployed (Active R&D)

PROJECT
OVERVIEW

A production-oriented, multi-vendor commerce platform built as an Nx monorepo. The architecture deliberately sits between a monolith and a fully decoupled microservices system — 9 deployable applications share a unified Prisma schema on MongoDB while maintaining logical service boundaries through code ownership, dedicated ports, and an API gateway routing layer.

Multi-vendor artisan commerce built as a service-oriented Nx monorepo. 9 deployable applications connected through an API gateway, Kafka event streaming, and shared infrastructure packages — with AI Vision fully isolated from transactional commerce.

A practical middle ground between a pure monolith and a fully decoupled distributed system — service boundaries are logical rather than physical, which is the right tradeoff for a solo-operated platform.
Architectural Philosophy
Key Details
01

Why Nx Monorepo

Shared Prisma client, unified TypeScript config, atomic cross-service changes, and Nx affected builds that skip unchanged services. A single developer can iterate faster than managing 9 separate repositories.

02

Why Shared Database

Pragmatic tradeoff: services express data ownership logically through code and APIs, not physically through separate databases. This avoids distributed transaction complexity while a single developer owns all services.

03

Why API Gateway

Frontends see one backend entry point. The Express gateway centralizes CORS, rate limiting, health checks, and proxy routing — internal services stay behind ClusterIP in Kubernetes.

04

Why Isolated AI Vision

AI workloads have heavier dependencies, different latency profiles, and scheduled Agenda background jobs. Isolating them from core commerce APIs prevents slow AI calls from degrading checkout performance.

SYSTEM
ARCHITECTURE

Engineered for production durability, type safety, and scalable domain isolation. Every module operates with strict boundaries and predictable failure handling.

MODULAR DOMAIN ISOLATION — BUILT FOR ZERO-DOWNTIME DEPLOYMENTS, TYPE-SAFE CONTRACTS, AND FAIL-SAFE EXCEPTION BOUNDARIES.

SYSTEM BLUEPRINTOpen Vector View
Artistry Cart Architecture Diagram
Architectural Modules
01

API Gateway Pattern

Single Express entry point proxying traffic to 5 internal domain services. Centralizes CORS, rate limiting, request IDs, security headers, and health checks.

02

Kafka Analytics Pipeline

User activity events flow through Kafka into a dedicated worker that materializes analytics read models. Purchases use an outbox pattern to avoid coupling order writes with analytics.

03

AI Vision Boundary

AI workloads (Gemini generation, CLIP embeddings, Agenda jobs) are fully isolated from transactional commerce services — different latency profiles, heavier dependencies, independent scaling.

04

Shared Infrastructure Packages

5 workspace packages (error-handler, middleware, libs, utils, test-utils) provide unified error contracts, JWT auth, Prisma client, Kafka utilities, and test factories across all services.

05

Multi-Stage Docker & K8s

Reusable Dockerfiles produce minimal images. Kustomize overlays for dev/staging/production. Only gateway and frontends are public — internal services stay behind ClusterIP.

PROJECT
IMPACT

Production performance measured under live traffic load, latency stress profiles, and automated system profiling.

ALL OUTCOMES ARE EMPIRICALLY VERIFIED IN PRODUCTION ENVIRONMENTS — MEASURED UNDER HIGH CONCURRENCY, PEAK LATENCY PROFILES, AND AUTOMATED SYSTEM HEALTH AUDITS.

01
9

Deployable Apps

02
25+

Database Models

03
5

CI/CD Workflows

04
5

Architecture Decision Records

KEY
CAPABILITIES

Core capabilities engineered for high-scale reliability, intuitive operator workflows, and real-time production execution.

PRODUCTION-TESTED SYSTEM FEATURES — ARCHITECTED FOR LOW-LATENCY INTERACTION, DETERMINISTIC STATE HANDLING, AND COMPREHENSIVE TELEMETRY.

MODULE / 01
Nx 21pnpm WorkspaceTypeScript

Service-Oriented Nx Monorepo

9 deployable applications (2 Next.js frontends, 1 API gateway, 5 domain services, 1 Kafka worker) and 5 shared infrastructure packages. Nx affected builds skip unchanged services, and shared TypeScript config ensures consistency.

9Applications
5Shared Packages
MODULE / 02
KafkaJSOutbox PatternDLQ

Kafka Analytics Pipeline with DLQ

Frontend publishes user activity events (browse, cart, wishlist, shop visits) to Kafka. Order-service publishes purchase events via an outbox pattern. The kafka-service worker materializes these into UserAnalytics, productAnalytics, and shopAnalytics read models with manual offset commits and dead-letter queue support.

AsyncEvent Flow
3Analytics Models
MODULE / 03
GeminiCLIPAgenda.jsImageKit

AI Vision Service Boundary

Isolated service handling text/image generation via Gemini, visual search via CLIP embeddings, concept galleries, artisan matching, and scheduled maintenance via Agenda.js. Supports anonymous exploration on selected paths while enforcing auth on creation routes.

IsolatedFrom Commerce
BackgroundAgenda Jobs
MODULE / 04
Stripe SessionsWebhooksRaw Body Parsing

Stripe Connect with Webhook Verification

Handles payment sessions and intents for checkout, with 90/10 seller/platform fee splitting. Stripe webhooks mount before JSON body parsing to preserve raw request body for signature verification — a subtle but critical ordering requirement.

90/10Revenue Split
VerifiedWebhooks
MODULE / 05
GitHub ActionsTrivySBOMKustomize

CI/CD Pipeline with Security Scanning

5 GitHub Actions workflows: PR validation with Nx affected tests/builds, image publishing to GHCR with Trivy scanning and SBOM/provenance, staging deployment via Kustomize overlays, controlled production promotion, and nightly security audits.

5CI Workflows
AutomatedSecurity Scans

DEVELOPMENT
PROCESS

A rigorous, phased engineering lifecycle designed to transform architectural requirements into scalable, production-ready systems.

DISCIPLINED SYSTEM METHODOLOGY — ARCHITECTED FOR END-TO-END OBSERVABILITY, DETERMINISTIC REVIEWS, AND ZERO-REGRESSION RELEASE CYCLES.

Connected Lifecycle Grid
PHASE / 01Bounded Contexts

Domain Decomposition

Mapped the commerce domain into 7 bounded contexts (identity, shops, catalog, orders, analytics, AI vision, gateway) with 25+ Prisma models across 6 model clusters.

Domain-Driven Design
PHASE / 02Hybrid Architecture

Service Topology

Designed the hybrid Nx monorepo: shared Prisma schema for development velocity, API gateway for unified entry, Kafka for async analytics decoupling, and isolated AI Vision for workload separation.

System DesignTradeoffs
PHASE / 03Shared Packages

Infrastructure

Built 5 shared packages (error-handler, middleware, libs, utils, test-utils) providing normalized error contracts, JWT auth, Prisma client, Kafka utilities, and test factories across all 9 applications.

DRY Infrastructure
PHASE / 04Container & K8s

DevOps Pipeline

Engineered multi-stage Dockerfiles, 3-tier Compose (infra, apps, full), Kustomize overlays for dev/staging/production, and 5 GitHub Actions workflows with Trivy scanning and SBOM generation.

CI/CDKubernetes
PHASE / 0511-Section System

Documentation

Built a canonical documentation system with 11 sections covering architecture, getting started, domain models, testing strategy, DevOps, and 5 formal Architecture Decision Records (ADRs).

Technical WritingADRs
ARCHITECTURE STACK // COMPONENT MATRIX

TECHNOLOGY
STACK

An engineered architectural map outlining foundational nodes, runtime environments, and type-safe deployment frameworks.

DETERMINISTIC ARCHITECTURE STACK — PROFILED FOR PRODUCTION LATENCY, STRICT TYPE SAFETY, AND HIGH-CONCURRENCY SCALABILITY.

Total Nodes
30+
Architectural Components
Type Safety
100%%
System Expansion Slot
Layer 1

frontend

Next.js 15
React 19
Tailwind CSS 4
TanStack Query
Zustand & Jotai
Layer 2

backend

Express + TypeScript
MongoDB + Prisma
Redis
Kafka + KafkaJS
Stripe SDK
Layer 3

ai

Google Gemini
Hugging Face CLIP
TensorFlow.js
LangChain
ImageKit
Layer 4

devops

Nx 21 Monorepo
GitHub Actions
Docker + Compose
Kubernetes + Kustomize
Trivy + SBOM