An intelligent AI chatbot application built with modern web technologies, featuring real-time conversations powered by OpenAI's GPT models.
- Real-time AI-powered conversations with streaming responses
- Persistent conversation history with MongoDB
- Dark and light theme support
- Markdown rendering with syntax highlighting for code blocks
- Conversation search and management
- Copy responses to clipboard
- Word count and timestamps for messages
- Responsive design for mobile and desktop
- React 19
- Vite
- React Markdown with syntax highlighting
- UUID for unique thread identification
- Node.js with Express
- MongoDB with Mongoose
- OpenAI API integration
- CORS enabled for cross-origin requests
- Node.js (v18 or higher)
- MongoDB (local or Atlas)
- OpenAI API key
- Clone the repository
git clone https://github.com/YOUR_USERNAME/HaloAI.git
cd HaloAI- Install backend dependencies
cd Backend
npm install- Install frontend dependencies
cd ../Frontend
npm install- Configure environment variables
Create a .env file in the Backend directory:
PORT=8080
OPENAI_API_KEY=your_openai_api_key
MONGODB_URI=your_mongodb_connection_string
- Start the backend server
cd Backend
npm run dev- Start the frontend development server
cd Frontend
npm run dev- Open your browser and navigate to
http://localhost:5173
HaloAI/
├── Backend/
│ ├── models/
│ │ └── Thread.js
│ ├── routes/
│ │ └── chat.js
│ ├── utils/
│ │ └── openai.js
│ ├── server.js
│ └── package.json
├── Frontend/
│ ├── src/
│ │ ├── App.jsx
│ │ ├── Chat.jsx
│ │ ├── ChatWindow.jsx
│ │ ├── Sidebar.jsx
│ │ ├── MyContext.jsx
│ │ └── assets/
│ ├── index.html
│ └── package.json
└── README.md
GET /api/thread- Retrieve all conversation threadsGET /api/thread/:threadId- Retrieve specific thread messagesPOST /api/chat- Send message and receive AI responseDELETE /api/thread/:threadId- Delete a conversation thread
This is a personal project. Contributions are not currently accepted.
This project is licensed under the ISC License.
Abhijith P
Built using OpenAI's GPT models for natural language processing capabilities.