Skip to content

Sabbir345/fluent-shiftflow

Repository files navigation

Fluent ShiftFlow

ShiftFlow is an internal tool that helps support teams manage shifts, leave, and real-time availability in one place. With flexible shift settings and built-in analytics, it removes manual coordination, improves coverage visibility, and helps teams operate smoothly every day.

Short Description

ShiftFlow is an internal tool that helps support teams manage shifts, leave, and real-time availability in one place. With flexible shift settings and built-in analytics, it removes manual coordination, improves coverage visibility, and helps teams operate smoothly every day.

Problem Statement

Support teams often struggle to track who is on which shift, who is on leave, and who is covering when someone is unavailable. This information is usually managed through spreadsheets, chat messages, or ad-hoc updates, leading to confusion, missed handovers, delayed responses, and uneven workload distribution. Managers also lack visibility into shift performance and coverage trends.

Solution Overview

ShiftFlow provides a centralized system to define shift rules, manage leave, and monitor availability in real time.

It offers:

  • Shift Settings – Create teams, define shift schedules, rotations, time zones, and coverage rules
  • Leave Management – Team members can mark leave or unavailability with approval flows
  • Auto Coverage Handling – Automatically suggests or assigns coverage when someone is unavailable
  • Live "Who's On Now" Dashboard – Real-time view of active shifts, backups, and availability
  • Notifications – Daily shift reminders and instant alerts for changes
  • Analytics – Insights into coverage gaps, workload distribution, leave patterns, and shift balance

This ensures clarity, accountability, and better operational decision-making without manual follow-ups.

Target Users

  • Support team members
  • Support managers
  • Operations teams

Features

Shift Settings

  • Create teams and define shift schedules
  • Configure shift rotations and time zones
  • Set up coverage rules for automatic assignment
  • Auto-assign shifts with fair rotation logic
  • Assign shifts for date ranges
  • Edit existing shift assignments

Leave Management

  • Team members can request leave with approval flows
  • Managers can approve or reject leave requests
  • Automatic coverage assignment when leave is approved

Auto Coverage Handling

  • Automatically suggests coverage when someone is unavailable
  • Assigns backup users based on team availability
  • Manual coverage assignment for approved leave requests
  • Tracks coverage assignments and status

Live "Assigned Staff" Dashboard (formerly "Who's On Now")

  • Real-time view of active shifts
  • Current team members on shift
  • Backup assignments and coverage status
  • Filter by team and date range
  • Edit and remove shift assignments
  • View user email addresses

Analytics

  • Coverage gap analysis
  • Workload distribution insights
  • Leave pattern tracking
  • Shift balance metrics
  • Total coverages (auto and manual)
  • User workload statistics

Dashboard

  • Recent activities feed
  • Active shifts overview
  • Quick statistics

Demo Plan

  • Team and shift setup using shift settings
  • Auto-assign shifts with fair rotation for date ranges
  • Leave request and approval flow
  • Automatic and manual coverage assignment
  • Live "Assigned Staff" dashboard with filters
  • Edit and manage shift assignments
  • Analytics view (coverage trends, workload balance)
  • Recent activities feed on dashboard

Installation

  1. Upload the plugin to /wp-content/plugins/fluent-shiftflow
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Run composer install to install PHP dependencies
  4. Run npm install to install frontend dependencies
  5. Run npm run production to build frontend assets
  6. Navigate to ShiftFlow menu in WordPress admin

Development

PHP Dependencies

composer install

Frontend Dependencies

npm install

Build Assets

# Development
npm run dev

# Watch mode
npm run watch

# Production
npm run production

Architecture

The plugin follows the WPFluent framework architecture:

  • app/: Core application code
    • Models/: Database models (Team, Shift, LeaveRequest, Coverage, etc.)
    • Http/Controllers/: REST API controllers
    • Services/: Business logic services
    • Hooks/: WordPress hooks and handlers
  • boot/: Bootstrap files
  • config/: Configuration files
  • database/: Database migrations
  • resources/: Frontend Vue.js application
  • assets/: Compiled frontend assets

Database Schema

The plugin creates the following database tables:

  • fsf_teams: Team information
  • fsf_team_members: Team membership
  • fsf_shifts: Shift definitions
  • fsf_shift_schedules: Scheduled shifts (includes backup_user_id, removed_due_to_leave, leave_request_id)
  • fsf_leave_requests: Leave requests
  • fsf_coverages: Coverage assignments
  • fsf_member_statistics: Member statistics and workload tracking

API Endpoints

All API endpoints are available under /wp-json/fluent-shiftflow/v1/:

Teams

  • GET /teams - List all teams
  • POST /teams - Create a team
  • GET /teams/{id} - Get team details
  • PUT /teams/{id} - Update team
  • DELETE /teams/{id} - Delete team

Team Members

  • GET /team-members - List team members (supports team_id, status filters)
  • POST /team-members - Add team member
  • PUT /team-members/{id} - Update team member
  • DELETE /team-members/{id} - Remove team member

Shifts

  • GET /shifts - List shifts (supports team_id filter)
  • POST /shifts - Create or update shift
  • PUT /shifts/{id} - Update shift

Shift Assignment

  • POST /shift-assignment/assign - Assign shift for a single date
  • POST /shift-assignment/assign-range - Assign shifts for a date range with fair rotation

Schedules

  • GET /schedules - List schedules (supports date, start_date, end_date, user_id, team_id, include_cancelled filters)
  • POST /schedules - Create schedule
  • PUT /schedules/{id} - Update schedule (edit user, shift, date, backup user)
  • DELETE /schedules/{id} - Delete schedule

Leave Requests

  • GET /leave - List leave requests (supports status, user_id filters)
  • POST /leave - Create leave request
  • POST /leave/{id}/approve - Approve or reject leave request

Coverage

  • GET /coverage - List coverages (supports date filter)
  • POST /coverage - Create coverage assignment

Who's On / Assigned Staff

  • GET /whos-on - Get current active shifts

Analytics

  • GET /analytics/coverage - Get coverage analytics (supports start_date, end_date, team_id filters)
  • GET /analytics/workload - Get workload distribution (supports start_date, end_date, team_id filters)

Statistics

  • GET /statistics/member - Get member statistics (supports user_id, team_id filters)
  • GET /statistics/team/{team_id} - Get team statistics
  • POST /statistics/recalculate - Recalculate statistics (requires user_id, team_id)

Activities

  • GET /activities - Get recent activities (shift assignments, leave requests, coverage assignments)

Users

  • GET /users - List WordPress users (supports search, role, number filters)

License

GPLv2 or later

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors