Welcome to the Business Chatbot Template project! While currently configured for WonderWorld (a magical theme park example), this is a flexible full-stack application designed to be easily adapted for any business. The chatbot helps guests with information about products, services, hours, and more.
💡 Note: WonderWorld is just a demonstration context. You can easily feed this chatbot your own business data!
This application serves as a comprehensive assistance interface. It combines a modern, responsive web client with a fast, intelligent backend service to answer user queries in natural language based on provided context.
The system is designed to:
- Be efficiently retargeted to any business domain by updating the knowledge base.
- Provide real-time information based on your data.
- Answer questions using context-aware AI (powered by OpenAI).
WonderWorld is just a placeholder. To use this for your own business:
- Open
packages/server/prompts/WonderWorld.md. - Replace the content with your own business information (FAQs, pricing, services, etc.).
- The chatbot will immediately start answering questions based on your new data!
- 🤖 AI-Powered Chat: Intelligent conversation aware of WonderWorld's specific attractions and rules.
- ⚡ High Performance: Backend powered by Bun and Express for low-latency responses.
- 🎨 Modern UI: Beautiful, responsive frontend built with React, Vite, and TailwindCSS.
- 🏗️ Monorepo Structure: efficient code organization with separate packages for
clientandserver. - 🛡️ Type Safety: Full TypeScript implementation across the stack with Zod validation.
- Runtime: Bun
- Frontend: React, Vite, TailwindCSS, Lucide React
- Backend: Express, OpenAI SDK, Zod
- Language: TypeScript
Follow these steps to get the project running locally.
- Bun (latest version)
- An OpenAI API Key
-
Clone the repository:
git clone https://github.com/Shahar-Mamok/my-app.git cd my-app -
Install dependencies: Run the following command at the root to install dependencies for all workspaces:
bun install
- Server Configuration:
Navigate to the server package and set up your environment variables.
Create a
cd packages/server.envfile (if it doesn't already exist) and add your OpenAI API key:(Note: AOPENAI_API_KEY=sk-your-api-key-here PORT=3000
.envfile may already exist. Ensure it has the correct keys.)
To run both the Client and Server concurrently from the root directory:
bun run devThis will start:
- Server at
http://localhost:3000 - Client at
http://localhost:5173(or the next available port)
Open your browser and navigate to the client URL to interact with the Chatbot.
my-app/
├── packages/
│ ├── client/ # React frontend application
│ │ ├── src/ # UI components and logic
│ │ └── ...
│ └── server/ # Express backend application
│ ├── controllers/ # Request handlers
│ ├── services/ # Business logic & AI integration
│ ├── prompts/ # Knowledge base (WonderWorld.md)
│ └── ...
├── package.json # Root configuration & scripts
└── ...
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
If you encounter any issues or have questions, please check the existing issues on the repository or open a new one.
This project is licensed under the MIT License.