{"id":31048992,"url":"https://github.com/45beepy/think41l2","last_synced_at":"2026-04-28T12:06:18.506Z","repository":{"id":306553295,"uuid":"1026550583","full_name":"45beepy/think41l2","owner":"45beepy","description":"AI Chat Agent assignment for Think41. Could'nt demo the Dockerization with in the timeframe as i was encountering build errors. So i have attached a Youtube video demo as proof of submission.","archived":false,"fork":false,"pushed_at":"2025-07-30T16:25:43.000Z","size":23617,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-28T12:05:56.212Z","etag":null,"topics":["docker","docker-image","mysql","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/45beepy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-26T05:40:56.000Z","updated_at":"2025-07-30T16:25:47.000Z","dependencies_parsed_at":"2025-07-26T12:38:58.592Z","dependency_job_id":null,"html_url":"https://github.com/45beepy/think41l2","commit_stats":null,"previous_names":["45beepy/think41l2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/45beepy/think41l2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45beepy%2Fthink41l2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45beepy%2Fthink41l2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45beepy%2Fthink41l2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45beepy%2Fthink41l2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/45beepy","download_url":"https://codeload.github.com/45beepy/think41l2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45beepy%2Fthink41l2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32379679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","mysql","python"],"created_at":"2025-09-14T21:25:53.338Z","updated_at":"2026-04-28T12:06:18.501Z","avatar_url":"https://github.com/45beepy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Conversational Agent\n# Demo Video [2 Min]\n(https://youtu.be/z_BXsDOP-h0)\n\u003cimg width=\"1378\" height=\"870\" alt=\"thumbnail\" src=\"https://github.com/user-attachments/assets/74c7884f-1781-4c9e-ba39-acfdec1db3b2\" /\u003e\n\nClick the image above to watch a demo of the AI Conversational Agent.\n\n\n\n\n## Project Overview\n\nThis project implements a full-stack AI conversational agent designed to assist users with e-commerce queries, specifically focusing on product information and order status. The solution is built with a Python FastAPI backend, a React frontend, and a MySQL database, all orchestrated using Docker Compose for easy setup and deployment. The backend integrates with the Groq API for large language model (LLM) capabilities, enabling intelligent and contextual responses. However i **couldn't complete the last milestone that is creating Docker-compose.yaml**. But i have **completed previous 9 milestones** and i have attached a video as a proof of completion. \n\n## Features\n\n### Backend (FastAPI)\n\n\n* **API Endpoints**: Provides RESTful APIs for chat interactions, user management, and retrieving conversation history.\n* \u003cimg width=\"1610\" height=\"913\" alt=\"conversation_id\" src=\"https://github.com/user-attachments/assets/0f29aed8-eb26-4abd-8ecf-79ea72d29078\" /\u003e\n* **LLM Integration**: Seamlessly integrates with Groq's LLM to generate intelligent responses.\n* **Intent Recognition \u0026 Entity Extraction**: Uses the LLM to identify user intent (e.g., product search, order status) and extract relevant entities (e.g., product names, order IDs).\n* **Database Querying**: Dynamically queries an e-commerce MySQL database to retrieve product details and order information based on user requests.\n* **Conversation Persistence**: Stores complete conversation histories (user messages and AI responses) in the MySQL database, linked to specific users and sessions.\n* **Database Management**: Connects to and interacts with a MySQL database using SQLAlchemy ORM.\n\n### Frontend (React)\n* **Intuitive Chat Interface**: A clean and user-friendly chat UI for seamless interaction.\n* **Real-time Communication**: Communicates with the FastAPI backend using `fetch` API to send messages and receive AI responses.\n* **Conversation History Panel**: Displays a sidebar with a list of past chat sessions, allowing users to select and resume conversations.\n* **Enhanced User Experience**: Includes features like loading indicators for AI responses, automatic scroll-to-bottom for new messages, and clearing the input field after sending.\n\n### Dockerization\n\n\u003cimg width=\"996\" height=\"535\" alt=\"docker_containers\" src=\"https://github.com/user-attachments/assets/31f12aaf-ee5b-48d7-8134-8e2f1405382c\" /\u003e\n* **Containerized Services**: Backend, Frontend, and MySQL database are all containerized using Docker.\n* **Docker Compose Orchestration**: `docker-compose.yml` simplifies the build, run, and networking of all services.\n* **Portability**: Enables consistent deployment across various environments.\n\n## Technologies Used\n\n* **Backend**:\n    * Python 3.10\n    * FastAPI\n    * SQLAlchemy (ORM)\n    * `mysql-connector-python`\n    * Groq API (for LLM)\n    * `python-dotenv`\n* **Frontend**:\n    * React.js (created with Create React App)\n    * HTML, CSS (for styling)\n    * JavaScript (`fetch` API for HTTP requests)\n    * Nginx (serving static files in Docker)\n* **Database**:\n    * MySQL 5.7 (running in Docker container)\n* **Containerization**:\n    * Docker\n    * Docker Compose\n\n## Setup Instructions\n\nFollow these steps to get the application running on your local machine.\n\n### Prerequisites\n\n* **Docker Desktop**: Ensure Docker Desktop is installed and running on your system (Windows, macOS). This includes Docker Engine and Docker Compose.\n* **Git**: For cloning the repository.\n* **MySQL Workbench (Optional but Recommended)**: For direct interaction with your MySQL database running in Docker.\n\n### Clone the Repository\n\nFirst, clone the project repository to your local machine:\n\n```bash\ngit clone [https://github.com/45beepy/think41l2.git]\ncd think41l2\n```\n\n\n## Deployment Guide\n\nThis section outlines the general steps and considerations for deploying your Dockerized AI Conversational Agent to a cloud environment. The approach will vary slightly depending on your chosen cloud provider (e.g., AWS, Google Cloud, Azure, Heroku, Render, DigitalOcean).\n\nThe core idea is to:\n\n1. Push your Docker images to a container registry.\n\n2. Provision the necessary cloud services.\n\n3. Configure network and environment variables for inter-service communication and external access.\n\n### High-Level Deployment Steps\n\n1.  **Build Production-Ready Docker Images Locally:**\n    Ensure your images (`ai-backend`, `ai-frontend`) are built for production. For the frontend, `npm run build` within the Dockerfile already creates optimized static assets.\n\n    ```bash\n    # From your project root (think41l2/)\n    docker compose build # This builds both backend and frontend images\n    ```\n\n2.  **Authenticate to a Container Registry:**\n    You'll need a Docker Hub account or an account with a cloud provider's container registry (e.g., AWS ECR, Google Container Registry, Azure Container Registry).\n\n    ```bash\n    docker login # For Docker Hub\n    # or login command specific to your cloud provider's registry\n    ```\n\n3.  **Tag and Push Docker Images to Registry:**\n    Tag your local images with the registry's name and push them.\n\n    ```bash\n    # For backend\n    docker tag ai-backend your_registry_username/ai-backend:latest # Replace your_registry_username\n    docker push your_registry_username/ai-backend:latest\n\n    # For frontend\n    docker tag ai-frontend your_registry_username/ai-frontend:latest # Replace your_registry_username\n    docker push your_registry_username/ai-frontend:latest\n    ```\n\n\n* Push images to your container registry.\n\n* Update and deploy your services to the cloud environment.\n\nThis provides a high-level overview. Each cloud provider has specific guides and services that map to these steps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F45beepy%2Fthink41l2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F45beepy%2Fthink41l2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F45beepy%2Fthink41l2/lists"}