An interactive AI-powered chatbot for an e-commerce platform, designed to assist users in product discovery and simulate the entire sales journey from search to purchase.
This project demonstrates the development of a full-stack e-commerce chatbot system that enhances the user shopping experience. The chatbot interacts with users via a conversational UI and fetches product data using a Django-powered RESTful API from a mock database.
- Enable intelligent product search and discovery via chatbot interface.
- Provide a responsive, engaging, and session-aware UI for desktop, tablet, and mobile.
- Implement authentication, product filtering, and chat history management.
- Simulate backend server with a mock inventory of 100+ products.
| Layer | Technology |
|---|---|
| Frontend | React.js, HTML5, CSS3 |
| Backend | Django (REST Framework) |
| Authentication | Django Rest Auth / JWT |
| Database | SQLite3 (for mock data) |
| UI Libraries | Tailwind CSS / Material UI |
| State Mgmt | Context API + Local Storage |
| Deployment | (Optional) Vercel + Render |
- Responsive chatbot UI with product card previews.
- Login/Signup flow with session handling.
- Persistent chat sessions (with timestamps).
- Reset conversation, explore products, and auto-scroll UX.
- Dark/Light Mode toggle (optional enhancement).
-
RESTful API endpoints for:
- Authentication (
/api/auth/) - Product search and retrieval (
/api/products/) - Chat logging (
/api/chats/)
- Authentication (
-
Mock e-commerce inventory with 100+ records.
-
Modular structure with serializers, viewsets, and pagination.
ecommerce-chatbot/
├── backend/
│ ├── chatbot_api/
│ ├── products/
│ ├── users/
│ └── db.sqlite3
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ └── App.js
├── README.md
cd backend/
python -m venv env
source env/bin/activate # Windows: env\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py loaddata mock_products.json
python manage.py runservercd frontend/
npm install
npm startGET /api/products/?search=phone– Search for productsPOST /api/auth/login/– Authenticate userPOST /api/chats/– Log chatbot interactionGET /api/chats/?user_id=1– Get previous chats for user
- Django was selected for its scalability, built-in admin interface, and robust API development via Django REST Framework.
- React offers component-driven architecture and flexibility for chatbot UI rendering.
- SQLite3 serves well for mock data and rapid prototyping.
- Modular separation ensures maintainability and fault tolerance.
| Challenge | Solution |
|---|---|
| Real-time session tracking | Used localStorage with React Context API to persist session states. |
| Efficient product filtering | Backend-level filtering with query params and pagination. |
| Chat history management | Logged all interactions in DB via Django models. |
| Responsive design on all devices | Used Tailwind/MUI and tested layout with dev tools. |
- Integrate NLP models for more intelligent search.
- Add payment gateway simulation.
- Integrate real product APIs for live data.
- Deploy backend on Render and frontend on Vercel.
-
Detailed in
/docsfolder (if present). -
Includes:
- System architecture diagram
- API documentation (Swagger/Postman optional)
- Mock data generation scripts