The Library Instruction System is a Laravel 11 web application designed to streamline the process of scheduling and managing library instruction sessions between faculty and librarians within the Portland Community College network.
- Originally: Laravel 8, Infyom Generator, AdminLTE, Yajra DataTables
- Current: Laravel 11, Livewire 3, Tailwind CSS, Livewire PowerGrid 6.1
- Request viewing and management
- Status updates across multiple states
- File attachments for various document types
- Basic dashboard functionality
- Instruction request creation
- Editing existing requests
- Copying existing requests
- Custom Blade components
- Alpine.js for frontend interactions
- Spatie Media Library for file management
- Standard Laravel authentication
- Faculty submits instruction request
- System creates/links instructor record
- Request enters
received
status - Librarians can:
- View requests
- Assign requests
- Accept requests
- Mark requests complete
- Reject or copy requests
received
: Initial stateassigned
: Librarian assignedaccepted
: Librarian confirmedcompleted
: Session finishedcopied
: Request duplicated
-
InstructionRequests
: Central model- Relates to Instructor
- Relates to Classes
- Relates to Campus
- Associated with
InstructionRequestDetails
-
Instructor
: Faculty representation -
User
: Librarian accounts (manually created)
Supports file collections with the following specifications:
- Plain text (.txt)
- Rich Text Format (.rtf)
- Portable Document Format (.pdf)
- Microsoft Word Documents (.doc, .docx)
- Microsoft PowerPoint Presentations (.ppt, .pptx)
- Maximum file size: 8 MB per file
- File collections:
- Course syllabi
- Instructor attachments
- Teaching materials
- Assessment documents
Provides notifications for:
- Request received
- Request assigned
- Request accepted
- Request rejected
- Standard Laravel authentication
- Manual user creation
- No role-based access control
- Framework: Laravel 11
- PHP Version: 8.2+
- Timezone: America/Los_Angeles
- Date Format: YYYY-MM-DD H:i:s
- Access: Internal VPN network
- PHP 8.2+
- Composer dependencies
- Node.js 18+ for frontend compilation
The application is designed to run in multiple environments:
.env.local
: Local Docker development environment.env.testing
: PCC test server environment.env.production
: PCC production server environment
Use the deployment script to switch between environments:
# Deploy for local development
./deploy.sh local
# Deploy for test server
./deploy.sh testing
# Deploy for production
./deploy.sh production
The deployment script will:
- Copy the appropriate .env file
- Clear application caches
- Create necessary storage directories
- Set up the storage symbolic link
- Set proper file permissions
The file upload system is configured to work across all environments:
-
Required Directories
# These directories must exist for file uploads to work storage/app/public/uploads/temp
-
File Types
- PDF (.pdf)
- Word documents (.doc, .docx)
- PowerPoint presentations (.ppt, .pptx)
- Text files (.txt, .rtf)
-
Size Limits
- Maximum file size: 20MB per file
-
Environment Testing
- Visit
/env-test
in non-production environments to verify configuration
- Visit
The application integrates with Google Calendar to create events for library instruction sessions. This requires proper configuration of Google API credentials and permissions.
- Google API service account credentials
- Domain-wide delegation enabled for the service account
- Impersonation email configured in
.env
file - Calendar IDs configured for each campus
[email protected]
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-credentials.json
The application includes custom Artisan commands for testing Google Calendar integration:
# Test the calendar integration with a complete instruction request
php artisan test:google-calendar-attendees
This command:
- Creates a test instruction request with associated data
- Generates a random event date 7-10 days in the future at 10:00 AM
- Uses the CalendarService to create an event with attendees
- Provides detailed logging for troubleshooting
- Optionally cleans up test data after completion
# Directly test the Google Calendar API for attendee functionality
php artisan diagnose:google-calendar-attendees
This command:
- Bypasses the application services to directly test Google Calendar API
- Creates an event with hardcoded attendees
- Shows detailed configuration and error information
- Helps diagnose issues with impersonation and API permissions
- Provides suggestions for fixing common configuration problems