ChatbotAI is a full-stack AI chatbot application built with React (frontend) and Vercel Serverless Functions (backend).
It allows users to chat with an AI assistant, with features like session titles and chat history.
- Frontend
- React + TailwindCSS
- Apollo Client (GraphQL integration)
- Nhost (auth & database)
- Backend
- Render Serverless Functions (
api/
folder) - OpenAI API for generating replies & titles
- Render Serverless Functions (
- Deployment
- Frontend → Netlify
- Backend → Render
bash
git clone https://github.com/your-username/chatbotai.git
cd chatbotai
bash
npm install
For backend (inside api/):
cd api
npm install
Frontend (.env):
REACT_APP_NHOST_SUBDOMAIN=your-nhost-subdomain
REACT_APP_NHOST_REGION=your-nhost-region
Backend (.env):
OPENAI_API_KEY=sk-xxxxxx
bash
npm start
Frontend (React)
- Push repo to GitHub
- Deploy on Netlify
- Configure env vars in Netlify dashboard
Backend (API)
- Push api/ folder to its own repo (or same repo with correct root)
- Import to Vercel
- Add OPENAI_API_KEY in Vercel environment settings
- Your endpoints will be:
https://your-backend.render.app/api/generate-reply
https://your-backend.render.app/api/generate-title
Request
POST https://your-backend.render.app/api/generate-reply
Content-Type: application/json
{
"message": "Hello chatbot!"
}
Responce
{
"reply": "Hello! How can I assist you today?"
}
- ✅ User Authentication with Nhost – secure login and session management
- ✅ Real-time Chat – powered by GraphQL subscriptions
- ✅ AI-generated Responses – using OpenAI GPT models
- ✅ Automatic Chat Title Generation – titles created dynamically from chat context
- ✅ Seamless Deployment – frontend on Netlify & backend on Render
We welcome contributions from the community! 🚀
- 🍴 Fork the project
- 🌱 Create a new branch →
feature/awesome-feature
- 💾 Commit your changes →
git commit -m "Add awesome feature"
- 📤 Push to your branch →
git push origin feature/awesome-feature
- 🔀 Open a Pull Request