A web-based patrol rostering system for Galway's water safety volunteers
About • Features • Tech Stack • Getting Started • Project Structure • API
CladdaghWatch is a modern web application designed to streamline patrol scheduling and volunteer management for CladdaghWatch, a Galway-based voluntary organization dedicated to water safety and suicide prevention through river and waterway patrols.
The system enables operations managers to create patrol schedules, supervisors to lead teams, and volunteers to sign up for available shifts—all through an intuitive, role-based interface.
📍 Organization: CladdaghWatch.ie
- Admin: Full system control, user management, global oversight
- Manager: Create patrol schedules, release rosters, manage volunteer availability
- Supervisor: Lead patrol teams, coordinate volunteer assignments
- Volunteer: View available patrols, sign up for shifts, receive confirmations
- Create and manage patrol schedules with date validation (prevents past dates)
- Prevent duplicate patrols on the same date
- Set time slots, descriptions, and supervisor assignments
- Schedule workflow: Draft → Released → Finalized/Postponed
- User registration and role-based onboarding
- View available patrol dates and sign up for shifts
- Automatic confirmation emails upon assignment
- Roster management with volunteer limit controls
- Volunteer assignment confirmations
- Patrol postponement alerts
- Volunteer recruitment reminders
- User registration notifications
- JWT-based authentication (HS256 HMAC-SHA256)
- "Remember me" functionality (7-day token retention)
- Password hashing with bcrypt (legacy SHA-256 support)
- Session security with httpOnly cookies
- Mobile-first UI built with Tailwind CSS
- Modern, accessible interface for all user roles
- Real-time volunteer roster updates
- Framework: Laravel 12.0 — PHP 8.2+
- Database: MySQL/MariaDB
- ORM: Eloquent
- Email: Laravel Mail with Mailable classes
- Authentication: Custom JWT implementation
- Testing: Pest 3.8
- Server: Apache (XAMPP compatible)
- Build Tool: Vite 7.0.7
- CSS: Tailwind CSS 4.0.0
- HTTP Client: Axios 1.11.0
- Runtime: Node.js
- Development: XAMPP (Apache + MySQL)
- Package Management: Composer (PHP), npm (JavaScript)
- Deployment: Docker-ready with Laravel Sail
- PHP 8.2 or higher
- Node.js 18+ with npm
- Composer 2.0+
- MySQL 8.0+ (or MariaDB)
- XAMPP (recommended for local development)
- Git
git clone https://github.com/your-org/claddaghwatch.git
cd claddaghwatchcomposer installnpm install# Copy the example environment file
cp .env.example .env
# Generate application key
php artisan key:generateUpdate your .env file with database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cwp_roster
DB_USERNAME=root
DB_PASSWORD=Note: For complete database setup, schema details, and migration instructions, see DATABASE_SETUP.md.
Terminal 1 - Start the Laravel server:
php artisan serveServer runs at: http://localhost:8000
Terminal 2 - Start the frontend build server:
npm run devOptional - Start queue listener (for email processing):
php artisan queue:listenUse the following credentials to test the application (included in sample data):
- Email:
gerryguinane@claddaghwatch.ie - Password:
Password1 - Role: Manager
claddaghwatch/
├── Group-2-Project/ # Main Laravel application
│ ├── app/
│ │ ├── Http/
│ │ │ ├── Controllers/ # Request handlers
│ │ │ └── Middleware/ # JWT, security, auth checks
│ │ ├── Models/ # Eloquent models (User, Schedule)
│ │ ├── Mail/ # Email notification classes
│ │ └── Helpers/ # JwtHelper for token management
│ ├── routes/
│ │ ├── api.php # REST API endpoints
│ │ ├── web.php # Web application routes
│ │ └── console.php # Artisan commands
│ ├── database/
│ │ ├── migrations/ # Database schema changes
│ │ ├── seeders/ # Sample data seeding
│ │ └── sql/ # Raw SQL scripts
│ ├── resources/
│ │ ├── views/ # Blade templates
│ │ ├── js/ # Vue/JavaScript components
│ │ └── css/ # Tailwind/CSS stylesheets
│ ├── public/
│ │ ├── css/ # Compiled stylesheets
│ │ ├── js/ # Compiled JavaScript
│ │ └── images/ # Static assets
│ ├── config/ # Configuration files
│ ├── storage/ # File uploads, logs, cache
│ └── tests/ # Unit and feature tests
├── README.md # This file
├── CladdaghWatch.md # Requirements documentation
└── Sprint-2.md # Sprint 2 information
All API endpoints (except /api/register and /api/login) require a valid JWT token in the request cookie.
Login
POST /api/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password",
"rememberMe": false
}
Response: 200 OK
{
"message": "Login successful",
"token": "eyJ0eXAiOiJKV1QiLCJhbGc..."
}Register
POST /api/register
Content-Type: application/json
{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"password": "secure_password",
"userTypeNr": 3
}Get All Schedules
GET /api/schedulesCreate Schedule
POST /api/schedules
Content-Type: application/json
{
"patrolDate": "2026-04-30",
"patrolDescription": "Regular scheduled patrol",
"superUserNr": 5,
"start_time": "18:00",
"end_time": "20:00"
}Update Schedule
PUT /api/schedules/{id}Delete Schedule
DELETE /api/schedules/{id}Update Schedule Status
PATCH /api/schedules/{id}/status
Content-Type: application/json
{
"status": 1
}Send Email Reminder
POST /api/schedules/{id}/email-reminderList All Active Users
GET /api/usersList Volunteers Only
GET /api/users/volunteersCreate User
POST /api/usersFor complete API documentation, see the route definitions in Group-2-Project/routes/api.php.
The application sends automated emails for:
- VolunteerConfirmation: When assigned to a patrol
- VolunteerPostponed: When a patrol is postponed
- UserCreated: Upon user registration
- RequestVolunteer: Recruitment reminders
Email templates are located in Group-2-Project/resources/mail/.
- ✅ JWT token validation on all protected routes
- ✅ SQL injection prevention middleware
- ✅ Security headers (CORS, X-Frame-Options, etc.)
- ✅ Password hashing with bcrypt
- ✅ Session validation and expiry checks
- ✅ Email validation on registration
- Mobile-responsive UI improvements
- Calendar-based schedule interface
- Volunteer page layout optimization
- Volunteer limit implementation
# Verify MySQL is running
# Check .env database credentials
# Ensure database 'cwp_roster' exists
cd Group-2-Project
php artisan migrate --forcePhase 1 (Current): MVP with core rostering functionality ✅
Phase 2 (Planned):
- Advanced scheduling features
- Mobile app
- SMS notifications
- Volunteer performance analytics
- Improved calendar UI
For issues, questions, or feature requests:
- 📧 Email: support@claddaghwatch.ie
- 🌐 Website: claddaghwatch.ie
- 📍 Organization: CladdaghWatch, Galway, Ireland
CladdaghWatch: Watching Over Galway's Waters 🌊