🧠 ChatBotForge – Custom AI Chatbots for Businesses
ChatBotForge is a platform that allows businesses to create AI-powered chatbots trained on their own data — including documents, websites, and internal knowledge. Each bot is isolated, customizable, and easily embeddable on any site.
- Create and manage multiple bots
- Upload files (PDF, DOCX, TXT) or crawl web pages
- Fine-tune bot tone, greeting, and settings
- Test bots instantly in a chat playground
- View chat history and analytics (optional)
- Real-time AI chat interface
- Context-aware responses based on business content
- Multi-language support
- Mobile-friendly UI
- Easy embed via iframe, widget, or SDK
- Frontend (React/Vue/Next.js): Dashboard for businesses + embeddable chat widget
- Backend (Golang):
- Auth and User/Bot management
- File ingestion and document parsing
- Embedding and chunking logic
- Vector DB integration
- Prompt building and LLM integration
- Vector Database (e.g., Qdrant, Pinecone):
- Stores embeddings per bot (namespaced)
- LLM Provider (e.g., OpenAI, Claude):
- Generates final response using top-matching vectors
- User submits query to
/api/chat - Backend:
- Fetches bot config by
bot_id - Looks up vector namespace from DB (e.g.,
vec_abc123) - Embeds user message
- Queries vector DB for top-k similar chunks
- Builds prompt with retrieved context
- Calls LLM API and returns response
- Fetches bot config by
| Field | Type | Description |
|---|---|---|
id |
UUID | Primary key |
user_id |
UUID | Bot owner |
name |
VARCHAR | Bot name |
vector_namespace |
VARCHAR | Vector DB namespace |
settings |
JSON | Greeting, tone, etc. |
created_at |
TIMESTAMP | Creation date |
| Field | Type | Description |
|---|---|---|
id |
UUID | File ID |
bot_id |
UUID | Linked bot |
filename |
VARCHAR | Name of the uploaded file |
type |
VARCHAR | pdf, docx, text, url |
status |
VARCHAR | indexed, failed, pending |
uploaded_at |
TIMESTAMP | Upload time |
- Each bot gets a unique namespace in the vector DB
- Namespace is stored in the
botstable undervector_namespace - Example:
vec_abc123used for all embeddings of that bot
- Backend: Golang (Gin/Fiber/Echo)
- Vector Store: Qdrant / Pinecone
- Embeddings: OpenAI Embedding API (
text-embedding-3-small) - LLM: OpenAI GPT-4 or Claude
- Frontend: React / Next.js
- Auth: JWT-based (email/password or OAuth)
The application supports two configuration methods:
Create a .env file in the project root:
# Copy the example file
cp .env.example .env
# Or migrate from existing config.json
./migrate-config.shEdit .env with your actual values. See ENV_CONFIG.md for detailed documentation.
If environment variables are not set, the application falls back to ./app/config/config.json.
Priority: Environment variables take precedence over config.json.
For detailed configuration options, migration guide, and security best practices, see ENV_CONFIG.md.
- Use JWT for all authenticated routes
- Authorization header required for:
/api/upload/api/chat/api/bots/api/files
Once a bot is created:
- Upload a PDF via
/api/upload - Query the bot via
/api/chatwith:
{
"botId": "abc123",
"message": "What services do you offer?"
}