An AI-powered full-stack coffee shop application featuring a FastAPI backend, RAG-based intelligent chatbot, and a modern React.js frontend.
- 🛒 Product Catalog — Browse and search coffee products with filters
- 🛍️ Cart & Order Management — Add to cart, place and track orders
- 🔐 JWT Authentication — Secure user registration, login, and protected routes
- 🤖 AI Chatbot — RAG-based chatbot with vector embeddings for semantic product search and personalized recommendations
- 📱 Responsive UI — Built with React.js and Tailwind CSS
coffeeAI/
├── chatbot_rag-main/ # Python FastAPI backend + RAG chatbot
│ ├── core/ # RAG logic, embeddings, vector search
│ ├── data/ # Vector store and data files
│ ├── database/ # Database schema and service
│ ├── main.py # FastAPI entry point
│ └── requirements.txt # Python dependencies
├── src/ # React.js frontend
│ ├── components/ # Reusable UI components
│ ├── pages/ # Application pages
│ ├── services/ # API service calls (Axios)
│ └── App.tsx # Main React app
├── public/ # Static assets
├── .gitignore
├── package.json
└── README.md
- Python 3.8+
- Node.js v16+
- Git
git clone https://github.com/kbsubramanyasharma/coffeeAI.git
cd coffeeAIcd chatbot_rag-main
pip install -r requirements.txt
python setup_database.py
python main.pyBackend runs at: http://localhost:8000
API docs available at: http://localhost:8000/docs
cd ..
npm install
npm run devFrontend runs at: http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register |
Register new user |
| POST | /auth/login |
Login and get JWT token |
| GET | /products |
Get all products |
| GET | /products/{id} |
Get product by ID |
| POST | /cart |
Add item to cart |
| GET | /orders |
Get user orders |
| POST | /orders |
Place new order |
| POST | /chat |
Chat with AI chatbot |
- Product data is converted into vector embeddings at setup
- User query is embedded and compared using cosine similarity
- Most relevant products are retrieved from the vector store
- Retrieved context is passed to the AI model to generate a response
- User gets a personalized, context-aware recommendation
| Layer | Technology |
|---|---|
| Backend | Python, FastAPI |
| AI / Chatbot | RAG, Vector Embeddings, Generative AI |
| Database | SQLite (migrating to MySQL) |
| Frontend | React.js, TypeScript, Tailwind CSS, Vite |
| Auth | JWT (JSON Web Tokens) |
| Tools | Git, Postman, VS Code |
Coming soon — will add after deployment
- Migrate database from SQLite to MySQL
- Deploy backend on AWS EC2 with RDS
- Store product images in AWS S3
- Add payment gateway integration
- Write unit tests with pytest
Subrahmanya Sharma K B
- GitHub: @kbsubramanyasharma
- LinkedIn: subrahmanyasharma-kb
- Email: subrahmanyasharmakb@gmail.com
This project is licensed under the MIT License.