Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Appointment Booking System

A comprehensive web-based appointment booking system built with PHP, MySQL, and Bootstrap. This system allows customers to book services online while enabling administrators to manage schedules, services, staff, and bookings efficiently.

πŸ“‹ Features

User Features

  • User Registration & Login - Secure authentication system
  • Browse Services - View available services with pricing and duration
  • Book Appointments - Step-by-step booking process with real-time availability
  • Time Slot Selection - Dynamic time slot generation based on business hours
  • Appointment Management - View, cancel, and track appointments
  • Profile Management - Update personal information and change password
  • Booking History - Track all past and upcoming appointments

Admin Features

  • Dashboard Overview - Statistics and insights at a glance
  • Booking Management - View, edit, cancel, and manage all bookings
  • Service Management - Create, update, and delete services (CRUD)
  • User Management - Manage registered users and their permissions
  • Status Control - Update appointment and user statuses
  • Reports & Analytics - View booking statistics and trends

System Features

  • Prevent Double Booking - Automatic conflict detection
  • Time Slot Locking - Temporary reservation during checkout (5 minutes)
  • Cancellation Rules - 24-hour advance cancellation policy
  • Business Hours Management - Configurable working hours
  • Responsive Design - Mobile-friendly Bootstrap interface
  • Modular Architecture - Clean, maintainable code structure

πŸ—‚οΈ Folder Structure

MassegeAppointmentSystem/
β”œβ”€β”€ admin/                      # Admin panel pages
β”‚   β”œβ”€β”€ dashboard.php          # Admin dashboard
β”‚   β”œβ”€β”€ bookings.php           # Manage bookings
β”‚   β”œβ”€β”€ services.php           # Manage services
β”‚   └── users.php              # Manage users
β”œβ”€β”€ assets/                    # Static assets
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css         # Custom styles
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── main.js           # Custom JavaScript
β”‚   └── images/               # Image files
β”œβ”€β”€ config/                    # Configuration files
β”‚   β”œβ”€β”€ config.php            # General configuration
β”‚   └── database.php          # Database connection
β”œβ”€β”€ controllers/              # Business logic (future expansion)
β”œβ”€β”€ database/                 # Database files
β”‚   └── appointment_system.sql # Database schema and sample data
β”œβ”€β”€ includes/                 # Common includes
β”‚   β”œβ”€β”€ header.php           # HTML header
β”‚   β”œβ”€β”€ footer.php           # HTML footer
β”‚   └── navbar.php           # Navigation bar
β”œβ”€β”€ models/                   # Data models
β”‚   β”œβ”€β”€ User.php             # User model
β”‚   β”œβ”€β”€ Service.php          # Service model
β”‚   └── Appointment.php      # Appointment model
β”œβ”€β”€ user/                     # User-facing pages
β”‚   β”œβ”€β”€ dashboard.php        # User dashboard
β”‚   β”œβ”€β”€ services.php         # Browse services
β”‚   β”œβ”€β”€ book.php             # Book appointments
β”‚   β”œβ”€β”€ appointments.php     # View appointments
β”‚   └── profile.php          # User profile
β”œβ”€β”€ index.php                # Landing page
β”œβ”€β”€ login.php                # Login page
β”œβ”€β”€ register.php             # Registration page
└── logout.php               # Logout handler

βš™οΈ Installation

Prerequisites

  • XAMPP (Apache, MySQL, PHP 7.4+)
  • Web browser
  • Text editor (optional, for customization)

Step-by-Step Installation

  1. Install XAMPP

  2. Clone/Copy Project

    # The project is already in: c:\xampp\htdocs\MassegeAppointmentSystem
  3. Create Database

  4. Configure Database Connection (if needed)

    • Edit config/database.php
    • Update credentials if different from defaults:
      private $host = "localhost";
      private $db_name = "appointment_system";
      private $username = "root";
      private $password = "";
  5. Access the Application

πŸ” Default Login Credentials

Admin Account

User Account

  • Create a new account via the registration page

πŸ“– User Guide

