WebStore is a full-stack e-commerce platform featuring an advanced AI-powered customer service chatbot. The system combines modern web technologies with artificial intelligence to provide intelligent customer support, product recommendations, order tracking, and business analytics.
- ποΈ Product Catalog - Browse and search products with filters
- π Shopping Cart - Add, update, and manage cart items
- π³ Checkout System - Secure payment processing
- π¦ Order Tracking - Real-time shipping status updates
- π¬ AI Chatbot - Intelligent customer support with voice input π€
- π€ User Authentication - Secure login and registration
- β€οΈ Wishlist - Save favorite products
- π§ Newsletter - Subscribe to updates and promotions
- π Dashboard - Real-time business analytics
- π¦ Inventory Management - Track stock levels
- ποΈ Order Management - View and process orders
- π₯ Customer Management - View customer data
- π¬ Admin Chatbot - Business intelligence assistant with voice queries π€
- π° Discount Management - Create and manage promotions
- π¨ Messages - Customer inquiries and support
- π€ Natural Language Processing - Powered by Google Gemini AI
- π€ Voice Input - Web Speech API for voice-to-text queries
- π Semantic Search - ChromaDB vector database for knowledge retrieval
- π¦ Order Tracking - Real-time shipping status with tracking numbers
- ποΈ Product Recommendations - AI-driven product suggestions
- π Business Analytics - Admin insights and reporting
- πΎ Chat History - Persistent conversation storage in MySQL
- π Analytics Dashboard - Track chatbot performance
- πΌοΈ Image Search - Visual product matching (BLIP AI)
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher) - Download
- Python (v3.8 or higher) - Download
- MySQL (v8.0 or higher) - Download
- Git - Download
git clone https://github.com/your-username/webstore.git
cd webstore-
Install MySQL and start the MySQL server
-
Import the complete database schema:
mysql -u root -p < database_setup.sqlOr manually:
mysql -u root -p
source database_setup.sqlThis will create:
- The
eshopdatabase - All required tables (products, orders, customers, chat, etc.)
- Foreign key relationships
- Indexes for performance
- Install dependencies:
npm install- Configure environment variables:
cp .env.example .env- Edit
.envfile:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_database_password
DB_NAME=eshop
DB_PORT=3306
PORT=3000- Start the Node.js server:
node app.jsThe server will run on http://localhost:3000
- Navigate to chatbot backend:
cd chatbot_backend- Create virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install Python dependencies:
pip install -r requirements.txt- Configure environment variables:
cp .env.example .env- Edit
chatbot_backend/.envfile:
# Get your API key from: https://aistudio.google.com/apikey
GEMINI_API_KEY=your_gemini_api_key_here
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_database_password
DB_NAME=eshop
DB_PORT=3306
FLASK_PORT=5000
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000- Start the chatbot server:
python app.pyThe chatbot server will run on http://localhost:5000
- Visit Google AI Studio
- Create a new API key
- Add it to
chatbot_backend/.envasGEMINI_API_KEY
- Update database credentials in both
.envfiles - Ensure MySQL server is running
- Grant proper permissions to the database user
webstore/
βββ public/ # Frontend files
β βββ index.html # Homepage
β βββ shop.html # Product listing
β βββ cart.html # Shopping cart
β βββ checkout.html # Checkout page
β βββ track-order.html # Order tracking
β βββ admin_panel/ # Admin interface
β βββ img/ # Images and assets
β βββ style.css # Main stylesheet
β βββ customer-chatbot.js # Customer chatbot UI
β βββ admin-chatbot.js # Admin chatbot UI
β
βββ routes/ # Express.js routes
β βββ index.js # Main routes
β βββ products.js # Product APIs
β βββ checkout.js # Checkout APIs
β βββ login.js # Authentication
β βββ userReg.js # User registration
β βββ ...
β
βββ middleware/ # Express middleware
β βββ adminVerify.js # Admin authentication
β
βββ chatbot_backend/ # Python chatbot server
β βββ app.py # Main Flask application
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment template
β βββ create_chat_history_table.sql
β
βββ app.js # Node.js server entry point
βββ db.js # Database connection
βββ package.json # Node.js dependencies
βββ .env.example # Environment template
βββ .gitignore # Git ignore rules
βββ README.md # This file
βββ VOICE_FEATURE.md # Voice chatbot documentation
- Start MySQL database
- Start Node.js backend:
node app.js(Port 3000) - Start Python chatbot:
python chatbot_backend/app.py(Port 5000) - Open browser: Navigate to
http://localhost:3000
- Browse products at
/shop.html - Add items to cart at
/cart.html - Track orders at
/track-order.html - Chat with AI assistant (chat icon on every page)
- Access admin panel at
/admin.html - Login with admin credentials
- View analytics, manage inventory, process orders
- Use admin chatbot for business insights
- Never commit
.envfiles to Git - Never commit API keys or passwords
- Change default database passwords
- Use environment variables for all secrets
- Enable HTTPS in production
- Implement rate limiting
- Validate all user inputs
- Use prepared statements for SQL queries
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Muhammad Asad - Initial work
- Google Gemini AI for natural language processing
- ChromaDB for vector database
- Flask and Express.js frameworks
- MySQL database
- Tech2 etc(Youtube Channel) for Initial Store Views
- EGATOR(Youtube Channel) For Admin Panel Idea
For support, email [email protected] or open an issue in the GitHub repository.
- v1.0.0 (November 2025)
- Initial release
- AI chatbot with Gemini integration
- Chat history database
- Admin and customer interfaces
- Order tracking system
- Product catalog and shopping cart
- Add payment gateway integration
- Implement email notifications
- Add mobile app support
- Enhance image search capabilities
- Multi-language support
- Advanced analytics dashboard
- Social media integration
Built with β€οΈ using Node.js, Python, MySQL, and AI