Back to all projects
PlatformPrivate Core / Client ArchitectureAttribution Required

OwFlex

Multi-Tenant AI Chatbot SaaS Platform with Embeddable Web Widget & RAG (Private Core)

Primary User Role: B2B SaaS Clients, Digital Agencies, and Website Owners seeking branded customer chatbots

Private Repository Notice

Private Commercial SaaS Repository. Code access is restricted to authorized enterprise partners; interactive demos and client onboarding portals are available publicly.

Free & Open Architecture Alternative To:

⚡ Chatbase⚡ FastBots⚡ Dante AI⚡ SiteGPT⚡ Voiceflow

💰 Value & Cost Savings Comparison

Traditional Industry Solution

Chatbase / SiteGPT Monthly Subscriptions

$99 - $399 / month

This Project (By Owais Abdullah)

Private Multi-Tenant SaaS Platform

Custom branded deployment with complete data ownership

🎯 Pain Points Solved

Why this project was built and the operational friction it eliminates:

The Problem

Building a reliable multi-tenant chatbot SaaS with document indexing, auth, token limits, and embed scripts takes 3–6 months from scratch.

The Solution

OwFlex provides a complete, battle-tested architecture with workspace isolation, vector search, billing, and embed scripts.

The Problem

Embedding chatbots onto third-party client websites often creates CSS conflicts and bloats client page bundle sizes.

The Solution

Features a standalone, zero-dependency lightweight embed script that injects an isolated iframe widget compatible with WordPress, Shopify, and custom web apps.

The Problem

Specialized vector database hosting often adds unnecessary monthly costs and infrastructure complexity.

The Solution

Utilizes PostgreSQL pgvector with Drizzle ORM, delivering sub-second vector similarity search directly inside the primary application database.

⚡ Core Capabilities & Architecture

Architected with Next.js App Router. The application dashboard handles authentication, tenant configuration, and document indexing. Embeddable widget assets are served via a high-speed CDN proxy. Chat queries trigger vector similarity searches in Neon PostgreSQL (pgvector) using Drizzle ORM, feeding grounded context to LLM models for streaming responses.

  • ✔1-Line Embed Script: Drop-in JavaScript tag working across WordPress, Shopify, Webflow, and custom websites
  • ✔Multi-Tenant Workspace Isolation: Independent organizations, team members, and role-based permissions
  • ✔RAG Document Ingestion: Parse PDFs, DOCX, text files, and website sitemaps into vector embeddings
  • ✔Visual Customization: Match chatbot colors, avatar, launcher position, and greeting messages to brand styling
  • ✔Stripe Subscription Integration: Tiered pricing plans with automated monthly token usage metering
  • ✔Sanity Headless CMS: Effortlessly manage marketing copy, help articles, and onboarding documentation
Built With:Next.js (App Router)TypeScriptTailwind CSSDrizzle ORMNeon PostgreSQL (pgvector)BetterAuthSanity CMSStripe BillingOpenRouter API

🛠️ How to Setup & Run Locally

Quick-start guide to clone, configure, and execute this project in your own environment:

Prerequisites

  • Node.js 20+ and npm
  • PostgreSQL database with pgvector extension (e.g. Neon)
  • Sanity.io account
  • Stripe developer account

Key Environment Variables (.env)

VariableDescriptionExample / Format
DATABASE_URLPostgreSQL connection string with pgvectorpostgresql://...
BETTER_AUTH_SECRETBetterAuth encryption and session secretsecret_...
BETTER_AUTH_URLBase URL for authentication callbackshttps://app.example.com
NEXT_PUBLIC_SANITY_PROJECT_IDSanity CMS project ID for marketing & documentationxyz...
SANITY_API_WRITE_TOKENSanity write token for content revalidationsk_...
OPENROUTER_API_KEYAPI key for embeddings and conversational completionssk-or-v1-...

Execution Steps

1.Request Private Repository Access

OwFlex is a private commercial product. Authorized collaborators clone via private SSH key; contact Owais Abdullah for partner licensing.

2.Install dependencies

npm install

Installs Next.js, Drizzle ORM, and client UI components.

3.Run database migrations with Drizzle

npx drizzle-kit push

Sets up multi-tenant tables, organization memberships, and vector embedding columns in Postgres.

4.Start the development server

npm run dev

Launches the tenant management portal and embed script generator on localhost:3000.

🗺️ Project Roadmap & Planned Improvements

Current release progress and planned future enhancements:

Zero-Dependency Iframe Widget

High-performance embeddable widget script loading across any website with isolated styling.

Completed

Voice Interaction Mode

Allow visitors to speak with the widget using low-latency speech-to-text and audio synthesis.

Planned

HubSpot & Salesforce Integrations

Automatically sync collected leads and conversation transcripts directly into popular CRMs.

Planned

License, Fair Use & Attribution Terms

Proprietary / Private Commercial SaaS Core

OwFlex is a commercial SaaS product developed by Owais Abdullah. The core platform repository is private. Architecture, live demo instances, and tenant integration guides are presented here for portfolio review.

Required Attribution Notice: "Built by Owais Abdullah (https://github.com/MrOwaisAbdullah)"