# Canaccom Travel Group Platform - Product Requirements Document

## 1. Project Overview

### 1.1 Purpose
The Canaccom Travel Group Platform is a centralized SaaS system designed to streamline group travel logistics, primarily for sports teams and events. It replaces the current spreadsheet/email-based workflow with a secure, web-based portal accessible by Canaccom staff, clients (team organizers), and hotels.

### 1.2 Target Users
- **Canaccom Staff (Admin)**: Full system access for booking management
- **Team Organizers (Clients)**: Access to their bookings and rooming lists
- **Hotels**: Confirmation and stay verification interface

## 2. Functional Requirements

### 2.1 Admin Portal
#### 2.1.1 Booking Management
- Create, view, edit, and delete bookings
- Track booking status (Draft, Hotel Confirmed, Client Input, Completed)
- Manage hotel and client information
- Generate reports and analytics

#### 2.1.2 Communication Management
- Send automated emails to hotels and clients
- Track email communication history
- Manage email templates
- Handle document attachments (Code of Conduct, etc.)

#### 2.1.3 System Administration
- Manage user accounts and permissions
- Configure hotel templates and rates
- Monitor system activity and logs
- Generate invoices and financial reports

### 2.2 Client Portal
#### 2.2.1 Booking Access
- View assigned bookings and details
- Access hotel information and rates
- Download relevant documents

#### 2.2.2 Rooming List Management
- Add/edit guest information
- Assign room types and preferences
- Submit rooming list securely
- Track submission status

### 2.3 Hotel Portal
#### 2.3.1 Confirmation Interface
- Receive booking confirmation requests
- Submit contract details and rates
- Confirm availability and amenities
- Set deadlines and special requirements

#### 2.3.2 Stay Verification
- Receive stay confirmation forms
- Report actual room usage
- Confirm guest counts and charges
- Submit final documentation

## 3. Technical Requirements

### 3.1 Technology Stack
- **Backend**: PHP 8.0+
- **Database**: MySQL (AWS RDS)
- **Frontend**: HTML5, CSS3, JavaScript, Bootstrap 5
- **Hosting**: AWS EC2 with Apache
- **Email**: AWS SES
- **Security**: HTTPS, encrypted data transmission

### 3.2 Database Schema
#### Core Tables
- `bookings` - Main booking records with historical data preservation
- `booking_rooms` - Individual rooms with flexible pricing
- `room_guests` - Guest assignments with payment information
- `hotels` - Hotel information and templates
- `teams` - Team organizer information (renamed from clients)
- `users` - System user accounts
- `booking_communications` - Comprehensive communication tracking
- `communication_attachments` - File attachments for communications
- `booking_documents` - Document management with approval workflow
- `invoices` - Complete invoicing system
- `invoice_items` - Line items for invoices
- `booking_commissions` - Commission tracking and payment
- `hotel_confirmations` - Detailed confirmation history
- `communication_templates` - Email and communication templates
- `file_storage_config` - File storage configuration

#### Key Features
- **Historical Data Preservation**: Contact information captured at booking time
- **Flexible Room Pricing**: Individual room rates and categories
- **Comprehensive Communication Tracking**: All interactions with teams and hotels
- **Document Management**: File uploads with approval workflows
- **Invoicing System**: Hotel, client, and commission invoices
- **Hotel Confirmation Tracking**: Booking and room-level confirmations

### 3.3 Security Requirements
- Role-based access control
- Encrypted data transmission
- Secure file uploads
- Audit logging
- Session management
- Input validation and sanitization

## 4. User Interface Requirements

### 4.1 Design Principles
- Clean, professional appearance
- Mobile-responsive design
- Intuitive navigation
- Consistent branding
- Accessibility compliance

### 4.2 Global Components
- Header with navigation and user info
- Footer with links and contact info
- Sidebar navigation (admin)
- Breadcrumb navigation
- Alert/notification system

### 4.3 Responsive Design
- Desktop (1200px+)
- Tablet (768px - 1199px)
- Mobile (320px - 767px)

## 5. Workflow Requirements

### 5.1 Booking Lifecycle
1. **Booking Creation** (Admin)
   - Enter group and event details
   - Assign hotel and contact information
   - Set dates and requirements

2. **Hotel Confirmation** (Hotel)
   - Receive confirmation request
   - Submit contract details
   - Confirm rates and availability

3. **Client Input** (Client)
   - Access booking details
   - Submit rooming list
   - Confirm guest information

4. **Stay Completion** (Admin/Hotel)
   - Send stay confirmation to hotel
   - Receive actual usage data
   - Generate commission invoice

### 5.2 Email Automation
- Booking confirmation requests
- Rooming list submissions
- Stay confirmation forms
- Invoice generation
- Document delivery

## 6. Performance Requirements

### 6.1 Response Times
- Page load: < 3 seconds
- Database queries: < 1 second
- Email delivery: < 30 seconds

### 6.2 Scalability
- Support 100+ concurrent users
- Handle 1000+ bookings annually
- Process 500+ emails daily

## 7. Integration Requirements

### 7.1 AWS Services
- EC2 for hosting
- RDS for database
- SES for email
- S3 for file storage (optional)

### 7.2 External Services
- Cloudflare for DNS and CDN
- SSL certificate management
- Backup and monitoring services

## 8. Testing Requirements

### 8.1 Testing Strategy
- Unit testing for core functions
- Integration testing for workflows
- User acceptance testing
- Security testing
- Performance testing

### 8.2 Quality Assurance
- Code review process
- Automated testing
- Manual testing checklist
- Bug tracking and resolution

## 9. Deployment Requirements

### 9.1 Environment Setup
- Development environment
- Staging environment
- Production environment
- Database migration scripts

### 9.2 Monitoring and Maintenance
- Error logging and monitoring
- Performance monitoring
- Regular backups
- Security updates

## 10. Success Metrics

### 10.1 Business Metrics
- Reduced booking processing time
- Improved client satisfaction
- Increased booking volume
- Reduced manual errors

### 10.2 Technical Metrics
- System uptime > 99.5%
- Page load performance
- Email delivery success rate
- Security incident rate

## 11. Future Enhancements

### 11.1 Phase 2 Features
- Mobile app development
- Advanced reporting and analytics
- Payment processing integration
- API for third-party integrations

### 11.2 Long-term Vision
- Multi-language support
- Advanced automation features
- AI-powered booking optimization
- Integration with travel industry APIs 