Skip to content

MaheshR03/amelie-customer-service-chatbot

Repository files navigation

AmΓ©lie Customer Service Chatbot

An AI-powered customer service chatbot for the AmΓ©lie fashion e-commerce platform. This application provides intelligent customer support, product management, and comprehensive analytics through a modern web interface.

🌐 Live Demo

πŸ”— View Live Application

Access the live deployed version of AmΓ©lie's customer service chatbot platform. The application is hosted on Firebase Hosting with full functionality including:

  • Smart AI chatbot with fallback system
  • Complete product catalog and shopping experience
  • Admin panel with real-time analytics
  • Secure authentication and user management

πŸ“Έ Screenshots

Customer Interface

Homepage Homepage with product showcase and navigation

Women's Collection Women's fashion collection with integrated chatbot

Chatbot Interface AI-powered chatbot providing customer support

Admin Dashboard

Admin Panel Comprehensive admin dashboard with analytics

Chat Analytics Real-time chat history and customer interaction analytics

Product Management Product CRUD operations and inventory management

Features

  • πŸ€– Smart AI Chatbot: Dual-mode system with Ollama AI and intelligent fallback responses
  • πŸ”₯ Firebase Integration: Real-time database, hosting, and secure authentication
  • πŸ‘— Complete E-commerce: Fashion store with product catalog, cart, and checkout
  • πŸ“Š Admin Dashboard: Comprehensive business management and analytics tools
  • πŸ›’ Shopping Experience: Full e-commerce functionality with user authentication
  • πŸ“± Responsive Design: Mobile-first, cross-device compatibility
  • πŸ” Secure Access: Role-based authentication with admin panel protection
  • πŸ“ˆ Real-time Analytics: Customer interaction tracking and business insights
  • 🎯 Intelligent Fallback: Chatbot continues working even when AI server is unavailable
  • πŸš€ Production Ready: Deployed on Firebase Hosting with optimized performance

Quick Start

Prerequisites

  • Node.js (v14 or higher)
  • Firebase account and project
  • Ollama (for AI chatbot functionality)

Installation

  1. Clone the repository

    git clone https://github.com/MaheshR03/amelie-customer-service-chatbot.git
    cd amelie-customer-service-chatbot
  2. Install dependencies

    npm install
  3. Firebase Setup

    • Create a Firebase project at Firebase Console
    • Enable Realtime Database
    • Get your Firebase configuration
    • Update the Firebase config in HTML files
  4. Ollama Setup (Optional - Fallback system works without it)

    # Install Ollama from https://ollama.ai/
    ollama pull llama2
    ollama serve
  5. Start the development server

    npm start
  6. Build and Deploy

    npm run build
    npm run deploy:hosting

The application will be available at http://localhost:8080 for development.

πŸ› οΈ Technology Stack

Frontend

  • HTML5/CSS3: Modern semantic markup and styling
  • JavaScript (ES6+): Client-side interactivity and API integration
  • Bootstrap: Responsive UI framework
  • Firebase SDK: Real-time database and authentication

Backend & Services

  • Firebase Realtime Database: NoSQL database for real-time data
  • Firebase Hosting: Static web hosting with CDN
  • Ollama: Local AI model hosting (optional)
  • Node.js: Development tooling and build processes

AI & Intelligence

  • Llama2 Model: Self-hosted language model via Ollama
  • Pattern Matching: Intelligent fallback chatbot system
  • Context Awareness: Conversation state management

Development Tools

  • NPM: Package management and build scripts
  • ESLint: Code quality and style checking
  • Git: Version control and collaboration

πŸ“‹ Configuration

Firebase Configuration

The application uses Firebase for backend services. Update the Firebase configuration in your HTML files:

var firebaseConfig = {
    apiKey: "your-api-key",
    authDomain: "your-project.firebaseapp.com",
    databaseURL: "https://your-project-default-rtdb.region.firebasedatabase.app",
    projectId: "your-project-id",
    storageBucket: "your-project.firebasestorage.app",
    messagingSenderId: "your-sender-id",
    appId: "your-app-id",
    measurementId: "your-measurement-id"
};

Database Security Rules

Configure Firebase Realtime Database rules for secure access:

{
  "rules": {
    ".read": false,
    ".write": false,
    
    "products": {
      ".read": true,
      ".write": "auth != null",
      "$productId": {
        ".validate": "newData.hasChildren(['name', 'price', 'category', 'description']) && newData.child('name').isString() && newData.child('price').isNumber() && newData.child('category').isString() && newData.child('description').isString()"
      }
    },
    
    "messages": {
      ".read": true,
      ".write": true,
      "$messageId": {
        ".validate": "newData.hasChildren(['timestamp', 'message', 'sender']) && newData.child('timestamp').isNumber() && newData.child('message').isString() && newData.child('sender').isString()"
      }
    },
    
    "chats": {
      ".read": "auth != null",
      ".write": "auth != null",
      "$chatId": {
        ".validate": "newData.hasChildren(['timestamp', 'message', 'sender']) && newData.child('timestamp').isNumber() && newData.child('message').isString() && newData.child('sender').isString()"
      }
    },
    
    "analytics": {
      ".read": "auth != null",
      ".write": "auth != null",
      "visits": {
        "$visitId": {
          ".validate": "newData.hasChildren(['timestamp', 'page']) && newData.child('timestamp').isNumber() && newData.child('page').isString()"
        }
      },
      "interactions": {
        "$interactionId": {
          ".validate": "newData.hasChildren(['timestamp', 'type', 'data']) && newData.child('timestamp').isNumber() && newData.child('type').isString()"
        }
      }
    },
    
    "contacts": {
      ".read": "auth != null",
      ".write": true,
      "$contactId": {
        ".validate": "newData.hasChildren(['name', 'email', 'message', 'timestamp']) && newData.child('name').isString() && newData.child('email').isString() && newData.child('message').isString() && newData.child('timestamp').isNumber()"
      }
    },
    
    "admin": {
      ".read": "auth != null",
      ".write": "auth != null"
    }
  }
}

Admin Access

Default admin credentials for testing:

Note: In production, implement proper admin authentication with secure credentials.

πŸš€ Development

Available Scripts

  • npm start: Start the development server (Port 8080)
  • npm run admin: Start admin panel server (Port 8081)
  • npm run build: Build for production
  • npm run deploy:hosting: Deploy to Firebase Hosting
  • npm run lint: Run code quality checks
  • npm run format: Format code with Prettier

Project Structure

customer-service-chatbot/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css           # Main stylesheet
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── main.js             # Core JavaScript
β”‚   β”œβ”€β”€ img/                    # Images and icons
β”‚   └── vendor/                 # Third-party libraries
β”œβ”€β”€ screenshots/                # Application screenshots
β”œβ”€β”€ admin.html                  # Admin dashboard
β”œβ”€β”€ index.html                  # Homepage (Men's section)
β”œβ”€β”€ Women.html                  # Women's collection
β”œβ”€β”€ Kids.html                   # Kids' collection
β”œβ”€β”€ contact.html                # Contact page
β”œβ”€β”€ package.json                # NPM configuration
β”œβ”€β”€ firebase.json               # Firebase hosting config
β”œβ”€β”€ database.rules.json         # Database security rules
β”œβ”€β”€ .gitignore                  # Git ignore rules
└── README.md                   # Project documentation

✨ Key Features

πŸ›οΈ Customer Experience

  • Product Catalog: Comprehensive fashion collections for Men, Women, and Kids
  • Smart Shopping Cart: Add/remove items with size and color selection
  • Intelligent Chatbot: AI-powered support with natural language processing
  • Voice Input: Speech-to-text functionality for hands-free interaction
  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • User Authentication: Secure login/signup with role-based access

πŸ€– AI Chatbot System

  • Dual-Mode Operation: Primary AI (Ollama) with intelligent fallback system
  • Context Awareness: Maintains conversation history and product context
  • Pattern Recognition: Smart responses for greetings, product inquiries, and support
  • Category Intelligence: Specialized responses for different product categories
  • Graceful Degradation: Continues working even when AI server is unavailable
  • Real-time Responses: Instant feedback and streaming AI responses

πŸ‘¨β€πŸ’Ό Admin Dashboard

  • Chat Analytics: Real-time customer interaction monitoring
  • Product Management: Full CRUD operations for inventory management
  • User Analytics: Customer behavior tracking and insights
  • Sales Metrics: Revenue tracking and performance analytics
  • Security Features: Protected admin access with authentication
  • Real-time Updates: Live synchronization with customer interactions

πŸ”’ Security & Performance

  • Firebase Security Rules: Granular access control for data protection
  • Authentication System: Secure user management with JWT tokens
  • Rate Limiting: Protection against abuse and spam
  • Input Validation: Comprehensive data sanitization
  • HTTPS Enforcement: Secure communication protocols
  • Performance Optimization: Minified assets and CDN delivery

πŸš€ Deployment

Production Deployment

The application is deployed on Firebase Hosting with the following setup:

# Build for production
npm run build

# Deploy to Firebase Hosting
npm run deploy:hosting

Live URL: https://customer-service-chatbot-246d6.web.app/

Deployment Features

  • Firebase Hosting: Global CDN with automatic SSL
  • Performance Optimization: Gzipped assets and caching headers
  • Custom Domain Support: Easy domain configuration
  • Automatic Builds: CI/CD integration capabilities
  • Rollback Support: Easy version management and rollbacks

Production Configuration

  1. Database Rules: Configured for production security
  2. Authentication: Admin access with secure credentials
  3. Performance: Optimized asset delivery and caching
  4. Monitoring: Firebase Analytics integration
  5. Error Handling: Comprehensive error tracking and fallback systems

Alternative Hosting Options

  • Netlify: Static site hosting with continuous deployment
  • Vercel: Serverless deployment with edge optimization
  • GitHub Pages: Free hosting for static sites
  • Traditional Hosting: Any provider supporting static file hosting

