Build a Weekly Staff Shift Rota Builder in HTML

Create an interactive weekly shift rota in one HTML file that totals staff hours, flags overtime, and alerts you to daily coverage gaps.

Text prompt for ChatGPT and Claude

You get: one complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior front-end developer building a practical operations tool. Build the Harborline Roasters Weekly Shift Rota, a single-page HTML application that lets managers assign shifts across a 7-day grid, automatically total weekly hours per person, and flag understaffed coverage gaps.

Include these specific features and rules:
1. Load with 6 realistic sample staff members and pre-filled shifts for Monday through Sunday, plus a Reset sample button that restores the default schedule in memory.
2. Let managers click any day cell to cycle through Off, Morning 8h, Mid 8h, and Evening 8h shifts, and allow adding or removing staff rows without using any form tags.
3. Calculate weekly hours per person automatically, flagging anyone over 40 hours, and display a daily coverage row that compares scheduled staff against an adjustable minimum daily target.
4. Show a top summary bar with total scheduled hours, active coverage gaps, and overtime count, plus a short How this is calculated note.
5. Use a clean, high-contrast slate and amber palette with responsive horizontal scrolling on narrow 360px screens and full keyboard accessibility.
6. Keep all state in memory with no external libraries, no localStorage, and no alert dialogs.

Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen (opens in a new tab)

Example: Harborline Roasters Weekly Shift Rota, an interactive 7-day staff scheduling grid.

Click any day cell to cycle through Off, Morning (8h), Mid (8h), and Evening (8h) shifts. Weekly totals update live, highlighting staff over 40 hours in amber and flagging days below your minimum coverage target in red. Use Add staff to grow the team or Reset sample to restore the default week.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Pre-loads 6 realistic staff members and shifts so the coverage alerts and hour totals are immediately testable.
  • Uses a single-click cell cycle instead of complex dropdowns, making weekly scheduling fast on both desktop and touchscreens.
  • Keeps all state in memory with an IIFE wrapper, ensuring zero external dependencies or sandbox storage errors.

Paste the prompt into ChatGPT, Claude, or Gemini. Save the generated code as an .html file and open it in any browser, or preview it directly in Canvas or Artifacts.

Common edits

  • Add browser localStorage persistence so managers can close the tab and keep their weekly rota saved.
  • Add a CSV export button to download the completed weekly schedule for payroll or team sharing.

Reuse it: Use in a workflowTurn into a skillAdapt in the builder

Mini Apps & Tools

Build a Kanban Board with WIP Limits and Drag-and-Drop in HTML

Get a single-file HTML kanban board with configurable WIP limits, live card counts, drag-and-drop, and keyboard-accessible card movement.

Mini Apps & Tools

Build a Contractor Quote and Estimate Builder in HTML

A single-file contractor quote builder that separates labour and materials with adjustable markup, tax, deposit calculation, and a clean print view.

Mini Apps & Tools

Build a Distributed Team Time-Zone Meeting Planner in One HTML File

A single-file time-zone meeting planner with a 24-hour overlap grid, fair working-hour highlights, and one-click copy of proposed slots.

Mini Apps & Tools

Build a Unit Economics Calculator for CAC, LTV, and Payback

Create a single-file unit economics calculator with interactive sliders, live CAC and LTV formulas, payback months, and a plain-language health verdict.

Mini Apps & Tools

Build an Email Signature Generator With Three Layouts in HTML

Create a self-contained email signature builder with three switchable layouts, live preview, and inline-styled table HTML ready to copy.

Mini Apps & Tools

Build an OKR Progress Tracker with Confidence Scores in One HTML File

A self-contained HTML OKR tracker with weighted key-result sliders, color-coded confidence badges, and a live overall attainment score.