Skip to content

rizwan3d/SupportAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SupportAI MVP Monorepo

SupportAI is a multi-tenant SaaS customer support platform for SMBs. This repository contains a working MVP foundation with production-oriented boundaries.

Monorepo layout

  • apps/web — Angular + TypeScript + Tailwind admin console.
  • apps/widget — embeddable web chat widget build target.
  • backend/src/SupportAI.Api — C# (.NET 8) API service.
  • backend/tests/SupportAI.Api.Tests — critical backend tests.
  • infra — Docker and deployment infrastructure.
  • scripts — local bootstrap and seed helpers.

Architecture (MVP)

Runtime services

  • web: Angular admin dashboard (signup/login, org/doc/conversation views).
  • api: .NET API handling auth, tenancy, documents, chat, billing enforcement, audit logs.
  • postgres: system of record for tenants, users, docs, conversations, billing, audit logs.
  • redis: cache/session/rate-limiting and async work coordination.
  • qdrant: vector store for chunk embeddings.
  • minio: S3-compatible object storage for raw files and derived artifacts.
  • ollama: local LLM serving for generation + embeddings (provider abstraction allows vLLM later).

Multi-tenant model

  • Tenant = Organization.
  • Every domain row references OrganizationId for tenant isolation.
  • App-layer access always resolves user memberships then filters by organization.
  • Audit records capture actor, action, and scoped entity ids.

API modules (vertical slices)

  • Auth: email/password signup + login with JWT.
  • Tenancy: organization creation + membership linking.
  • KnowledgeBase: upload/URL ingest, chunking, embeddings, vector indexing.
  • Chat: RAG pipeline with retrieval from Qdrant and response from Ollama.
  • Billing: Stripe-backed plan state with Starter/Growth/Business enforcement.
  • Escalations: email handoff when bot confidence threshold/rules trigger.
  • Analytics: basic doc and conversation counters for admin dashboard.

Data flow for RAG

  1. Admin uploads file/URL.
  2. API stores source in MinIO and metadata in Postgres.
  3. Worker extracts text, chunks content, asks embedding provider.
  4. Vectors upserted into Qdrant with organizationId payload filter.
  5. Chat query embeds question, retrieves tenant-scoped chunks, composes prompt, queries Ollama.
  6. Conversation messages + retrieval metadata persisted and audited.

Provider abstractions

  • ILLMProvider for generation.
  • IEmbeddingProvider for embeddings.
  • IVectorIndex for vector operations.
  • IObjectStorage for S3-compatible storage.

Initial implementation targets Ollama + Qdrant + MinIO with interfaces ready for vLLM/S3 variants.

Local development

Prerequisites

  • Docker + Docker Compose
  • .NET 8 SDK
  • Node 20+

Start infrastructure + app containers

docker compose up --build

API migrations + seed

cd backend/src/SupportAI.Api
dotnet ef database update
cd ../../..
./scripts/seed-demo.sh

MVP status (this milestone)

Implemented now:

  • Monorepo scaffold
  • Docker Compose stack
  • Initial Postgres schema + migration
  • Auth + organization models and endpoints

Next increments:

  • Knowledge ingestion + chunking + embeddings
  • Chat/RAG endpoints + widget integration
  • Stripe subscription sync + enforcement middleware

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors