TnBusiness

Multi-Tenant E-Commerce SaaS
Company:Independent / Client Project
Technology:Next.js 16, React 19, PostgreSQL, Prisma, K3s, Redis
Category:Multi-Tenant E-Commerce SaaS

Overview

Multi-tenant e-commerce SaaS for Tunisia. Merchants sign in with Google and open an online shop in minutes on their own subdomain, selling with cash on delivery. Dashboard for products, variants and stock, order tracking, local couriers, theming, per-shop Google Analytics and Meta Pixel, TikTok Live selling and real-time notifications. Stack: Next.js 16, React 19, PostgreSQL, Prisma (row level security), K3s, Redis, ArgoCD.

Pricing is a flat monthly fee per shop with 0% commission, and every shop is isolated at the database level with row level security. Delivery runs on K3s with GitOps (GitHub Actions, ArgoCD, Kargo).

The problem

Tunisian merchants who want to sell online face setup cost and complexity, and the local market buys with cash on delivery rather than cards.

My role

Independent project. Architecture, implementation and delivery.

Tech stack

  • Next.js 16
  • React 19
  • TypeScript
  • PostgreSQL
  • Prisma
  • Redis
  • SeaweedFS
  • K3s
  • ArgoCD
  • Kargo
  • GitHub Actions

Key decisions

  • One PostgreSQL database with Prisma for every tenant, isolated with row level security and soft deletes, instead of a database per shop.
  • Monorepo split into three deployables: the storefront, the merchant dashboard, and a shared Google sign-in service.
  • Each merchant gets a shop on their own subdomain, so tenant routing is resolved from the host.
  • Cash on delivery as the primary payment path, because that is how the market actually buys.
  • Runs on K3s with Redis and SeaweedFS for media, delivered by GitOps with GitHub Actions, ArgoCD and Kargo.

Gallery