Skip to content

grasyPatel/CheckBeforeGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Deployment# 🩺 Real-Time Doctor Availability & Finder Platform

A comprehensive web application built with the MERN stack that connects patients with available doctors in real-time, featuring location-based search, availability tracking, and seamless appointment discovery.

Project Status MERN Stack Live Demo

πŸ“‹ Table of Contents

🎯 Overview

The Real-Time Doctor Availability & Finder Platform addresses the critical problem of finding available healthcare professionals in real-time. This platform enables doctors to manage their availability status while allowing patients to search and locate nearby available doctors based on specialization, location, and real-time availability.

πŸš€ Problem Statement

Patients often struggle to find available doctors in their area, leading to unnecessary delays in healthcare access. This platform bridges the gap by providing real-time availability information and location-based search capabilities.

✨ Features

For Doctors

  • πŸ‘¨β€βš•οΈ Profile Management: Complete doctor profiles with specialization, clinic details, and contact information
  • πŸ“ Location Integration: Set clinic/hospital location using Google Maps
  • πŸ”„ Availability Toggle: Real-time availability status updates
  • πŸ“§ Daily Reminders: Automated reminders to update availability status
  • πŸ₯ Hospital Management: Hospital name and location management
  • πŸ“… Appointment Management: View, confirm, or cancel patient appointments
  • ⏰ Schedule Management: Set and update consultation timings
  • πŸ“Š Appointment Dashboard: Track appointment history and statistics

For Patients

  • πŸ” Advanced Search: Search by doctor name, specialization, location, or hospital
  • πŸ—ΊοΈ Map Integration: Visual location display with Google Maps
  • ⚑ Real-time Status: Live availability indicators
  • πŸ“± Responsive Design: Mobile-first responsive interface
  • πŸ‘€ User Accounts: Personal accounts for saved searches and preferences
  • πŸ“… Appointment Booking: Schedule appointments with available doctors
  • πŸ“‹ Appointment Management: View, cancel, and track appointment status
  • πŸ”” Appointment Notifications: Get updates on appointment confirmations

Core Functionality

  • πŸ” Secure Authentication: JWT-based authentication system
  • 🌐 RESTful APIs: Well-structured API endpoints
  • πŸ“Š Real-time Updates: Live status updates using modern web technologies
  • πŸ”” Notification System: Automated reminder system for doctors

πŸ› οΈ Tech Stack

Layer Technology Purpose
Frontend React.js User interface and interactions
Styling Tailwind CSS Modern, responsive design
State Management Redux Toolkit Application state management
Backend Node.js + Express.js Server-side logic and APIs
Database MongoDB + Mongoose Data storage and modeling
Authentication JWT Secure user authentication
Maps Google Maps API Location services and mapping
Task Scheduling node-cron Automated reminder system
HTTP Client Axios API communication
Image Storage Cloudinary Cloud Storage

πŸš€ Installation

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (local or MongoDB Atlas)
  • Cloudinary API key

Clone the Repository

git clone https://github.com/grasyPatel/CheckBeforeGo.git
cd CheckBeforeGo

Backend Setup

cd server
npm install

Create a .env file in the server directory:

PORT=8080
MONGO_URI=
JWT_SECRET=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

Frontend Setup

cd client
npm install

Create a .env file in the client directory:

REACT_APP_API_BASE_URL=http://localhost:8080

Start the Application

# Terminal 1 - Start Backend
cd server
npm start

# Terminal 2 - Start Frontend
cd client
npm start

The application will be available at:

  • Frontend: http://localhost:3000
  • Backend API: http://localhost:8080

πŸ’» Usage

For Doctors

  1. Registration: Create a doctor account with professional details
  2. Profile Setup: Add specialization, hospital information, and set location on map
  3. Availability Management: Toggle availability status as needed
  4. Appointment Management: View, confirm, or cancel patient appointments
  5. Schedule Updates: Update consultation timings and availability
  6. Daily Updates: Respond to daily reminder notifications

For Patients

  1. Search Doctors: Use the search functionality to find doctors by various criteria
  2. View Profiles: Access detailed doctor profiles and availability status
  3. Location Services: View doctor locations on interactive maps
  4. Book Appointments: Schedule appointments with available doctors
  5. Manage Appointments: View, reschedule, or cancel existing appointments
  6. Account Management: Create accounts for personalized experience

πŸ“š API Documentation

Authentication Endpoints

POST /api/auth/register    # User/Doctor registration
POST /api/auth/login       # User/Doctor login
POST /api/auth/logout      # User logout
GET  /api/auth/profile     # Get user profile

Doctor Endpoints

