Case Study · AI SaaS Platform

NexusMarket — an AI-native, multi-tenant B2B marketplace

A Flask SaaS platform where any business can launch its own marketplace, with six GPT-powered tools for listings, pricing, SEO, reviews, search and support, plan-based AI quotas and a REST API.

Project
AI SaaS marketplace
Scope
Architecture · Backend · AI · UI
Stack
Flask · SQLAlchemy · OpenAI
Status
Working prototype, open source
NexusMarket landing page, seller dashboard and AI assistant chat panel on a dark indigo background
The Brief

A marketplace in a weekend, not a quarter

Launching a marketplace means building the platform and then writing every listing, price and meta tag by hand.

NexusMarket tackles both halves. It is a multi-tenant platform, so each business gets its own marketplace with its own slug, branding, data and settings, and it puts AI into the daily work of selling: drafting listing copy, suggesting a price, generating SEO metadata, summarising reviews and understanding what a buyer is actually searching for.

Listings can be products, services, digital goods or jobs, which keeps the platform useful for B2B categories from industrial parts to software licences.

The platform handles the plumbing. The AI handles the writing.
What We Built

The core of the platform

01

Multi-tenant by design

Every record carries a tenant, and the tenant is resolved from the subdomain or an X-Tenant header. One database serves many marketplaces without leaking data between them.

02

Six AI tools

Listing descriptions, pricing analysis, SEO metadata, review summaries, semantic search and a chat assistant, each exposed as an API endpoint and a button in the dashboard.

03

Plans and AI quotas

Starter, Professional and Enterprise tiers set listing, team and monthly AI-request limits. Every AI call checks the quota first and returns a clear 429 with an upgrade link when it is spent.

04

Seller dashboard

Active listings, orders, revenue, rating and AI usage at a glance, with the AI toolkit one click away and recent orders and sales below.

05

Self-serve onboarding

A three-step signup: name your marketplace, claim a subdomain, pick a plan. The tenant and its owner account are created together.

06

REST API v1

A listings endpoint secured with a per-tenant API key, a stats endpoint and every AI endpoint, so a marketplace can be wired into other systems.

Who It Serves

Three people, one platform

Owner

“Launch and run my marketplace.”

  • Self-serve onboarding with a subdomain
  • Choose and change a plan
  • Approval, categories and settings routes
  • Custom domain and white-label on Enterprise
Seller

“Get listings live, faster.”

  • Dashboard with sales, rating and AI usage
  • AI-written descriptions and SEO tags
  • Pricing suggestions with a competitiveness score
  • Products, services, digital goods and jobs
Buyer

“Find the right thing quickly.”

  • Search that understands intent, not just keywords
  • Reviews condensed into a two-sentence summary
  • A chat assistant for questions
  • Featured listings and discounts
The Product

Inside NexusMarket

A dark, focused interface in indigo and violet, built with a hand-written design system and no CSS framework.

Screens captured from the running application. Select any screen to view it full size.

Engineering

Decisions that mattered

Tenant isolation without separate databases

A tenant_id foreign key on every table and tenant-scoped queries keep marketplaces apart while sharing one schema, which is far cheaper to run and migrate than a database per customer.

Quota enforced at the model

The tenant model knows its plan limits and counts the month’s AI calls from a usage log, so the check is one method that every endpoint calls before it spends a token.

Structured output where parsing matters

Pricing, SEO, search and listing copy use the model’s JSON mode, so the app receives data it can rely on. Temperature is set per task: low for pricing and search, higher for creative copy.

Cost-aware by default

The default model is the economical GPT-4o-mini, and a single setting switches the whole app to a larger one when a customer needs it.

6
AI endpoints,
plan-metered
3
SaaS plans,
$29 to $299
13
Data models,
tenant-scoped
1.8k
Lines of Python
in the backend
Where It Stands

A working prototype, built in the open

The foundations are solid; the storefront screens are next.

In place and running: tenant model and plans, sign-in and registration, self-serve onboarding, the marketplace home, the seller dashboard, the AI service layer with quota checks, and the REST API.

Still to build: the public browse and listing-detail pages, listing-management forms and the admin screens. Stripe is wired as configuration with placeholder price IDs, so billing is switched on once real products exist. The source is public so the work can be followed as it grows.

Read the code on GitHub →

Under the Hood

Architecture & stack

Backend
PythonFlask 3SQLAlchemyFlask-LoginFlask-MigrateApplication-factory layout with six blueprints: auth, marketplace, dashboard, admin, tenant and API.
AI
OpenAI SDKGPT-4o-miniJSON modeA single service module wraps every model call and logs each one against the tenant’s quota.
Data
SQLitePostgreSQLSQLite for development, PostgreSQL in production, with Alembic migrations.
Platform
Flask-LimiterFlask-MailStripe SDKRate limiting, transactional email and subscription billing hooks.
Frontend
JinjaVanilla CSS & JSFont AwesomeServer-rendered pages and a custom dark design system, with no CSS framework.
Deployment
GunicornNginxWildcard subdomain routing so each marketplace gets its own address.

Want something like this for your business?

Tell us a little about your idea. We will tell you honestly what it would take, how long it would take and what it would cost.

  • Free discovery call
  • Reply within 24 hours
  • First working version in 72 hours

Want an AI-powered SaaS of your own?

Multi-tenant platforms, usage-metered AI and clean APIs are what we build. Tell us the product and we’ll scope it.

View the Code ↗ Start a Conversation