A comprehensive appointment booking system built with Laravel, designed for businesses to manage employee schedules, customer bookings, and service offerings. Originally developed as a university project, it has been modernized and enhanced with AI-powered development tools.
- Complete business management dashboard
- Employee scheduling and roster management
- Activity/service type configuration
- Booking oversight and history tracking
- Business hours and availability settings
- Easy appointment booking interface
- Personal booking history and management
- Service browsing and selection
- Account registration and authentication
- Dual authentication system (Business Owner & Customer)
- Calendar-based scheduling views
- Automated booking validation and conflict detection
- Timezone-aware scheduling (Australia/Melbourne)
- Responsive web interface
sequenceDiagram
participant U as User
participant C as Controller
participant A as Auth Helper
participant S as Session
participant D as Database
Note over U,D: Login Process
U->>C: Submit login credentials
C->>A: Validate user type (Customer/BusinessOwner)
A->>D: Query user credentials
D-->>A: Return user data
A->>S: Create authenticated session
S-->>C: Session confirmation
C-->>U: Redirect to dashboard
Note over U,D: Authorization Check
U->>C: Access protected route
C->>A: Check authentication
A->>S: Verify session
alt Session valid
S-->>A: User authenticated
A-->>C: Allow access
C-->>U: Show protected content
else Session invalid
S-->>A: Not authenticated
A-->>C: Deny access
C-->>U: Redirect to login
end
- Laravel 5.4 - PHP web framework
- PHP >= 5.6.4 - Server-side language
- Composer - Dependency management
- SQLite (development) / MySQL (production) - Database
- Blade - Server-side templating engine
- Laravel Dusk - Browser automation testing
- Laravel Mix - Asset compilation
- Bootstrap - Frontend framework
erDiagram
BusinessOwner ||--o{ Employee : manages
BusinessOwner ||--o{ Activity : defines
BusinessOwner ||--o{ BusinessTime : sets
Employee ||--o{ WorkingTime : has
Employee ||--o{ Booking : handles
Customer ||--o{ Booking : creates
Activity ||--o{ Booking : includes
BusinessOwner {
int id PK
string name
string email
string phone
string business_name
timestamp created_at
}
Employee {
int id PK
int business_owner_id FK
string name
string email
string phone
timestamp created_at
}
Customer {
int id PK
string name
string email
string phone
timestamp created_at
}
Booking {
int id PK
int customer_id FK
int employee_id FK
int activity_id FK
datetime start_time
datetime end_time
string status
timestamp created_at
}
Activity {
int id PK
int business_owner_id FK
string name
text description
int duration_minutes
decimal price
}
WorkingTime {
int id PK
int employee_id FK
int day_of_week
time start_time
time end_time
}
BusinessTime {
int id PK
int business_owner_id FK
int day_of_week
time start_time
time end_time
}
graph TB
subgraph "Frontend Layer"
A[Customer Interface]
B[Business Owner Dashboard]
C[Shared Components]
end
subgraph "Application Layer"
D[Controllers]
E[Middleware]
F[Authentication]
end
subgraph "Business Logic"
G[Models]
H[Helpers]
I[Booking Logic]
end
subgraph "Data Layer"
J[(SQLite/MySQL)]
K[Migrations]
L[Seeders]
end
A --> D
B --> D
C --> D
D --> E
E --> F
D --> G
G --> H
G --> I
G --> J
K --> J
L --> J
- Custom dual authentication system
- Calendar-based scheduling interface
- Automated time conflict detection
- Employee availability matching
- Custom helper system for common utilities
The fastest way to get started is using the pre-configured Dev Container that includes all dependencies.
-
Clone and open in VS Code
git clone <repository-url> cd laravel-appointment-booking-system code .
-
Open in Dev Container
- VS Code will detect the Dev Container configuration
- Click "Reopen in Container" when prompted
- Or use Command Palette:
Dev Containers: Reopen in Container
-
Automatic setup
- The container will automatically:
- Install PHP 7.4, Composer, Node.js 16
- Install all PHP and Node.js dependencies
- Create and configure
.envfile - Generate application key
- Set up SQLite database
- Compile frontend assets
- Configure Apache web server
- The container will automatically:
-
Start the application
php artisan serve
-
Visit your application
Open http://localhost:8000 in your browser
- ✅ Pre-configured PHP 7.4 with all required extensions
- ✅ Laravel-optimized VS Code extensions
- ✅ Automatic dependency installation
- ✅ Database migration and seeding
- ✅ Asset compilation
- ✅ Testing environment (PHPUnit & Dusk)
- ✅ Apache web server configuration
If you prefer to set up the environment manually:
-
Clone and setup
git clone <repository-url> cd laravel-appointment-booking-system cp .env.example .env
-
Install dependencies
composer install yarn install
-
Configure database
Update your
.envfile:DB_DATABASE=/path/to/project/database/dev.database.sqlite
-
Generate application key
php artisan key:generate
-
Start development server
php artisan serve
-
Visit your application
Open http://localhost:8000 in your browser
flowchart TD
A[Customer visits booking page] --> B{User authenticated?}
B -->|No| C[Redirect to login]
B -->|Yes| D[Select activity/service]
C --> E[Customer login/register]
E --> D
D --> F[Choose employee]
F --> G[Select date and time]
G --> H[System checks availability]
H --> I{Time slot available?}
I -->|No| J[Show alternative times]
J --> G
I -->|Yes| K[Display booking summary]
K --> L[Customer confirms booking]
L --> M[Create booking record]
M --> N[Update employee schedule]
N --> O[Send confirmation]
O --> P[Booking complete]
subgraph "Validation Logic"
Q[Check employee working hours]
R[Check business operating hours]
S[Check existing bookings]
T[Validate activity duration]
end
H --> Q
Q --> R
R --> S
S --> T
T --> I
yarn dev # Compile assets for development
yarn watch # Watch files and recompile on changes
yarn production # Compile optimized assets for production# Unit and Integration Tests
vendor/bin/phpunit
# or
./unit.bat
# Browser Tests (Laravel Dusk)
php artisan duskThe application uses SQLite for development. The database file is located at:
database/dev.database.sqlite
For production deployments, configure MySQL in your .env file.
app/
├── Http/Controllers/ # Application controllers
├── Helpers/ # Custom utility helpers
├── *.php # Eloquent models
resources/
├── views/
│ ├── admin/ # Business owner interface
│ ├── customer/ # Customer interface
│ └── shared/ # Reusable components
database/
├── migrations/ # Database schema
└── seeds/ # Test data
tests/
├── Browser/ # Dusk browser tests
├── Integration/ # Integration tests
└── Unit/ # Unit tests
- Configure
.envfor production environment - Set up MySQL database
- Run
composer install --optimize-autoloader --no-dev - Run
yarn production - Configure web server (Apache/Nginx)
Application key error:
php artisan key:generateDatabase connection issues:
- Verify database file path in
.env - Ensure PHP SQLite extension is enabled
- Check file permissions on database directory
Asset compilation errors:
yarn install
yarn devMySQL PDO extension missing:
Enable in php.ini:
extension=pdo_mysqlThis project welcomes contributions. Please ensure:
- Follow Laravel coding standards
- Write tests for new features
- Update documentation as needed
- Johnny Huynh - Project maintainer and modernization
- Historical Contributors - Lachlan Porter, Craig Barry, Jarry Chen
MIT License - see LICENSE file for details