πŸ” Security

Implementation

  • Firebase Security Rules: Granular database access control
  • User Authentication: Secure login with role-based permissions
  • Input Validation: Comprehensive data sanitization and validation
  • Rate Limiting: Protection against API abuse and spam
  • HTTPS Enforcement: Secure communication protocols
  • Admin Protection: Secure admin panel with authentication

Best Practices

  • Sensitive configuration stored securely in Firebase
  • No credentials committed to version control
  • Regular security updates and dependency monitoring
  • Proper error handling without information leakage
  • Secure session management and token handling

πŸ“Š Analytics & Monitoring

Built-in Analytics

  • Customer Interactions: Real-time chat analytics and engagement metrics
  • Product Performance: Track popular items and conversion rates
  • User Behavior: Navigation patterns and feature usage
  • System Performance: Response times and error rates

Monitoring Tools

  • Firebase Analytics: Integrated user behavior tracking
  • Error Tracking: Comprehensive error logging and reporting
  • Performance Monitoring: Load times and system health
  • Real-time Dashboards: Live admin analytics and insights

🀝 Contributing

We welcome contributions to improve the AmΓ©lie Customer Service Chatbot! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/your-feature-name
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Development Guidelines

  • Follow existing code style and conventions
  • Write clear commit messages
  • Include tests for new features
  • Update documentation as needed
  • Ensure responsive design compatibility

Areas for Contribution

  • πŸ€– AI chatbot improvements and new features
  • 🎨 UI/UX enhancements and accessibility
  • πŸ”’ Security improvements and best practices
  • πŸ“± Mobile experience optimization
  • πŸ“Š Analytics and reporting features
  • 🌐 Internationalization and localization

πŸ“ž Support & Contact

Getting Help

  • Issues: Create an issue on GitHub for bugs or feature requests
  • Documentation: Check this README and inline code comments
  • Community: Join discussions in GitHub Discussions
  • Email: Contact the development team for urgent matters

Reporting Issues

When reporting issues, please include:

  • Detailed description of the problem
  • Steps to reproduce the issue
  • Browser and device information
  • Screenshots or error messages (if applicable)

πŸ“„ License

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

Third-Party Licenses

  • Bootstrap: MIT License
  • Firebase: Firebase Terms of Service
  • Ollama: Apache License 2.0
  • Various other dependencies as listed in package.json

πŸ“ˆ Changelog

Version 2.0.0 (Current - July 2025)

  • βœ… Smart Fallback System: Intelligent chatbot responses when AI is unavailable
  • βœ… Firebase Hosting: Production deployment with global CDN
  • βœ… Enhanced Security: Improved database rules and admin authentication
  • βœ… Performance Optimization: Minified assets and caching headers
  • βœ… Responsive Design: Mobile-first UI improvements
  • βœ… Voice Input: Speech-to-text functionality for chatbot
  • βœ… Real-time Analytics: Enhanced admin dashboard with live metrics
  • βœ… Product Management: Full CRUD operations with image upload
  • βœ… Error Handling: Comprehensive error management and recovery

Version 1.0.0 (Initial Release)

  • πŸš€ Initial release with core functionality
  • πŸ€– Basic AI chatbot with Ollama integration
  • πŸ”₯ Firebase Realtime Database integration
  • πŸ‘— E-commerce product catalog
  • πŸ“Š Admin dashboard with basic analytics
  • πŸ” User authentication system
  • πŸ“± Responsive web design

Upcoming Features (Roadmap)

  • πŸ›’ Enhanced shopping cart with persistent storage
  • πŸ’³ Payment gateway integration
  • πŸ“§ Email notifications and order confirmations
  • πŸ” Advanced search and filtering
  • 🌐 Multi-language support
  • πŸ“± Mobile app development
  • πŸ€– Advanced AI features and personalization

πŸ‘₯ Team Information

Team HAL04

Innovating AI-Driven Bots for Tailored Customer Service and Effective Sales Engagement

Core Technologies

  • AI/ML: Self-hosted Llama2 LLM via Ollama
  • Backend: Firebase Realtime Database & Hosting
  • Frontend: HTML5, CSS3, JavaScript (ES6+)
  • Framework: Bootstrap for responsive design
  • Development: Node.js tooling and NPM scripts

Project Vision

We leverage the power of advanced language models to create effective sales and customer service experiences. Our dual-mode chatbot system ensures reliable service even when AI servers are unavailable, making it production-ready for real business environments.

Key Achievements

  • πŸ† Successfully deployed production-ready e-commerce platform
  • πŸ€– Implemented intelligent AI chatbot with graceful fallback
  • πŸ“Š Built comprehensive admin analytics dashboard
  • πŸ”’ Established secure authentication and authorization
  • πŸš€ Achieved optimal performance with Firebase hosting
  • πŸ“± Created responsive, mobile-first user experience

🌟 Ready to revolutionize your customer service with AI? Try the live demo now!

About

AI-powered bot for tailored customer service and effective sales engagement

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published