REGULATED E-COMMERCE PLATFORM

E-Commerce for Industries
That Can't Use Shopify.

A multi-tenant SaaS platform for medical supplies, chemicals, firearms—industries where generic e-commerce fails. Handles compliance certificates, lot tracking, B2B contract pricing, and the Quote→Order→Invoice workflow.

B2B+B2C
Hybrid Model
Multi
Tenant SaaS
RLS
Row-Level Security
AI
Sales Assistant

The Problem with Generic Platforms

Why Shopify and WooCommerce fail for regulated industries.

❌ Generic Platforms Can't Handle

  • Complex Products — Items requiring hazmat certification, FDA compliance, or 50+ customizable parts
  • B2B Complexity — Corporate accounts with parent-child hierarchies, contract-specific pricing, Net 30 invoicing
  • Compliance — Tracking certificate expiry, restricting sales by region or license
  • Lot Tracking — Essential for recalls (e.g., contaminated batch of chemicals)
  • Quote Workflows — Sales approval → Order → Invoice → Payment via terms

✓ NicheMart Solves These

  • Regulatory Engine — Native handling of ComplianceCertificate and restrictions (IsHazmat, IsRegulated)
  • Dual Frontend — MudBlazor Admin for merchants + Consumer Storefront + .NET MAUI mobile
  • B2B + B2C Hybrid — Credit card checkout AND corporate invoicing in one system
  • AI Sales Assistant — RAG system helps customers find technical products using natural language
  • White-Label SaaS — Each tenant gets their own branded storefront

Domain Design

Five bounded contexts handling the specialized commerce lifecycle.

📦 Catalog & Compliance

Polymorphic products (Standard, Configurable, Bundle) with compliance guards that prevent listing without valid certificates.

Product • Variant • Attribute • Certificate

💰 Pricing & Promotions

Contract-specific pricing, price lists by customer group, and promotions—all evaluated in priority order.

PriceList • ContractPrice • Promotion

📋 Order Management

Full B2B workflow: Quote → Approval → Order → Split Shipments → Invoice → Net 30 payment.

Quote • Order • Shipment • Invoice • Return

🏭 Inventory & Logistics

Lot tracking for recalls, immutable stock ledger for audit trail, backorder management.

Warehouse • StockLedger • Lot • Backorder

🤖 AI Concierge (RAG)

Tenant uploads PDF manuals → System chunks and embeds → Customer asks questions → AI answers with citations.

Corpus • Document • Chunk • AnswerLog

Architecture Highlights

The patterns that make regulated e-commerce possible.

🏢

Multi-Tenancy with RLS

Shared schema, row-level isolation. Every query automatically filters by TenantId. Feature flags per tenant control which capabilities are available.

🛒

Unified Cart Service

Handles guest carts vs logged-in carts with automatic merging on login. Live pricing recalculation reflects dynamic B2B pricing changes.

High-Performance Catalog (CQRS)

Write model via EF Core ensures data integrity. Read model via denormalized Elasticsearch enables instant search with faceting.

📱

99% Code Sharing (MAUI)

Mobile app reuses 99% of Storefront ViewModels and Services. Only the View layer (XAML vs Razor) differs. Barcode scanning for warehouse restocking.

🔐

Dual Identity System

Tenant staff via User/Role/Permission tables (Admin). Customers via separate auth flow with Storefront API access. API Keys for ERP integration (SAP, Oracle).

📡

Real-Time Stock (SignalR)

"Only 3 left!" warnings on product pages update in real-time. Inventory changes push to all connected browsers instantly.

B2B Workflow

The full quote-to-cash process for enterprise customers.

Quote → Order → Invoice Flow

📝 Customer creates Quote
✅ Sales approves
📦 Converts to Order
🚚 Split Shipments
📄 Generate Invoice
💳 Net 30 Payment

Technology Stack

Enterprise-grade platform for regulated commerce.

.NET 9
FastEndpoints
EF Core 9
MudBlazor
.NET MAUI
SQL Server
MongoDB GridFS
Redis
RabbitMQ
Elasticsearch
SignalR
Oracle 23ai