Featured Case Study

Casino Holiday Booking System

A constraint-optimised holiday booking system for shift-based businesses. Staff see a traffic-light hint before they submit a request, and the underlying solver guarantees mathematical fairness across the team. Built end-to-end as iOS staff app, iPad manager app, Rust API and Python OR-Tools solver — deployed on AWS Lightsail and validated with a 15-participant user study.

0.94
Jain Fairness Index
114
Staff Modelled
<1s
Solver Response
SUS 79
Usability Score
Why this exists

The Problem

The pain in shift-work businesses

In casinos, hotels, restaurants, hospitals and any business that runs on shifts, holiday booking is broken in the same way:

  • Staff submit requests blind — no idea if the date is realistic
  • Managers approve the requests they see first; later requests get refused
  • Senior staff quietly take the best dates year after year
  • Nobody trusts the process; complaints land in HR every December

What this system changes

The system flips the order. Decisions are made by the algorithm first, then surfaced to the manager for sign-off — with a measurable fairness score the manager can defend.

  • Staff see a green / amber / red hint per date before requesting
  • The solver respects minimum-staffing, blackouts and per-week caps
  • Jain's Fairness Index ≥ 0.9 enforced across the department
  • Every approval / rejection is logged with manager justification
The headline visuals

Traffic Light + Live Fairness

Two screens carry most of the unique value. The staff calendar shows colour-coded availability per day so requests are informed before they're sent. The manager fairness view shows a live Jain's Fairness Index for the department — the same number a tribunal would calculate.

Staff iPhone app showing a calendar where each day has a green, amber or red background indicating booking probability, plus a holiday allowance breakdown of available, pending, used and total days.
Staff app — traffic-light calendar
Manager iPad fairness analytics screen showing a 90.7% Jain's Fairness Index ring chart, target threshold met, with a list of staff allocations and percentages of leave entitlement used.
Manager iPad — Jain's Fairness Index analytics
Outcomes

Measured Results

All numbers below come from automated tests and a 15-participant user study run as part of the project's evaluation phase.

Algorithmic Fairness
0.94
Jain's Fairness Index across 114 modelled staff. Anything ≥ 0.9 is industry-acceptable; 1.0 is theoretical perfection.
Solver Latency
< 1s
CP-SAT response time on full department workload. Calendar availability checks complete in well under one second.
Validation Scale
1 000
Iterations of fairness simulation and 500 traffic-light scenarios run as part of automated evaluation.
Usability (SUS)
79
Above the 68 industry-average threshold. Average request submission time under 90 seconds.
How it's built

System Architecture

Three tiers: a presentation layer (two SwiftUI apps), an application layer (Rust API + Python solver behind nginx), and a MySQL data layer. Deployed on a single AWS Lightsail instance in EU-West-2. JWT auth with refresh-token rotation. Every state change writes to the audit table.

Casino Holiday Booking System — System Architecture
Tier 1 — Presentation Layer
Staff iOS Application
iPhone
Swift + SwiftUI
iOS 26 · Calendar, booking, stats
Manager iPad Application
iPad
Swift + SwiftUI
iPadOS 26 · Approvals, analytics, audit
HTTPS / REST
Tier 2 — Application Layer
AWS Lightsail · EU-West-2 · London
Nginx Reverse Proxy
Gateway
TLS termination · Reverse proxy
api.mp-code.com:443 → localhost:8080
Internal HTTP :8080
Rust Backend API
Core
Actix-web framework
27 REST endpoints · sqlx driver · localhost:8080
OR-Tools CP-SAT
Solver
Python 3.13 subprocess
Fairness optimisation · JFI calculation
JSON in
← →
JSON out
JWT Middleware
Auth
JWT authentication (HS256)
24h access tokens · 30d refresh · token rotation
SQL Queries (sqlx + rust_decimal)
Tier 3 — Data Layer
MySQL 8.0 Database
Storage
fyp_casino_holidays
12 tables · 3 views · Private AWS instance · Audit trail with manager justifications
Swift 6 / SwiftUI iOS 26 + iPadOS 26 Rust 1.92 Actix-web 4 Python 3.12 Google OR-Tools (CP-SAT) MySQL 8 AWS Lightsail (London) JWT (HS256) nginx
Tour

App Walkthrough

A small selection of screens from each app. Staff side focuses on transparency before submission; manager side focuses on defensible decisions and audit.

Adapting it

Could This Work for Your Business?

The fairness algorithm and the architecture are not casino-specific. The same model fits any business with shift-based staff, peak seasons and a recurring fairness complaint.

Strong fit

  • Casinos & gaming floors
  • Hotels & hospitality groups
  • Restaurants & pubs with rotational staff
  • NHS bank staff and care providers
  • Security firms with peak coverage demand
  • Manufacturing with line-staffing minimums

What an adaptation typically needs

  • Rebrand from "casino" to your business language (1–2 weeks)
  • Shape the constraints to your departments & rules
  • Bulk staff import + onboarding wizard
  • Optional: Android app via Flutter for shared codebase
  • Optional: web admin alongside iPad
  • GDPR / DPA documents for staff data handling
Note: the source code is a private intellectual-property asset and is not part of any portfolio download. Adaptations are delivered as bespoke installs with managed hosting, not as open source.

Want something like this for your business?

If you run a shift-based business and your holiday booking is causing the same pains described above, get in touch. I deliver bespoke installs with managed hosting — typically £1–3k setup plus monthly retainer, depending on integrations.