Skip to content
HS®
All projects

(009) / 012

BotForge

A platform for creating, embedding and monitoring AI chatbots: a dashboard, an API, and a copy-paste widget that streams replies.

Category
Multi-tenant SaaS
Year
2026
Last pushed
Oct 2026
Primary language
JavaScript
<script src="widget.js">
Conceptual diagram — an embeddable chat widget and the script tag that loads it.

(01) Overview

BotForge is a multi-tenant SaaS platform for creating, embedding and monitoring AI chatbots. It combines a React dashboard, an Express API, PostgreSQL persistence, Google sign-in, OpenAI account connection, and an embeddable chat widget that streams its replies.

(02) Problem statement

Putting a chatbot on a website involves more than calling a model: someone has to configure what the bot may talk about, keep each customer's data and credentials separate, deliver the bot to a third-party page, and see afterwards what conversations actually happened.

(03) Technical approach

Two audiences, two paths into one API:

  • Customers use an authenticated dashboard to configure bots and read analytics.
  • End users talk to a public, embeddable widget identified by an embed key.

Tenant data lives in PostgreSQL; provider credentials are encrypted before they are stored.

(04) System architecture

Two paths into one APIConceptual diagram · select a stage

Stage 01 — Dashboard

React/Vite app; authenticated with a JWT after Google sign-in.

(05) Implementation details

The backend is organised by responsibility: auth/ for Google OAuth, OpenAI OAuth and JWT verification; bots/ for chatbot CRUD and embed-key management; chat/ for the public widget endpoint, topic checks, streaming and sessions; and analytics/ for dashboard metrics and session logs. The widget is a standalone script served by the API and loaded by customer sites.

Connected OpenAI access tokens are encrypted with AES-256-GCM using a key supplied through the environment. The schema is managed with a base SQL file and numbered migrations.

(06) Main features

  1. 01Chatbot configuration: behaviour, allowed and blocked topics, model and budget settings.
  2. 02Dashboard sign-in with Google OAuth and JWTs.
  3. 03Connected OpenAI credentials stored encrypted with AES-256-GCM.
  4. 04A standalone embeddable widget that streams responses over Server-Sent Events.
  5. 05Sessions, detected topics, outcomes and turn counts recorded for dashboard analytics.

(07) Technology stack

JavaScriptNode.jsExpressPostgreSQLReactViteGoogle OAuthJWTAES-256-GCMServer-Sent EventsOpenAI API

(08) Engineering challenges

  • A public endpoint next to private ones. The chat endpoint must be reachable from any customer site while everything else requires a dashboard JWT.
  • Streaming to a third-party page. Replies are delivered over Server-Sent Events from a widget that runs inside someone else's site.
  • Storing other people's credentials. Tokens are encrypted at rest rather than stored in plain text.
  • Knowing what is unfinished. The README is explicit that this is an MVP foundation and lists what is still needed before public production traffic, starting with rate limiting, quotas and abuse controls.

(09) Evaluation and results

No benchmarks or usage figures are published in the repository, so none are claimed here. The project is best evaluated by running it locally against the documented setup.

Links