GET    /api/doctors           # Get all doctors
GET    /api/doctors/:id       # Get specific doctor
POST   /api/doctors           # Create doctor profile
PUT    /api/doctors/:id       # Update doctor profile
PATCH  /api/doctors/:id/availability  # Toggle availability

Search Endpoints

GET /api/search/doctors?specialty=cardiology    # Search by specialty
GET /api/search/doctors?location=mumbai         # Search by location
GET /api/search/doctors?name=john               # Search by name

Appointment Endpoints

GET    /api/appointments         # Get user's appointments
GET    /api/appointments/doctor/:id  # Get doctor's appointments
POST   /api/appointments         # Book new appointment
PUT    /api/appointments/:id     # Update appointment status
DELETE /api/appointments/:id     # Cancel appointment

πŸ“ Project Structure

doctor-finder-platform/
β”œβ”€β”€ client/                     # React frontend
β”‚   β”œβ”€β”€ public/
β”‚   └── src/
β”‚       β”œβ”€β”€ components/         # Reusable components
β”‚       β”œβ”€β”€ pages/             # Page components
β”‚       β”œβ”€β”€ services/          # API services
β”‚       β”œβ”€β”€ store/             # Redux store
β”‚       β”œβ”€β”€ styles/            # CSS files
β”‚       └── utils/             # Utility functions
β”œβ”€β”€ server/                    # Node.js backend
β”‚   β”œβ”€β”€ controllers/           # Route controllers
β”‚   β”œβ”€β”€ middleware/            # Custom middleware
β”‚   β”œβ”€β”€ models/               # MongoDB models
β”‚   β”œβ”€β”€ routes/               # API routes
β”‚   β”œβ”€β”€ services/             # Business logic
β”‚   β”œβ”€β”€ utils/                # Utility functions
β”‚   └── app.js                # Express app setup
β”œβ”€β”€ docs/                     # Documentation
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
└── package.json

πŸ—„οΈ Database Schema

Doctor Model

{
  name: { type: String, required: true },
  email: { type: String, required: true, unique: true },
  password: { type: String, required: true },
  specialty: { type: String, required: true },
  hospitalName: { type: String, required: true },
  location: { type: String, required: true },
  timings: { type: String, required: true },
  mapLocation: String, // Google Maps link or coordinates
  availability: { type: Boolean, default: false },
  profileImage: { type: String, default: "" }, // Cloudinary URL
  createdAt: Date,
  updatedAt: Date
}

User Model

{
  name: { type: String, required: true },
  email: { type: String, required: true, unique: true },
  password: { type: String, required: true },
  profileImage: { type: String, default: "" },
  phone: { type: String },
  createdAt: Date,
  updatedAt: Date
}

Appointment Model

{
  doctor: { type: ObjectId, ref: "Doctor", required: true },
  user: { type: ObjectId, ref: "User", required: true },
  issue: { type: String, required: true },
  appointmentDate: { type: Date, required: true },
  status: { 
    type: String, 
    enum: ["Pending", "Confirmed", "Cancelled"], 
    default: "Pending" 
  },
  cancelReason: { type: String, default: "" },
  createdAt: Date,
  updatedAt: Date
}

🚧 Development Progress & Roadmap

βœ… Completed Features

  • User and Doctor Authentication System
  • Doctor Profile Management
  • Real-time Availability Toggle
  • Location-based Doctor Search
  • Responsive Frontend Design
  • Image Upload with Cloudinary Integration
  • Basic Doctor Listing and Filtering

πŸš€ In Progress

  • Appointment Booking System (Currently Developing)
    • Database Schema Design (Appointment Model)
    • Frontend Appointment Booking Interface
    • Backend API Endpoints for Appointments
    • Appointment Status Management
    • Email Notifications for Appointments
    • Calendar Integration

πŸ“‹ Upcoming Features

  • Real-time Chat between Patients and Doctors
  • Payment Gateway Integration
  • Advanced Search Filters
  • Doctor Reviews and Ratings
  • Appointment Reminder System
  • Mobile App Development
  • Multi-language Support

Frontend (Vercel)

  1. Connect your GitHub repository to Render (Static)
  2. Set environment variables in Render dashboard
  3. Deploy with automatic builds on push

Backend (Render)

  1. Connect your GitHub repository to Render (Web)
  2. Set environment variables in Render dashboard
  3. Deploy with automatic builds on push

Database (MongoDB Atlas)

  1. Create a MongoDB Atlas cluster
  2. Configure network access and database users
  3. Update connection string in environment variables

Grace - Final Year Computer Science Student

⭐ Star this repository if you found it helpful!

Built with ❀️ for better healthcare accessibility

About

Real-Time Doctor Availability & Finder Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages