OwFlex
Multi-Tenant AI Chatbot SaaS Platform with Embeddable Web Widget & RAG (Private Core)
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:
💰 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
🛠️ 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)
| Variable | Description | Example / Format |
|---|---|---|
| DATABASE_URL | PostgreSQL connection string with pgvector | postgresql://... |
| BETTER_AUTH_SECRET | BetterAuth encryption and session secret | secret_... |
| BETTER_AUTH_URL | Base URL for authentication callbacks | https://app.example.com |
| NEXT_PUBLIC_SANITY_PROJECT_ID | Sanity CMS project ID for marketing & documentation | xyz... |
| SANITY_API_WRITE_TOKEN | Sanity write token for content revalidation | sk_... |
| OPENROUTER_API_KEY | API key for embeddings and conversational completions | sk-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 installInstalls Next.js, Drizzle ORM, and client UI components.
3.Run database migrations with Drizzle
npx drizzle-kit pushSets up multi-tenant tables, organization memberships, and vector embedding columns in Postgres.
4.Start the development server
npm run devLaunches 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.
Voice Interaction Mode
Allow visitors to speak with the widget using low-latency speech-to-text and audio synthesis.
HubSpot & Salesforce Integrations
Automatically sync collected leads and conversation transcripts directly into popular CRMs.
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.