Shift Manager Tool: a showcase
There was a time...
A long time ago, lots of events were happening in a galaxy far far away.
Those events required an active support force, ready to act against whatever issue or request an event and its clients would encounter during its unrolling.
There were managers, which had to assign and manage this workforce. Their job was to keep track of those events while keeping the workforce aligned and split in shifts.
If the story were to end here, we wouldn't have a story at all.
BUT those events had a bad idea of changing their dates, their times, their details...
and the managers had to check constantly them, to manually search for their hidden and crucial changes, to manually update their old and rusty Tables of the Holy Excel Staff Shifts Law while making sure that all their staff is notified and aligned on the shift updates...
Those were hard and dark times, until...
Intro
Between 2018 and 2020, I worked as web support on live events coverage. We were a team of around 12 people and we only had a manager.
My boss had to spend a lot of time on our shifts organization. His activities were:
- checking if any new events were scheduled
- checking if those actually required a staff coverage
- manually reviewing already existing events, to search for any updates that required a shift update or a shift delete
- keeping staff updated on their shifts and their timings
- retrieving their availability
- collecting each staff answer for each assignation
His entire job was done with only the help of an Excel sheet, mails, and auto-managed private messaging chats, and... the events JSON-XML endpoints exposed by each project he managed.
It was really strange to see someone in 202X still going full-manual on such time-consuming tasks, like keeping track of hundreds of events with no tool or automation system.
When I became a dev in the same company I worked for as web support, one of the first goals I was given was to create a potential new company tool.
When I was collecting ideas for the tool, my old manager @Nicholas De Pasquale came by and threw out the idea:
"Why don't we create a tool to manage shifts and staff? You know what the staff need, I know what the managers need, mix 'em up and we're good to go!"
The mission
We had a clear mission ahead of us: we wanted to create a small system that could help a manager manage his workforce while leaving most of the "boilerplate work" to automatic procedures.
Boilerplate work is everything that doesn't require a managerial choice at its base.
Examples? Checking an event endpoint and searching for any event update. Creating a shift entity from the list of existing events. We wanted to leverage these annoyances to leave to the managers only the burden of assigning the staff...
I and @Nicholas worked hard for more than a year to create this system. We defined some requirements beforehand:
- staff should be assigned to shifts freely by the manager: he would have been able to decide their start date, their end, their role, and so on, without any particular constraint set from the tool;
- events should heavily rely on import automatization; the tool should use endpoints and data provided by the client to create and retrieve events without manual requirements;
- managers shouldn't need to create a shift because shifts should be created from the tool based on the events received; this would have meant to invert the usual flow! You don't bother anymore on shifts, you only insert/import the events and the shifts will be automatically prepared from these.
- shifts should group together events with the same start day and the same assignations rule (the manager defines this rule to identify the coverage level that an event requires);
- a manager should have easy access to exported data, to get a helping hand when doing budget plannings and cost review.
All this combined went to become part of the first beta version; after that time, many other went by, many changes and improvements were done until recently when we reached the first major release.
In these months we never stopped visualizing new chances to improve the requirements. As of today, we added loads more - let me give some examples:
- the chance to assign a member to a selection of events from its shift
- the location where the staff member will work
- the freedom for the staff member to insert the actual shift timings he performed
- easy events manipulation UI, to give complete freedom to the manager to use automatization or support exceptional needs
- different dashboards for data visualization (shift view, staff comparison, excel-style view...)
- calendar export service, for easier integration with an external calendar
Let's see some action!
Let me show you some juice on the tool potentialities, it will be way more interesting than other words! (Hover or click onto the images to read the captions)
- Check and perform shift assignments
- Check and compare staff workload.
- Staff View
- Importing your data.
- Exporting your data
It will let you easily understand every team member status and improve shift equality
With the automatic import, perform a massive import based on your project endpoints. Note that every day the import will be run in the background, to let you keep your project aligned with its events without any manual intervention! With the manual event creation, you add, insert, delete any extra events not mapped in available endpoints; if you miss endpoints or you want complete freedom on your events management, you can use it as much as you like to manually manage events!
Tech Stack
- built on top of ASP .NET Core backend, over 3 separate projects:
- an OAuth2.0 IdentityServer4 server, to manage authorization & authentication
- the API layer
- the client UI for end-user interaction
- mongoDB is the application database, accessible only through the exposed API layer. It's hosted as a replica set DB, to enable transactions activity and preserve data integrity;
- API project hosts all the admitted data interactions. It's developed to implement the CQRS pattern; every endpoint is protected by a role-based authorization, to have granular endpoints protection. It uses
- Serilog as the logging system
- Hangfire to manage background jobs (mainly it helps to implement a reliable mail system, enterprise-safe)
- ElmahCore to catch and log any unhandled exception
Tests are written with xUnit and the awesome FluentAssertion. Integration tests use Mongo2Go, a great project to create ephemeral & separate mongod instances on the run for each test. - a client application is written entirely in Typescript. The front-end is made with React + Redux (while being hosted on top of the ASP .NET Core MVC project). Webpack with Babel is the bundler choice.Tests are written with Jest and wonderful Testing Library
- documentation is hosted as part of the front-end, as a separate React application. It explains the tool, its functionalities, tips, and tricks. It contains a separate dev section on how to build, contribute, develop and maintain the project.
- the tool runs on Docker containers, exposed through a Kubernetes cluster
- CI/CD pipelines are hosted on Azure DevOps repository
- Versioning increases are automatic upon pull-request merge to master; those are based on the merged branch name, following semantic versioning structure (hotfix, feature, etc...)
Contacts & Greetings
If you made it this far, kudos to you!
I and @Nicholas are really happy if you found the shift manager tool interesting!
We'd love to hear any ideas, doubts, questions that sparkled after reading this showcase. Feel free to write us or in the comment section or with any other contacts you find in the footer.
If you're interested in the tool, you'd like to have a casual chat on it, you'd like to discuss any aspect of it... we're always open, just send a message to one of us and we'll get back to you asap :)
Thanks again for the interest... bye-bye, until the next time!