For Customers

  1. Registration

    • Click "Register" from the home page
    • Fill in your details (name, email, phone, password)
    • Accept terms and conditions
    • Click "Create Account"
  2. Booking an Appointment

    • Login to your account
    • Navigate to "Services"
    • Select a service you want to book
    • Choose a date (must be future date)
    • Select an available time slot
    • Add any notes (optional)
    • Confirm your booking
  3. Managing Appointments

    • View all appointments from "My Appointments"
    • Filter by status (Upcoming, Completed, Cancelled)
    • Cancel appointments (24 hours notice required)
  4. Profile Management

    • Update personal information
    • Change password
    • View account statistics

For Administrators

  1. Dashboard

    • View key statistics (total bookings, today's appointments, etc.)
    • Quick access to main features
    • Recent appointments overview
  2. Managing Bookings

    • View all appointments with filters (date, status, service)
    • Search by customer name or email
    • Update appointment status
    • View customer details
    • Cancel or delete appointments
  3. Managing Services

    • Add new services with name, description, duration, and price
    • Edit existing services
    • Activate/deactivate services
    • Delete services (warning: affects existing appointments)
  4. Managing Users

    • View all registered users
    • View user details and booking history
    • Suspend or reactivate user accounts
    • Reset user passwords

πŸ› οΈ Technical Details

Database Schema

Main Tables:

  • users - User accounts (customers and admins)
  • services - Available services
  • appointments - Booking records
  • business_hours - Operating hours configuration
  • time_slot_locks - Temporary slot reservations
  • system_settings - System configuration
  • notifications - User notifications

Key Features Implementation

Time Slot Generation:

  • Automatically generates available slots based on business hours
  • Considers service duration
  • Checks for existing bookings to prevent conflicts
  • 30-minute intervals by default

Booking Rules:

  • Service must be active
  • Date must be in the future
  • Time must be within business hours
  • No conflicting appointments
  • User must be logged in

Cancellation Policy:

  • Users can cancel up to 24 hours before appointment
  • Late cancellations are marked separately
  • Cancellation reason can be provided

🎨 Customization

Changing Business Hours

Edit the business_hours table in the database or create an admin interface for it.

Modifying Time Slot Intervals

In models/Appointment.php, locate the getAvailableTimeSlots() method:

// Change this line (currently 30 minutes):
$current_time += 1800; // 1800 seconds = 30 minutes

Styling

Edit assets/css/style.css to customize colors, fonts, and layout.

Adding New Features

  • Controllers can be added to the controllers/ folder
  • Additional models in models/ folder
  • Follow the existing MVC pattern

πŸ”’ Security Features

  • Password hashing with PHP's password_hash()
  • Prepared statements to prevent SQL injection
  • Session management for authentication
  • Input validation and sanitization
  • Role-based access control (User/Admin)
  • XSS protection with htmlspecialchars()

πŸ“± Browser Compatibility

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)
  • Mobile browsers (responsive design)

πŸ› Troubleshooting

Database Connection Error

  • Ensure MySQL is running in XAMPP
  • Check database credentials in config/database.php
  • Verify database name matches the imported database

Page Not Found

  • Check that the project is in c:\xampp\htdocs\MassegeAppointmentSystem
  • Ensure Apache is running in XAMPP
  • Clear browser cache

Login Issues

  • Use default admin credentials
  • Check if user account is active (not suspended)
  • Verify email and password are correct

Time Slots Not Showing

  • Check business hours are configured correctly
  • Ensure the selected date is not on a closed day
  • Verify service has active status

πŸ“ Future Enhancements

Potential features for future versions:

  • Email notifications for appointments
  • SMS reminders
  • Payment integration
  • Multiple staff members management
  • Calendar view for admin
  • Export reports to PDF/Excel
  • Customer reviews and ratings
  • Online payment processing
  • Multi-language support

πŸ“„ License

This project is created for educational and commercial purposes. Feel free to modify and use as needed.

πŸ‘¨β€πŸ’» Developer Notes

Code Standards

  • PHP 7.4+ compatibility
  • PDO for database operations
  • Bootstrap 5 for UI
  • jQuery for enhanced interactions
  • Modular, reusable code structure

Database Backup

Regularly backup your database:

# From phpMyAdmin, use Export feature
# Or use mysqldump command

πŸ“ž Support

For issues or questions:

  • Check the troubleshooting section
  • Review the code comments
  • Consult PHP/MySQL documentation

Version: 1.0.0
Last Updated: March 3, 2026
Built with: PHP, MySQL, Bootstrap 5, jQuery

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages