Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
199 changes: 115 additions & 84 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,159 @@
🏥 Baymax – Smart Appointment Booking System
Baymax is an intelligent, full-stack clinic management web application that simplifies appointment booking using AI, voice commands, and Google integrations. Designed for front desk use, it ensures a seamless experience for booking and managing patient appointments.
# Baymax — Smart AI Appointment Booking System

## login demo credentials
username: aaa@aaa.com
password: 1234567
Baymax is an intelligent clinic management web application that automates front-desk appointment booking using voice commands, AI parsing, and Google integrations.

## 🚀 Quick Start
It works like a virtual receptionist — staff can speak the request and Baymax schedules the appointment, updates the doctor's calendar, and sends confirmation emails automatically.

1. Clone the repository:
```bash
git clone https://github.com/your-username/baymax.git
```
---

2. Install dependencies:
```bash
cd baymax
npm install
## Demo Login
```

3. Start the development server:
```bash
npm start
Email: aaa@aaa.com
Password: 1234567
```

4. Open your browser and visit `http://localhost:3000` to access the application.

---

📌 Key Features
🎙️ AI-Powered Voice Appointment Booking
Book appointments using speech with automatic transcription and intelligent slot mapping.
## Features

📅 Google Calendar Integration
Automatically syncs booked appointments with the doctor's Google Calendar.
### AI Voice Booking
- Speech to text using Web Speech API
- Natural language understanding
- Automatic date and time detection
- Slot validation before booking

📧 Gmail Notifications
Sends confirmation emails to patients and doctors via Gmail API.
### Google Calendar Integration
- Automatically creates doctor events
- Prevents overlapping appointments

💡 User-Friendly Interface
Built with React and Tailwind CSS for a clean, responsive UI.
### Email Notifications
- Confirmation mail to patient
- Reminder mail to doctor
- Powered by Gmail API

🛠️ Tech Stack
🔹 Frontend
React
### Secure Authentication
- JWT based sessions
- bcrypt password hashing

Axios
### User Interface
- Clean responsive UI
- Designed for front desk operators

Web Speech API (Speech Recognition)
---

Tailwind CSS
## Tech Stack

🔹 Backend
Node.js
### Frontend
- React
- Tailwind CSS
- Axios
- Web Speech API

Express
### Backend
- Node.js
- Express.js
- MongoDB (Mongoose)
- JWT
- bcrypt

Mongoose
### Integrations
- Google Calendar API
- Gmail API
- MongoDB Atlas

JWT (Authentication)
---

bcrypt (Password hashing)
## Architecture
```
Speech → Text → AI Parser → Backend Validation → Database → Calendar + Email
```

🔹 Database
MongoDB Atlas (Cloud)
---

🔗 API Endpoints
Method URL Description
POST /api/auth/login Login and generate JWT
POST /api/appointment/create Create a new appointment
GET /api/appointment/list Retrieve all appointments
## Local Setup

⚙️ Installation
bash
Copy
Edit
### 1. Clone Repository
```bash
git clone https://github.com/suvxn/baymax.git
cd baymax
🔧 Environment Variables
Create a .env file in the server/ directory with the following keys:


▶️ Running the Application
Start the backend server:
```

bash
Copy
Edit
### 2. Backend Setup
```bash
cd server
npm install
npm start
Start the frontend:
```
Runs on: http://localhost:5000

bash
Copy
Edit
cd frontend
### 3. Frontend Setup
```bash
cd ../frontend
npm install
npm run dev
Client: http://localhost:5173
Server: http://localhost:5000
```
Runs on: http://localhost:5173

---

## Environment Variables

Create `.env` inside `server/`

```
PORT=5000
MONGO_URI=your_mongodb_connection
JWT_SECRET=your_secret

GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_secret
GOOGLE_REDIRECT_URI=your_redirect
GOOGLE_REFRESH_TOKEN=your_refresh_token
```

---

## API Endpoints

📤 Gmail & Calendar Integration
Requires Google OAuth setup. The app uses Gmail API and Google Calendar API for:
| Method | Endpoint | Description |
|------|------|------|
| POST | /api/auth/login | Login and get token |
| POST | /api/appointment/create | Create appointment |
| GET | /api/appointment/list | Fetch appointments |

Sending email confirmations to patients and doctors.
---

Automatically adding appointments to Google Calendar.
## Example Voice Commands
- Book appointment for Rahul tomorrow at 3 PM
- Schedule patient Aman on Monday morning
- Appointment for Neha at 2:30 PM with Dr. Mehta

🤖 AI Voice Booking
Uses the Web Speech API for speech recognition.
---

Recognizes keywords like "book appointment for tomorrow at 3 PM with Dr. Smith".
## Google Integration
Baymax connects with:
- Google Calendar → adds appointment events
- Gmail API → sends confirmation emails

AI parses and validates input before creating the booking.
Requires Google OAuth credentials.

👥 Contributing
We welcome contributions!
---

Fork the repository
## Contributing
1. Fork the repository
2. Create a feature branch
3. Open a pull request

Create a feature branch
---

Submit a pull request
## License
MIT License

Issues and feature suggestions are also appreciated.
---

📄 License
This project is licensed under the MIT License.
## Future Improvements
- WhatsApp reminders
- Doctor analytics dashboard
- Multi clinic support
- AI no-show prediction
- Regional language voice support