Arshdeep225615024/feature/shift matching system#385
Open
Arshdeep225615024 wants to merge 3 commits into
Open
Conversation
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






Shift Matching and Invitation System
Overview
This pull request introduces a new intelligent Shift Matching and Invitation System for the SecureShift backend. The feature allows employers to generate ranked guard recommendations for shifts and invite suitable guards through a structured workflow.
The implementation was designed with minimal disruption to the existing shift lifecycle and assignment system.
Features Implemented
Intelligent Shift Matching
Added a new endpoint:
GET /api/v1/shift-matches/:shiftId
The system generates ranked guard recommendations based on:
Suitability Ranking
Replaced simple boolean suitability with ranking levels:
Each guard recommendation also includes:
Conflict Detection
Implemented overlapping shift conflict detection.
The system now identifies:
Conflicting guards receive reduced scores.
Guard Preference System
Added a new
GuardPreferencemodel.Guards can store:
Endpoints added:
Shift Invitation System
Added a new
ShiftInvitationmodel.Employers can invite guards directly from match results.
Endpoint added:
Invitation Management
Guards can:
Endpoints added:
Role-Based Access Control (RBAC)
Added security restrictions:
Swagger Documentation
All new functionality has been documented under:
Swagger documentation includes:
Workflow
Employer creates shift
→ System generates ranked guard matches
→ Employer invites selected guard
→ Guard views invitation
→ Guard accepts/declines invitation
Future Enhancements
Planned future improvements include:
Notes
This implementation was intentionally designed to avoid major modifications to the existing shift creation, application, and assignment workflow, ensuring compatibility with the current backend architecture.