Scaffold a full-stack AI chatbot project with FastAPI + React
Project description
create-ai-chatbot
Scaffold a full-stack AI chatbot project in seconds. Stop rebuilding the same chatbot architecture — start customizing.
# Via PyPI
pip install create-ai-chatbot
create-ai-chatbot my-chatbot
# Via npm
npx create-ai-chatbot my-chatbot
What you get
A production-ready chatbot with:
- Backend: FastAPI with streaming SSE endpoint (
/chat) - Frontend: Vite + React with a floating chat widget
- LLM: OpenRouter (supports 100+ models, free tier available)
- Deploy: Ready for Render (backend) + Vercel (frontend)
Interactive setup
$ create-ai-chatbot
==================================================
create-ai-chatbot
Full-stack AI chatbot scaffolding tool
==================================================
project_name [my-ai-chatbot]:
project_slug [my-ai-chatbot]:
description [AI Chatbot powered by OpenRouter]:
backend [fastapi]:
frontend [vite-react]:
llm_provider [openrouter]:
theme [dark-minimal]:
Quick start after scaffolding
cd my-chatbot
# Terminal 1 — Backend
cd backend
cp .env.example .env
# Edit .env: add your OPENROUTER_API_KEY (free at https://openrouter.ai/keys)
pip install -r requirements.txt
python -m uvicorn main:app --reload
# Terminal 2 — Frontend
cd frontend
npm install
npm run dev
Open http://localhost:3000 — click the chat button in the bottom-right.
Deploy
Backend → Render
- Push to GitHub
- Create new Web Service on Render
- Build:
cd backend && pip install -r requirements.txt - Start:
cd backend && python -m uvicorn main:app --host 0.0.0.0 --port $PORT - Add env var:
OPENROUTER_API_KEY
Frontend → Vercel
- Import repo on Vercel
- Set root directory to
frontend - Add env var:
VITE_API_URL= your Render backend URL
Customization
Change the system prompt
Edit backend/data/system_prompt.py:
SYSTEM_PROMPT = """You are a real estate assistant for Acme Properties.
Help users find apartments, schedule viewings, and answer questions."""
Change the model
Edit backend/.env:
OPENROUTER_MODEL=anthropic/claude-3.5-sonnet
Or any model from https://openrouter.ai/models.
Add tools
Edit backend/main.py to add function-calling tools. The streaming SSE format supports tool calls via OpenRouter's OpenAI-compatible API.
Change the theme
Edit frontend/tailwind.config.js to customize colors, fonts, and styling.
Project structure
my-chatbot/
├── backend/
│ ├── main.py # FastAPI app with /chat and /health
│ ├── config.py # Settings via pydantic-settings
│ ├── schemas.py # Pydantic request/response models
│ ├── services/
│ │ └── llm.py # LLM service with streaming
│ ├── data/
│ │ └── system_prompt.py # Your system prompt
│ ├── requirements.txt
│ ├── .env.example
│ └── render.yaml # Render deployment config
├── frontend/
│ ├── src/
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── index.css
│ │ └── components/
│ │ └── Chat.tsx # Floating chat widget
│ ├── index.html
│ ├── package.json
│ ├── vite.config.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── tsconfig.node.json
├── .gitignore
└── README.md
Supported configurations
| Option | Choices |
|---|---|
| Backend | fastapi |
| Frontend | vite-react |
| LLM Provider | openrouter (default), openai |
| Theme | dark-minimal (default) |
Why this exists
I built the same chatbot architecture three times — for a real estate company, a hackathon, and a client project. Every time: FastAPI backend, React frontend, OpenRouter for LLM, streaming SSE, floating chat widget. The only thing that changed was the system prompt and the tools.
So I packaged it. Now you can go from zero to a deployed AI chatbot in under 5 minutes.
Contributing
PRs welcome! Areas we'd love help with:
- Next.js App Router template option
- Anthropic Claude direct integration
- Pre-built tool templates (RAG, web search, database)
- Additional themes
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file create_ai_chatbot-0.1.0.tar.gz.
File metadata
- Download URL: create_ai_chatbot-0.1.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d027484c5085b0278dfbc911c187ed8263f561671eb9e6e53a57f6669af73ae2
|
|
| MD5 |
b21df1f407f86d294f09d2eb43c9dc7c
|
|
| BLAKE2b-256 |
6ee31a19eea47dbc67ddb4dc9483acee0b92975456dc4193ce72215bc7fa7453
|
File details
Details for the file create_ai_chatbot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: create_ai_chatbot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c2e284510fbd346626e7d2e1f2da186837b39e6aff83d5aa99803fded0da09f
|
|
| MD5 |
99fae7ef93ed9263e6f661045504df29
|
|
| BLAKE2b-256 |
c271653a35c85bad031dfa5ca3cbd8df3cc8036e984bb8d3c3ec18e5cde0ba3e
|