HealthHub is a web application where users can:
- Book appointments with doctors
- View their appointment history in the profile section
- Use an AI-powered assistant (powered by Cohere AI) to get health tips, precautions, and suggested medications based on their symptoms or current feelings
This project is divided into two parts:
api– The backend server (Node.js, Express, MongoDB, JWT Authentication)client– The frontend (React.js)
- ✅ User authentication (JWT based)
- ✅ Doctor appointment booking
- ✅ Appointment viewing in profile
- ✅ AI health assistant (via Cohere API)
- ✅ Responsive UI (React)
/checking_healthhub
├── api // Express backend
└── client // React frontend
Make sure you have the following installed:
- Node.js
- npm (comes with Node.js)
- A running MongoDB database (local or cloud like MongoDB Atlas)
- A Cohere AI API key
Create a .env file inside the api folder and add the following variables:
MONGO_URL=your_mongodb_connection_string
COHERE_API_KEY=your_cohere_api_key
JWT_SECRET=your_jwt_secret_key
PORT=8000 Run the following commands to set up both api and client folders:
# Go to the backend folder
cd api
npm install
# In a new terminal, go to the frontend folder
cd ../client
npm install Run both backend and frontend in development mode:
# Start the backend
cd api
npm run dev # Start the frontend in a separate terminal
cd client
npm run dev Now visit:
- Frontend:
http://localhost:3000 - Backend:
http://localhost:8000
Powered by the Cohere API, the assistant accepts user input like:
"I have a headache and feel dizzy"
And responds with:
- General advice
- Suggested medicines
- Self-care tips
This logic is implemented in the backend, which calls the Cohere API and returns structured output to the frontend.
- Frontend: React.js
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT
- AI API: Cohere
- Tools: Axios, dotenv, nodemon