Skip to content

Educational Purposes: V1 of a Modern, Privacy-Aware, Scalable Full-Stack SaaS Platform. Providing LLM Management System that seamlessly integrates both local LLMs (e.g., Ollama, LM Studio) and cloud-based AI (Google AI etc.), offering real-time chat, persistent memory, intuitive UI, and authentication.

License

Notifications You must be signed in to change notification settings

kunalsuri/ai-chatbot-saas-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI ChatBot SaaS

A modern, full-stack SaaS AI chatbot platform with Feature-Driven Development architecture. Supports local LLMs (Ollama, LM Studio) and cloud providers (Google AI, OpenAI et al.) with real-time chat, chat memory, advanced UI, and production-ready authentication.

License React TypeScript GitHub Copilot Deploy with Vercel


Crafted with ❀️ in Paris by kunalsuri, blending Human Intellect (mine ✌️) with state-of-the-art Agentic AI Systems (Human-in-the-Loop).


πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


⚠️ Disclaimer

This project has been developed using a combination of AI-assisted software development and whiteboarding tools, including (but not limited to) Visual Studio Code, GitHub Copilot Pro, Windsurf, Cursor, and Krio, with Human-in-the-Loop supervision and review.

While every reasonable precaution has been taken, including AI-generated code validation, malware scanning, and static analysis using tools such as CodeQL β€” the authors and contributors do not accept any responsibility for potential errors, security vulnerabilities, or unintended behavior within the generated code.

This software is provided β€œas is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.

Use this project at your own discretion and risk.

Please review and validate any AI-generated code before committing or merging changes.


✨ Key Features

  • πŸ—οΈ Feature-Driven Development: Modular architecture with self-contained features
  • πŸ€– Multi-LLM Support: Local (Ollama, LM Studio) + Cloud (Google AI, OpenAI et al.)
  • πŸ’¬ Real-time Chat: Streaming responses with conversation history
  • 🌐 Translation & Summarization: Built-in AI-powered tools
  • πŸ”’ Enterprise Security: RBAC, CSRF protection, session management
  • πŸ“± Modern UI/UX: React 18, TypeScript, Tailwind CSS, Framer Motion
  • πŸš€ Production Ready: PWA support, performance monitoring, error boundaries

πŸš€ Quick Start (3 minutes)

Prerequisites

Get Started

# 1. Clone and install
git clone https://github.com/kunalsuri/ai-chatbot-saas-template.git
cd ai-chatbot-saas-template
npm install

# 2. Start development server
npm run dev

# 3. Open http://localhost:5000

That's it! The app works immediately with no configuration required.

πŸ§ͺ Run Comprehensive Tests

# Run all tests, quality checks, and build verification
npm run test:all

This single command runs:

  • βœ… All unit tests (9 passing tests)
  • βœ… TypeScript type checking
  • βœ… Code quality analysis
  • βœ… Security audit
  • βœ… Production build test
  • βœ… Coverage report generation

Optional: Add AI Providers

For Local LLMs (No API keys needed):

  • Install LM Studio or Ollama
  • Download a model (e.g., Llama 3.1)
  • Start the local server
  • Select the provider in the app

For Cloud Providers:

  • Copy .env.example to .env
  • Add your API keys (Google AI, OpenAI, etc.)
  • Restart the server

πŸ—οΈ Feature-Driven Architecture

Each feature is self-contained with its own components, services, types, and routes following modern React and TypeScript best practices:

πŸ“ Features (Client & Server)
β”œβ”€β”€ πŸ” auth/              # Authentication & RBAC with session management
β”œβ”€β”€ πŸ’¬ chatbot/           # AI Chat with streaming responses
β”œβ”€β”€ πŸ“Š dashboard/         # Analytics with real-time updates
β”œβ”€β”€ πŸ€– model-management/  # AI provider management & health monitoring
β”œβ”€β”€ 🌐 translation/       # Translation services with history
β”œβ”€β”€ ✨ prompt-improver/   # AI-powered prompt enhancement
β”œβ”€β”€ πŸ“ editor/            # Content editing with auto-save
└── βš™οΈ settings/          # User preferences & configuration

πŸ“ Modern Infrastructure
β”œβ”€β”€ 🎨 components/ui/     # Accessible Radix UI components
β”œβ”€β”€ πŸ”§ lib/              # Type-safe utilities & API client
β”œβ”€β”€ πŸ“‹ types/            # Strict TypeScript definitions
β”œβ”€β”€ πŸ”’ security/         # CSRF, rate limiting, validation
└── πŸ“š docs/             # Comprehensive documentation

Modern Development Benefits:

  • βœ… React 18+: Concurrent features, Suspense, automatic batching
  • βœ… TypeScript Strict: Full type safety with branded types
  • βœ… Performance: Code splitting, memoization, optimized queries
  • βœ… Accessibility: WCAG 2.1 AA compliance with Radix UI
  • βœ… Security: CSRF protection, input validation, secure headers
  • βœ… Developer Experience: Hot reload, type-safe APIs, structured logging

πŸ“š Documentation

πŸ’Ύ Simple Storage

No database setup required! Everything is stored in local JSON files:

data/
β”œβ”€β”€ chat_history.json      # Your conversations
β”œβ”€β”€ users.json            # User accounts
β”œβ”€β”€ templates.json        # Saved templates
└── translation_history.json # Translation history

Benefits:

  • βœ… Zero configuration
  • βœ… Easy to backup/restore
  • βœ… Perfect for development and small deployments
  • βœ… Optional PostgreSQL support for scaling

🧠 Adding AI Models (Optional)

🏠 Local Models (Free, Private)

LM Studio (Recommended for beginners)

# 1. Download from https://lmstudio.ai
# 2. Download a model (e.g., Llama 3.1 8B)
# 3. Start local server
# 4. Select "LM Studio" in the app

Ollama (Command-line friendly)

# 1. Install from https://ollama.com
ollama serve
ollama pull llama3.1
# 2. Select "Ollama" in the app

☁️ Cloud Models (API Keys Required)

Add to .env file:

GOOGLE_AI_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here

πŸš€ Production Deployment

Quick Deploy

# Build and start
npm run build
npm run dev

Docker (Recommended)

docker-compose up -d

Platform Deploy

  • Vercel: Click the deploy button above
  • Railway: Connect your GitHub repo
  • DigitalOcean: Use App Platform

See Deployment Guide for detailed instructions.

🀝 Contributing

Adding a new feature is easy with FDD:

# 1. Create feature directories
mkdir -p server/features/my-feature/{routes,services,types}
mkdir -p client/src/features/my-feature/{components,hooks,api}

# 2. Implement your feature
# 3. Register routes in server/routes.ts
# 4. Add navigation in client sidebar
# 5. Submit PR

See Development Guide for detailed contribution guidelines.

πŸ”— Links


Made with ❀️ in Paris, France | 2025 | Kunal Suri

About

Educational Purposes: V1 of a Modern, Privacy-Aware, Scalable Full-Stack SaaS Platform. Providing LLM Management System that seamlessly integrates both local LLMs (e.g., Ollama, LM Studio) and cloud-based AI (Google AI etc.), offering real-time chat, persistent memory, intuitive UI, and authentication.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published