This project is a full-stack AI chatbot application built with FastAPI and React that integrates with the CallMissed API. It provides three core capabilities:
- AI Chat
- Vision (Image + Question)
- Image Generation
The application also includes user authentication using Clerk and conversation persistence using Supabase (PostgreSQL).
- AI Chat using kimi-k2.5
- Streaming responses using Server-Sent Events (SSE)
- Vision support (image + question)
- Image generation using flux-2-klein-9b
- Clerk authentication
- JWT protected backend APIs
- Conversation history stored in Supabase
- Modular FastAPI backend
- React
- Clerk Authentication
- FastAPI
- OpenAI Python SDK
- Supabase (PostgreSQL)
kimi-k2.5
flux-2-klein-9b
Both models are accessed through the CallMissed API.
.
├── Backend
│ ├── db
│ │ ├── database.py
│ │ └── models.py
| |
| ├── routes
│ │ ├── chats.py
| | ├── text.py
│ │ ├── image.py
│ │ └── vision.py
│ │
│ ├── services
│ │ └── callmissed.py
│ │
| ├── auth.py
│ ├── main.py
│ └── .env
│
├── frontend
│ ├── src
│ | ├── components
| | ├── ChatApp.jsx
| ├── ChatWindow.jsx
| | └── Sidebar.jsx
│ ├── main.jsx
│ └── App.jsx
│
└── README.md
git clone https://github.com/Fluffy-debuger/Chatbot.git
cd ChatbotCreate a virtual environment
python -m venv .venvActivate
Windows
.venv\Scripts\activateLinux / macOS
source .venv/bin/activateInstall dependencies
pip install -r requirements.txtCreate a .env
CALLMISSED_API_KEY=cm_XXXXXXXX
CALLMISSED_BASE_URL=https://api.callmissed.com/v1
DATABASE_URL=<postgres connection string>
CLERK_JWKS_URL=https://XXXXXXXX/jwks.json
FRONTEND_URL=http://localhost:5173
Run backend
uvicorn main:app --reloadInstall packages
npm installCreate
.env
VITE_BACKEND_URL=http://localhost:8000
VITE_CLERK_PUBLISHABLE_KEY=pk_xxxxxxxxxxxxx
Run
npm run devPOST /api/text
Request
{
"prompt":"Explain Gradient Boosting"
}Response
Streaming text (Server Sent Events)
POST /api/vision
Content-Type
multipart/form-data
Parameters
| Field | Type |
|---|---|
| image | File |
| question | String |
This project uses the CallMissed API.
Documentation:
Create a free API key from the dashboard and place it inside the backend .env file.
The backend handles:
- Missing request fields
- Invalid image uploads
- Invalid request formats
- CallMissed API failures
- HTTP 429 (quota exceeded)
- Authentication failures
To keep the project focused on the assignment requirements:
- FastAPI was used for the backend.
- React was used for the frontend.
- Clerk was used for authentication.
- Supabase was used for conversation persistence.
- Docker and automated tests were not implemented due to time constraints.
- Request rate limiting
- Conversation search
- Conversation export
- Better markdown rendering
- Image upload progress
AI tools were used for:
- Understanding the CallMissed API documentation
- Reviewing FastAPI implementation
- Debugging integration issues
- Improving documentation
All implementation, testing, debugging, integration, and project structure were completed manually.



