Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Well-Appoint

Overview

Well-Appoint is a comprehensive healthcare management solution designed to streamline appointment scheduling and patient care. The platform connects patients with healthcare providers, offering a seamless experience for booking, managing, and tracking medical appointments.

Features

For Patients

  • User Authentication: Secure registration, login, and email verification
  • Profile Management: Create and update personal health profiles
  • Appointment Booking: Schedule appointments with available doctors
  • Appointment Management: View, cancel, and track appointment status
  • Virtual & In-Person Options: Choose between virtual consultations or in-person visits

For Doctors

  • Professional Profile: Showcase specializations, experience, and department
  • Appointment Management: Confirm, complete, or update appointment status
  • Patient Interaction: View patient details and appointment notes
  • Schedule Management: Manage availability and appointment calendar

General Features

  • Responsive Design: Fully responsive interface for all devices
  • Secure Authentication: JWT-based authentication with cookie management
  • Email Notifications: Verification emails and password reset functionality
  • Role-Based Access: Different interfaces and permissions for patients and doctors

Tech Stack

Frontend

  • Framework: React 19 with TypeScript
  • Routing: React Router v7
  • State Management: Zustand
  • UI Components: Custom components with Radix UI primitives
  • Styling: Tailwind CSS
  • Form Handling: React Hook Form with Zod validation
  • HTTP Client: Axios
  • Notifications: React Hot Toast

Backend

  • Runtime: Node.js with Express
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT (JSON Web Tokens)
  • Password Security: bcryptjs for hashing
  • Email Service: Resend for transactional emails
  • PDF Generation: PDFKit for document generation

Project Structure

Frontend Structure

frontend/
├── src/
│   ├── components/       # Reusable UI components
│   ├── endpoints/        # API integration and data fetching
│   ├── lib/              # Utility functions
│   ├── pages/            # Application pages and routes
│   ├── schema/           # Data validation schemas
│   └── App.tsx           # Main application component

Backend Structure

backend/
├── controller/          # Request handlers and business logic
├── data/                # Data utilities and configurations
├── lib/                 # Database and utility libraries
├── middleware/          # Express middleware
├── prisma/              # Database schema and migrations
├── routes/              # API route definitions
├── templates/           # Email and PDF templates
└── utils/               # Helper functions

Database Schema

The application uses a PostgreSQL database with the following main entities:

  • User: Core user account with authentication details
  • Patient: Extended profile for users with the patient role
  • Doctor: Extended profile for users with the doctor role
  • Appointments: Scheduling information linking patients and doctors
  • VerificationToken: Email verification tokens
  • PasswordReset: Password reset tokens

Getting Started

Prerequisites

  • Node.js (v18+)
  • PostgreSQL database
  • npm or yarn

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file with the following variables:

    API_URL=http://localhost:5000/api/v1
    AUTH_API_URL=http://localhost:5000/api/v1/auth
    PROFILE_API_URL=http://localhost:5000/api/v1/profile
    APPOINTMENT_API_URL=http://localhost:5000/api/v1/appointments
    
  4. Start the development server:

    npm run dev
    

Backend Setup

  1. Navigate to the backend directory:

    cd backend
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file with the following variables:

    PORT=5000
    PORTGRESQL_URL=postgresql://username:password@localhost:5432/wellappoint
    JWT_SECRET=your_jwt_secret_key
    RESEND_API_KEY=your_resend_api_key
    
  4. Run Prisma migrations:

    npx prisma migrate dev
    
  5. Start the server:

    npm start
    

API Endpoints

Authentication

  • POST /api/v1/auth/register: Register a new user
  • POST /api/v1/auth/login: User login
  • POST /api/v1/auth/logout: User logout
  • POST /api/v1/auth/verify: Verify email address
  • POST /api/v1/auth/forget-password: Request password reset
  • POST /api/v1/auth/reset-password/:token: Reset password

Profile

  • GET /api/v1/profile/status: Check profile completion status
  • POST /api/v1/profile/create: Create user profile
  • GET /api/v1/profile/getDoctors: Get list of doctors (for patients)

Appointments

  • GET /api/v1/appointments/get: Get user appointments
  • POST /api/v1/appointments/create: Create new appointment
  • PATCH /api/v1/appointments/:appointmentId/update: Update appointment status
  • PATCH /api/v1/appointments/:appointmentId/cancel: Cancel appointment

Contributing

  1. Fork the repository
  2. Create your 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

Created by MH :)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages