Admin dashboard and backend for building, publishing, and operating DialogueBot script-based chatbots.
This repository is split into two applications:
client/: React + Vite admin UI for authentication, chatbot flow editing, training intents, channel management, live conversations, help content, and subscription screens.server/: Express + TypeScript API for auth, flows, intents, channels, uploads, webhook handling, live chat, billing, email, and background jobs.
The project is designed around a chatbot-builder workflow:
- Create and manage channels
- Build chatbot flows visually
- Train intents for message classification
- Publish flows to channels
- Handle incoming webhook traffic
- Monitor live conversations
- Manage plans and subscriptions
- React 18
- Vite
- TypeScript
- Tailwind CSS
- TanStack Query
- TanStack Router
- Radix UI
- Socket.IO client
- Node.js
- Express
- TypeScript
- SWC
- Drizzle ORM
- PostgreSQL
- Redis
- Socket.IO
- Stripe
- Firebase Admin
- Nodemailer
- BullMQ
.
├── client/ # Admin frontend
├── server/ # API, workers, database, webhooks
└── README.md
- Authentication and account verification
- Channel management for chatbot integrations
- Visual flow builder and flow publishing
- Intent training and test prediction
- Live chat / conversation handling over Socket.IO
- Email settings and bot mail workflows
- Subscription plans and Stripe checkout support
- Public webhook endpoints for chatbot events
- Multilingual content support
- Node.js 20
- npm
- PostgreSQL
- Redis
Optional for local development:
- Docker and Docker Compose for local Postgres + Redis
git clone <your-repo-url>
cd dialogue-bot-admin
cd client && npm install
cd ../server && npm installFrom server/:
docker-compose up -dThis starts:
- PostgreSQL on
localhost:5432 - Redis on
localhost:6379
Create server/.env.development manually using the sample below.
NODE_ENV=development
PORT=8080
ACCESS_TOKEN_SECRET=change-me
REFRESH_TOKEN_SECRET=change-me
RESET_PASS_TOKEN_SECRET=change-me
VERIFY_EMAIL_TOKEN_SECRET=change-me
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/dialoguebot
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
LOG_FORMAT=dev
LOG_DIR=logs
CREDENTIALS=true
ORIGIN=http://localhost:5173
PUBLIC_DOMAIN=http://localhost:8080
BOT_ENDPOINT=http://localhost:8080
API_TOKEN=change-me
SIGNATURE_SECRET=change-me
AUTO_REGISTER_WEBHOOK=false
MAIL_USER=
MAIL_PASS=
STRIPE_SECRET_KEY=
STRIPE_ENDPOINT_SECRET=
FIREBASE_TYPE=
FIREBASE_PROJECT_ID=
FIREBASE_PRIVATE_KEY_ID=
FIREBASE_PRIVATE_KEY=
FIREBASE_CLIENT_EMAIL=
FIREBASE_CLIENT_ID=
FIREBASE_AUTH_URI=
FIREBASE_TOKEN_URI=
FIREBASE_AUTH_PROVIDER_X509_CERT_URL=
FIREBASE_CLIENT_X509_CERT_URL=
FIREBASE_UNIVERSE_DOMAIN=
FIREBASE_DATABASE_URL=Create a frontend env file in client/:
VITE_DEV_API_URL=http://localhost:8080
VITE_PROD_API_URL=https://api.dialoguebot.techFrom server/:
npm run push:migrateOptional seed:
npm run db:seedBackend from server/:
npm run devFrontend from client/:
npm run devDefault local URLs:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:8080
Run from client/:
npm run dev
npm run build
npm run start
npm run lint
npm run formatRun from server/:
npm run dev
npm run build
npm run start
npm run lint
npm run lint:fix
npm run push:migrate
npm run gen:migrate
npm run db:seed
npm run db:studioThe Express app mounts all routes under /api. Major route groups include:
/api/auth/api/user/api/channel/api/flow/api/intent/api/conversation/api/conversation-live-chat/api/setting/api/subscriptions/api/user-subscriptions/api/upload/api/webhook
Static assets are exposed from:
/public
The repository includes Dockerfiles for both apps:
client/Dockerfileserver/Dockerfile
The backend also includes:
server/docker-compose.ymlfor local Postgres and Redisserver/ecosystem.config.jsfor PM2-based production execution
- The backend loads
.env.developmentautomatically whenNODE_ENV=development. - Minimal required server variables enforced at startup are:
NODE_ENVPORTACCESS_TOKEN_SECRETREFRESH_TOKEN_SECRETDATABASE_URL
- Socket.IO is enabled on the backend and used by the frontend for live chat notifications.
- CORS currently allows common local frontend ports plus the production DialogueBot domains.
- Build the frontend with
npm run buildinclient/. - Build the backend with
npm run buildinserver/. - The PM2 config runs the API on port
8080. - Stripe, Firebase, mail, and webhook-related features require valid production credentials before they will work correctly.