Owais Abdullah logo
Back to all projects
PlatformFree for Personal UseAttribution Required

OwFlex

Full-Stack Multi-Tenant AI Chatbot SaaS with Embeddable Web Widget & RAG

Free & Open Architecture Alternative To:

ChatbaseFastBotsDante AISiteGPTVoiceflow

💰 Value & Cost Savings Comparison

Traditional Industry Solution

Chatbase / SiteGPT Monthly Subscriptions

$99 - $399 / month

This Project (By Owais Abdullah)

Free for Personal Use (Self-Hosted SaaS)

Save $2,500+/year and retain 100% data privacy

🎯 Pain Points Solved

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

The Problem

Building a production multi-tenant AI chatbot platform with authentication, usage limits, and document indexing takes 3–6 months from scratch.

The Solution

OwFlex provides a complete, battle-tested codebase with multi-tenancy, vector search, billing, and embed scripts ready to deploy.

The Problem

Embedding chatbots onto third-party client websites often breaks due to CSS conflicts, large bundle sizes, and slow load times.

The Solution

Includes a standalone, zero-dependency lightweight embed script that injects an isolated iframe widget compatible with any website or CMS.

The Problem

Managing tenant documents and website FAQs requires expensive specialized vector database hosting.

The Solution

Utilizes PostgreSQL pgvector with Drizzle ORM, offering cost-effective vector search directly in the primary application database.

Core Capabilities & Architecture

Architected with Next.js 15 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 15TypeScriptTailwind CSSDrizzle ORMPostgreSQL (Neon)Sanity CMSStripe BillingDocker

🛠️ 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

VariableDescriptionExample
DATABASE_URLPostgreSQL connection string with pgvectorpostgresql://...
NEXT_PUBLIC_SANITY_PROJECT_IDSanity Project IDxyz...
STRIPE_SECRET_KEYStripe API secret keysk_live_...
OPENAI_API_KEYAPI key for embeddings and completionssk-...

Execution Steps

1.Clone the repository

git clone https://github.com/MrOwaisAbdullah/Owflex-Chatbot-Saas.git
cd Owflex-Chatbot-Saas

2.Install dependencies

npm install

3.Run database migrations with Drizzle

npx drizzle-kit push

4.Start the development server

npm run dev

🗺️ Project Roadmap & Planned Improvements

Current release progress and planned future enhancements:

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

Creative Commons Attribution-NonCommercial 4.0 (CC BY-NC 4.0)

Free for personal, learning, and portfolio examination with mandatory credit to Owais Abdullah. Commercial hosting, white-labeling, or paid access requires a commercial agreement.

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