A comprehensive web application for Dr. Rajesh Sharma's homeopathic clinic, featuring online appointment booking, patient management, and automated email notifications.
- 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
- 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
- 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
- Node.js (v14 or higher)
- Gmail account with App Password
- Google OAuth credentials
-
Clone the repository
git clone <your-repo-url> cd doclinic
-
Install Dependencies
# Frontend dependencies npm install # Backend dependencies cd backend npm install
-
Environment Setup
Create
backend/.envfile: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
-
Start the Application
# Terminal 1 - Backend cd backend npm start # Terminal 2 - Frontend npm start
-
Access the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Enable 2-Factor Authentication on your Gmail account
- Generate an App Password:
- Go to Google Account Settings > Security
- Select "2-Step Verification" > "App Passwords"
- Generate password for "Mail" application
- Use the generated 16-character password in
GMAIL_APP_PASSWORD
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add your domain to authorized origins
- Copy Client ID to environment variables
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
POST /api/auth/google- Google OAuth loginPOST /api/auth/register- User registrationGET /api/auth/profile- Get user profile
GET /api/appointments- Get user appointmentsPOST /api/appointments/book- Book appointment (authenticated)POST /api/appointments/book-guest- Book appointment (guest)GET /api/appointments/confirm/:token- Confirm appointmentGET /api/appointments/reject/:token- Reject appointment
The application is fully responsive with breakpoints:
- Mobile: β€ 768px
- Tablet: 769px - 1024px
- Desktop: β₯ 1025px
- 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
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
- JWT token-based authentication
- Google OAuth integration
- Input validation and sanitization
- CORS configuration
- Environment variable protection
- Build the project:
npm run build - Deploy the
buildfolder - Configure environment variables
- Deploy from GitHub repository
- Set environment variables
- Ensure PORT is configured for the hosting service
{
"id": "uuid",
"name": "string",
"email": "string",
"phone": "string",
"picture": "url",
"googleId": "string",
"createdAt": "datetime"
}{
"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"
}- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
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.
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify