Skip to content

shivsh01/AyurConnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

52 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AyurConnect - Ayurvedic Healthcare Platform

A modern web application connecting patients with Ayurvedic doctors for consultations and appointments.

๐Ÿš€ Features

For Patients

  • Doctor Discovery: Browse and search for Ayurvedic doctors
  • Appointment Booking: Schedule consultations with preferred doctors
  • Appointment Management: View, cancel, and track appointment status
  • Profile Management: Update personal information and medical history

For Doctors

  • Appointment Requests: View and manage incoming appointment requests
  • Patient Management: Access patient information and appointment history
  • Profile Management: Update professional information and specializations
  • Blog System: Share health tips and articles (coming soon)

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 18 - UI framework
  • Vite - Build tool and dev server
  • Tailwind CSS - Styling
  • Redux Toolkit - State management
  • React Router v6 - Routing
  • Axios - HTTP client
  • React Hot Toast - Notifications

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - Database
  • Mongoose - ODM
  • JWT - Authentication
  • Cookie Parser - Cookie handling
  • CORS - Cross-origin resource sharing

๐Ÿ“ Project Structure

AyurConnect/
โ”œโ”€โ”€ Frontend/                 # React frontend application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ Components/       # Reusable UI components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ UI/          # Basic UI components (Button, Input, etc.)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Cards/       # Card components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Modals/      # Modal components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Layout/      # Layout components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Forms/       # Form components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Profile/     # Profile-related components
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Authentications/ # Auth components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/           # Page components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Home/        # Landing page
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PatientHomePage/ # Patient dashboard pages
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DoctorHomePage/  # Doctor dashboard pages
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Appointment/     # Appointment booking pages
โ”‚   โ”‚   โ”œโ”€โ”€ features/        # Redux slices
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/           # Custom React hooks
โ”‚   โ”‚   โ”œโ”€โ”€ utils/           # Utility functions
โ”‚   โ”‚   โ”œโ”€โ”€ constants/       # Constants and configurations
โ”‚   โ”‚   โ””โ”€โ”€ assets/          # Static assets
โ”‚   โ””โ”€โ”€ public/              # Public assets
โ”œโ”€โ”€ Backend/                 # Node.js backend application
โ”‚   โ”œโ”€โ”€ config/              # Configuration files
โ”‚   โ”œโ”€โ”€ controllers/         # Route controllers
โ”‚   โ”œโ”€โ”€ middleware/          # Custom middleware
โ”‚   โ”œโ”€โ”€ models/              # Database models
โ”‚   โ”œโ”€โ”€ routes/              # API routes
โ”‚   โ””โ”€โ”€ utils/               # Utility functions
โ””โ”€โ”€ README.md               # Project documentation

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB
  • npm or yarn

Installation

  1. Clone the repository

    git clone <repository-url>
    cd AyurConnect
  2. Install dependencies

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

    Create .env files in both Frontend and Backend directories:

    Backend/.env

    PORT=5000
    MONGODB_URI=your_mongodb_connection_string
    JWT_SECRET=your_jwt_secret
    CLIENT_URL=http://localhost:5173
    NODE_ENV=development

    Frontend/.env

    VITE_API_URL=http://localhost:5000
    VITE_GOOGLE_CLIENT_ID=your_google_client_id
  4. Start the development servers

    # Start backend server (from Backend directory)
    npm run dev
    
    # Start frontend server (from Frontend directory)
    npm run dev
  5. Access the application

๐Ÿ“š API Documentation

Authentication Endpoints

  • POST /api/v1/user/signin - User login
  • POST /api/v1/user/signout - User logout
  • POST /api/v1/user/register - User registration

Doctor Endpoints

  • GET /api/v1/user/public/doctors - Get all doctors (public)
  • GET /api/v1/user/getdoctor - Get current doctor profile
  • PUT /api/v1/user/updatedoctor - Update doctor profile

Patient Endpoints

  • GET /api/v1/user/getpatients - Get current patient profile
  • PUT /api/v1/user/updatepatient - Update patient profile

Appointment Endpoints

  • POST /api/v1/user/appointments - Create appointment
  • GET /api/v1/user/getPatientAppointments - Get patient appointments
  • GET /api/v1/user/getDoctorAppointments - Get doctor appointments
  • PUT /api/v1/user/appointments/:id/cancel - Cancel appointment
  • PUT /api/v1/user/appointments/:id/accept - Accept appointment
  • PUT /api/v1/user/appointments/:id/decline - Decline appointment

๐Ÿ”ง Development

Code Style

  • Use ESLint for code linting
  • Follow consistent naming conventions
  • Use TypeScript for better type safety (future enhancement)

Database Schema

  • User: Authentication and basic user info
  • Doctor: Doctor-specific information and credentials
  • Patients: Patient-specific information and medical history
  • Appointment: Appointment scheduling and status management

State Management

  • Redux Toolkit for global state
  • React hooks for local state
  • Custom hooks for reusable logic

๐Ÿš€ Deployment

Frontend (Vercel)

  1. Connect your GitHub repository to Vercel
  2. Set environment variables in Vercel dashboard
  3. Deploy automatically on push to main branch

Backend (Vercel/Railway)

  1. Set environment variables
  2. Configure MongoDB connection
  3. Deploy using Vercel CLI or Railway dashboard

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

For support, email support@ayurconnect.com or create an issue in the repository.

๐Ÿ”ฎ Future Enhancements

  • Video consultation integration
  • Payment gateway integration
  • Prescription management
  • Health records management
  • Mobile app development
  • AI-powered health recommendations
  • Multi-language support
  • Advanced analytics dashboard

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors