# π€ Full-Stack AI Chatbot App
A production-ready chatbot built with **React + FastAPI + OpenAI + Docker**, complete with feedback collection, admin dashboard, database, CI/CD, and cloud deployment support.
---
## π Tech Stack
- **Frontend**: React (Chat UI)
- **Backend**: FastAPI (API & OpenAI integration)
- **Database**: SQLite via SQLAlchemy
- **Admin Dashboard**: Streamlit (for feedback monitoring)
- **Containerization**: Docker + docker-compose
- **CI/CD**: GitHub Actions
---
## π Quick Start (Local with Docker)
1. **Clone the repo**
```bash
git clone
github.com
cd chatbot-app
```
2. **Create `.env` file**
```bash
cp .env.example .env
```
Edit `.env` to include your `OPENAI_API_KEY`.
3. **Run the app**
```bash
docker-compose up --build
```
- Frontend:
localhost
- Backend:
localhost
---
## π Admin Dashboard (Streamlit)
```bash
streamlit run dashboard.py
```
---
## β
Test Endpoints
```bash
pytest test_main.py
```
---
## π³ DockerHub Setup
1. Create an account on DockerHub
2. Create a public or private repository for `chatbot-backend` and `chatbot-frontend`
3. Add your DockerHub credentials to GitHub Actions secrets:
- `DOCKER_USERNAME`
- `DOCKER_PASSWORD`
---
## π Deploy on Render (Recommended)
.render.yaml β Infrastructure as Code for Render Deployment
services:
type: web name: chatbot-backend env: python buildCommand: "pip install -r requirements.txt" startCommand: "uvicorn app.main:app --host 0.0.0.0 --port 10000" envVars:
key: OPENAI_API_KEY sync: false
key: FRONTEND_ORIGIN value:
chatbot-frontend.onrender.c⦠plan: free autoDeploy: true
type: static name: chatbot-frontend buildCommand: "npm install && npm run build" staticPublishPath: build env: node plan: free autoDeploy: true
## π Project Structure
```
.
βββ backend
β βββ main.py
β βββ db.py
β βββ models.py
β βββ test_main.py
βββ frontend
β βββ ChatBotPanel.jsx
β βββ Dockerfile
β βββ ...
βββ dash β¦