Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DocClinic - Homeopathy Clinic Website

A comprehensive web application for Dr. Rajesh Sharma's homeopathic clinic, featuring online appointment booking, patient management, and automated email notifications.

🌟 Features

Frontend (React)

  • Responsive Design: Mobile-first approach with tablet and desktop optimization
  • Google OAuth Integration: Secure authentication using Google Sign-In
  • Appointment Booking: Online booking system with time slot management
  • Interactive UI Components:
    • Hero section with modern design
    • About doctor section with testimonials
    • FAQ system with categorized questions
    • Contact forms and information
    • Live chatbot for basic queries

Backend (Node.js + Express)

  • RESTful API: Clean API endpoints for all functionality
  • Email Service: Automated email notifications using Gmail SMTP
  • JWT Authentication: Secure user sessions
  • Database: File-based JSON storage for appointments and users
  • Appointment Management: CRUD operations with status tracking

Key Functionality

  • Email Notifications:
    • Clinic receives appointment requests with confirm/reject buttons
    • Patients receive booking confirmations and status updates
    • Professional email templates with clinic branding
  • Appointment Status Management: Pending β†’ Confirmed/Rejected β†’ Completed
  • Guest Booking: Non-registered users can book appointments
  • Real-time Validation: Form validation and error handling

πŸš€ Quick Start

Prerequisites

  • Node.js (v14 or higher)
  • Gmail account with App Password
  • Google OAuth credentials

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd doclinic
  2. Install Dependencies

    # Frontend dependencies
    npm install
    
    # Backend dependencies
    cd backend
    npm install
  3. Environment Setup

    Create backend/.env file:

    PORT=5000
    JWT_SECRET=your_jwt_secret_key
    BASE_URL=http://localhost:5000
    
    # Google OAuth
    GOOGLE_CLIENT_ID=your_google_client_id
    
    # Gmail Configuration
    GMAIL_USER=your_gmail@gmail.com
    GMAIL_APP_PASSWORD=your_app_password
    CLINIC_EMAIL=clinic_email@gmail.com
  4. Start the Application

    # Terminal 1 - Backend
    cd backend
    npm start
    
    # Terminal 2 - Frontend  
    npm start
  5. Access the Application

πŸ“§ Email Configuration

Gmail Setup

  1. Enable 2-Factor Authentication on your Gmail account
  2. Generate an App Password:
    • Go to Google Account Settings > Security
    • Select "2-Step Verification" > "App Passwords"
    • Generate password for "Mail" application
  3. Use the generated 16-character password in GMAIL_APP_PASSWORD

Google OAuth Setup

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable Google+ API
  4. Create OAuth 2.0 credentials
  5. Add your domain to authorized origins
  6. Copy Client ID to environment variables

πŸ“ Project Structure

doclinic/
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ src/                    # React frontend source
β”‚   β”œβ”€β”€ components/         # Reusable components
β”‚   β”œβ”€β”€ pages/             # Page components
β”‚   └── config.js          # Frontend configuration
β”œβ”€β”€ backend/               # Node.js backend
β”‚   β”œβ”€β”€ data/             # JSON database files
β”‚   β”œβ”€β”€ routes/           # API route handlers
β”‚   β”œβ”€β”€ utils/            # Utility functions
β”‚   └── server.js         # Express server entry
└── build/                # Production build output

πŸ› οΈ API Endpoints

Authentication

  • POST /api/auth/google - Google OAuth login
  • POST /api/auth/register - User registration
  • GET /api/auth/profile - Get user profile

Appointments

  • GET /api/appointments - Get user appointments
  • POST /api/appointments/book - Book appointment (authenticated)
  • POST /api/appointments/book-guest - Book appointment (guest)
  • GET /api/appointments/confirm/:token - Confirm appointment
  • GET /api/appointments/reject/:token - Reject appointment

πŸ“± Responsive Design

The application is fully responsive with breakpoints:

  • Mobile: ≀ 768px
  • Tablet: 769px - 1024px
  • Desktop: β‰₯ 1025px

🎨 Design Features

  • Color Scheme: Red (#c41e3a) primary with white/gray accents
  • Typography: Modern font stack with proper hierarchy
  • Components: Card-based layouts with subtle shadows
  • Animations: Smooth transitions and hover effects
  • Accessibility: ARIA labels and keyboard navigation support

πŸ“§ Email Templates

Professional email templates include:

  • Clinic Notifications: Appointment requests with action buttons
  • Patient Confirmations: Booking acknowledgments
  • Status Updates: Appointment confirmations/rejections
  • Responsive Design: Email templates work across all clients

πŸ”’ Security Features

  • JWT token-based authentication
  • Google OAuth integration
  • Input validation and sanitization
  • CORS configuration
  • Environment variable protection

πŸš€ Deployment

Frontend Deployment (Netlify/Vercel)

  1. Build the project: npm run build
  2. Deploy the build folder
  3. Configure environment variables

Backend Deployment (Render/Heroku)

  1. Deploy from GitHub repository
  2. Set environment variables
  3. Ensure PORT is configured for the hosting service

πŸ“Š Database Schema

Users

{
  "id": "uuid",
  "name": "string",
  "email": "string", 
  "phone": "string",
  "picture": "url",
  "googleId": "string",
  "createdAt": "datetime"
}

Appointments

{
  "id": "uuid",
  "confirmationToken": "uuid",
  "userId": "uuid",
  "patientName": "string",
  "patientEmail": "string", 
  "patientPhone": "string",
  "appointmentDate": "date",
  "appointmentTime": "time",
  "healthConcern": "string",
  "symptoms": "string",
  "additionalNotes": "string",
  "preferredDoctor": "string",
  "status": "pending|confirmed|rejected|cancelled|completed",
  "createdAt": "datetime"
}

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘¨β€βš•οΈ About Dr. Rajesh Sharma

Dr. Rajesh Sharma is a qualified homeopathic physician with 29+ years of experience, specializing in classical homeopathy and holistic treatment approaches. The clinic is located in New Delhi, India.

Contact Information:

  • πŸ“± Phone: +91 98765 43210, +91 97654 32109
  • πŸ“ Address: 215 Medic Avenue, New Delhi - 110015, India
  • πŸ“§ Email: dr.rajeshsharma@gmail.com

For support or questions, please contact the development team or create an issue in the repository.

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

About

Professional homeopathy clinic website with appointment booking and email notifications

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages