Real-time AI-powered customer support and automated agent escalation for global footwear retail.
| 🏆 | Industrial Grade — Phase 1 Project Built as a high-performance demonstration of AI-integrated eCommerce and automated customer support orchestration. |
Live Demo • Documentation • Report a Bug • Request a Feature
- Introduction
- Key Features
- Technology Stack
- System Architecture
- Directory Structure
- Installation and Configuration
- API Specification
- License
Zen Store is an industrial-grade eCommerce solution engineered for high-availability footwear retail. The platform bridges the gap between static product browsing and dynamic customer support by utilizing a custom-trained Sentence-Transformer model for real-time semantic inquiry resolution.
- Semantic Vector Matching: Leverages
all-MiniLM-L6-v2for mapping user queries to a multidimensional knowledge space. - Dynamic Product Awareness: Real-time synchronization with the product catalog (78+ SKUs) allows for accurate pricing and stock-level responses.
- Intent-Based Escalation: Automated frustration detection triggers a transition state from AI-handled to Human-Agent-waiting status.
- State-Driven UI: Real-time UI updates based on chat status (AI Active, Waiting, Live Agent).
- Sub-directory Routing: SEO-friendly routing structure with dedicated modules for Men, Women, and Sports collections.
- Unified Design System: A bespoke CSS framework utilizing CSS variables for consistent glassmorphism and typography across 15+ sub-views.
- Asynchronous Processing: FastAPI-driven service layer ensuring sub-200ms response times for AI inquiries.
- Data Persistence: Normalized SQLite database for logging interactions, session management, and agent replies.
AI-Powered Customer Support Service.
- FAQ Resolution: The system utilizes semantic similarity to resolve customer queries against a pre-defined FAQ dataset.
- Automated Escalation: Implements a "Human-in-the-Loop" protocol. When query confidence falls below a threshold or user frustration is detected, the system transitions to an escalation state.
- Interaction Logging: All user-bot interactions and escalation events are persistently logged in a SQLite database for audit and training purposes.
- Response Latency: The system is optimized for sub-200ms inference times (local) and < 1.5s via remote API, exceeding the < 2s requirement.
- Accuracy Threshold: Semantic vector matching provides an estimated accuracy of > 85% for domain-specific inquiries.
- Frontend: Responsive web interface developed with Vanilla JS and CSS.
- Backend: Python-based FastAPI service layer.
- AI Layer: Utilizes a pre-trained
all-MiniLM-L6-v2Sentence-Transformer model from Hugging Face for intent classification. - Database: SQLite integration for persistent session and interaction storage.
| Component | Technology | Utility |
|---|---|---|
| Frontend | JavaScript (ES6+) | Application logic and state management |
| Styles | CSS3 | Custom Design System (Glassmorphism) |
| API Framework | FastAPI | High-performance asynchronous backend |
| AI Model | Sentence-Transformers | Semantic intent and similarity matching |
| Database | SQLite3 | Session and interaction persistence |
| Server | Uvicorn | ASGI server implementation |
The platform follows a decoupled Frontend-Backend architecture, communicating via a RESTful API.
- Client Layer: Dispatched via standard HTTP. Handles UI rendering and local state.
- Logic Layer: FastAPI service processing NLP tasks and database I/O.
- Data Layer: JSON-based product datasets and SQLite interaction logs.
/ (Project Root)
├── index.html # Primary entry point
├── 404.html # Global error handler
├── assets/ # Centralized resources
│ ├── css/ # Main stylesheet and design tokens
│ ├── js/ # Modular application logic (Auth, Cart, AI)
│ └── images/ # Product and UI assets
├── pages/ # Route-specific modules
│ ├── account/ # Authentication and Profile views
│ ├── admin/ # Management and Verification dashboard
│ └── [category]/ # Product collection views
└── core/ # System-critical infrastructure
├── server/ # FastAPI source and ML models
├── scripts/ # Synchronization and maintenance tools
└── docs/ # Technical specifications
- Python 3.10+
- Node.js (Optional for advanced tooling)
- Git
- Navigate to the infrastructure directory:
cd core/server - Initialize virtual environment and dependencies:
pip install fastapi uvicorn sentence-transformers torch
- Initialize the service:
python main.py
| Endpoint | Method | Description |
|---|---|---|
/ask |
POST | Submits a query to the AI engine for semantic matching |
/status/{session_id} |
GET | Retrieves current chat status (AI/Waiting/Agent) |
/agent-reply |
POST | (Admin) Injects a human agent response into the session |
Project documentation and source code are licensed under the MIT License.
Muhammed Anas GitHub: i-anasop