Skip to content

jagrat2004/Serviq-AI

Repository files navigation

ServiqAI - An Intelligent Conversational AI Infrastructure for Scalable Customer Support Automation

🚀 Overview

ServiqAI is a comprehensive web-based platform that empowers businesses to create, customize, and embed intelligent AI-powered customer support chatbots on their websites. Built with modern web technologies, it provides a seamless dashboard for configuring chatbot knowledge and business details, enabling personalized customer interactions through a simple embeddable script.

✨ Key Features

  • 🤖 AI-Powered Responses: Leverages Google Gemini 2.5-flash for intelligent, context-aware customer support
  • 🔐 Enterprise Authentication: Secure SSO integration with ScaleKit for enterprise-grade access control
  • 📊 Intuitive Dashboard: User-friendly interface for configuring business knowledge and chatbot settings
  • 🌐 Easy Embedding: One-click embeddable chatbot script for any website
  • ⚡ Real-time Chat: Instantaneous message exchange with responsive UI
  • 🔒 Secure & Scalable: Built with Next.js and MongoDB for high performance and security
  • 🎨 Customizable UI: Modern, responsive design with Tailwind CSS and smooth animations

🏗️ System Architecture

System Architecture

Architecture Components

  • Frontend Layer: Next.js React application with TypeScript
  • Backend Layer: Next.js API routes handling business logic
  • Data Layer: MongoDB with Mongoose ODM for data persistence
  • AI Layer: Google Gemini integration for natural language processing
  • Authentication Layer: ScaleKit SSO for secure user management

🗄️ Database Design

Database Design

Database Schema Details

Settings Collection

  • Purpose: Stores chatbot configuration for each business owner
  • Key Fields:
    • ownerId: Unique identifier from authentication provider
    • businessName: Business/organization name
    • supportEmail: Support contact email
    • knowledge: Business knowledge base and policies
  • Relationships: One-to-one with chatbot owners

🛠️ Technology Stack

Frontend

  • Framework: Next.js 16.1.4 (App Router)
  • UI Library: React 19.2.3
  • Language: TypeScript 5.x
  • Styling: Tailwind CSS 4.x
  • Animations: Framer Motion 12.29.0
  • Fonts: Geist Sans & Geist Mono

Backend

  • Runtime: Next.js API Routes (Node.js)
  • Database: MongoDB with Mongoose 9.1.5
  • Authentication: ScaleKit SDK 2.1.9
  • AI Service: Google Generative AI 1.38.0
  • HTTP Client: Axios 1.13.3

Development Tools

  • Build Tool: Next.js built-in
  • Linting: ESLint 9.x
  • Type Checking: TypeScript
  • Package Manager: npm
  • CSS Processing: PostCSS

🚀 Getting Started

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn
  • MongoDB database
  • Google Gemini API key
  • ScaleKit account and credentials

Installation

  1. Clone the repository

    git clone <repository-url>
    cd <to-project-folder>
  2. Install dependencies

    npm install
  3. Environment Setup Create a .env.local file in the root directory:

    MONGODB_URL=
    SCALEKIT_ENVIRONMENT_URL=
    SCALEKIT_CLIENT_ID=your-scalekit-client-id
    SCALEKIT_CLIENT_SECRET=your-scalekit-client-secret
    GEMINI_API_KEY=your-gemini-api-key
  4. Run the development server

    npm run dev
  5. Open your browser Navigate to http://localhost:3000

📖 Usage

For Business Owners

  1. Sign Up/Login: Use enterprise SSO via ScaleKit
  2. Configure Chatbot:
    • Access the dashboard at /dashboard
    • Enter business name, support email, and knowledge base
    • Save settings
  3. Generate Embed Code:
    • Go to /embed page
    • Copy the provided script tag
    • Paste it into your website's HTML

For Developers

  1. API Integration: Use the RESTful APIs for custom integrations
  2. Customization: Modify components in /src/components/
  3. Styling: Update Tailwind classes or add custom CSS

🔧 API Reference

Authentication Endpoints

  • POST /api/auth/login - Initiate OAuth flow
  • POST /api/auth/callback - Handle OAuth callback
  • POST /api/auth/logout - Clear user session

Chat Endpoints

  • POST /api/chat - Process customer messages
    {
      "message": "Customer question",
      "ownerId": "business-owner-id"
    }

Settings Endpoints

  • POST /api/settings - Create/update chatbot settings
  • POST /api/settings/get - Retrieve settings for owner

🔒 Security Features

  • HTTP-only Cookies: Secure session management
  • CORS Configuration: Controlled cross-origin access
  • Input Validation: Comprehensive data validation
  • Authentication Middleware: Route protection
  • Enterprise SSO: ScaleKit integration for secure access

🚀 Deployment

Production Build

npm run build
npm start

📝 License

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


Built with ❤️ by Jagrat Agrawal

About

ServiqAI is an AI-powered platform that enables businesses to build, customize, and deploy intelligent customer support chatbots on their websites. Powered by advanced generative AI and modern web technologies, it provides a dashboard to configure chatbot knowledge and business details, enabling accurate, context-aware customer interactions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors