A resource capacity plan for an agency
The screen answers two questions for an agency: who has time in the next eight weeks, and which project the plan will overdraw. Each person is a row and each week a cell with a bar per project and its hours, and under the bars the week in words: grey when it fits, amber over capacity, the free hours when under half. Above the grid sit next week's overload and the project budgets, the hours sold less those logged, against the plan from today on.
By Bohuslav PoláčekChecked
What the screen shows
- Next week's warning: a Notice named after the project that holds most of the overloaded hours, "Portal: next week the plan overdraws people's hours by 11 h", with the person and the hours. The line under it lists the other weeks over capacity: Teresa Newman in week 49, 44 h of 40 h.
- Project budgets: one tile per project. Left is the hours sold less the hours logged, planned is the plan from today on, and the bar fills with the plan over what is left. Amber when the plan will overdraw the budget, red when it is overdrawn already (the Sourdough Bakery's shop, 11 h over). An offer that is not signed yet sits under its project behind a dashed line.
- The grid: the kit's ScheduleGrid, people as rows grouped into the studio team and freelancers, weeks as columns with their bank holidays. Each bar carries the project in its hue, its hours and a thin line for its share of the person's week. Approved time off is hatched; time off still asked for and a reservation for an offer are dashed.
- The week in words: under the bars, "22 of 40 h" in grey when it fits, "51 of 40 h" in amber with the glyph when it is over, the free hours when the plan is under half. Colour never carries the state alone.
- On a phone: below 768px a select picks one person and the grid becomes that person's weeks as a list, each with an Edit button; the budgets follow the weeks. Nothing scrolls sideways.
How a week's capacity is counted
Capacity is never a typed 40. A person's week starts from their weekly hours spread over 8-hour days: 40 h is Monday to Friday, Mark Stone's 32 h is Monday to Thursday. A bank holiday on one of those days takes a day off the week, approved time off takes its share of each day it covers (half a day counts as half), and time off still asked for is drawn dashed but not taken off. A freelancer's capacity is the hours they keep free for the studio that week.
So one holiday costs people differently. Christmas Day on Friday 25 December costs Mark nothing, and New Year's week takes 8 h off him and 16 h off everybody else. Kate Bennett takes the three working days between the two holidays off, so her week 53 reads "Off, all week" and holds no bars.
How full a week is follows one rule as well (loadOf): over 100% warns, from half to full stays quiet, under half says how many hours are free.
What AI tools get wrong here
Asked for a resource planner, a code generator draws a grid of people and weeks with a percentage in every cell, coloured from green to red, and 40 h for everybody. Three things go missing:
- Capacity is a calculation, not a column. Bank holidays, part-time days and approved time off change it week by week. In Meadowstack it is one function in the module's domain that the grid, the phone list, the warning and the assistant all call, so they never disagree by a day.
- Colour belongs to the exception. A week that fits is grey text. Amber and the glyph are kept for a week over capacity and a budget the plan will overdraw, red for a budget already overdrawn. A traffic-light grid makes every cell shout and hides the two that matter.
- A plan is edited where it is read. Planning views in Meadowstack are editors: drag a bar to another week or person, drag its edge to change the hours, quick add in an empty cell, copy a week onto the next, undo from the toast, the same from the keyboard. ScheduleGrid carries the drag, the keyboard and the announcements, so an app never builds them again (planning editor pattern).
The warning comes with a fix
The app's one action that goes the whole way starts from the same warning. The assistant reads the plan and proposes to move 6 h of Luke Hayes's portal week to Philip Reed, a freelancer who keeps those hours free, and the rest into the week after, with the weeks before and after side by side. While the proposal waits, the notice says so. The project lead says yes, the change runs through the capacity api as him, writes one entry in the plan's history, and Luke's bell says his week changed.
Who sees it
The project lead plans everyone, decides on time off and sets what the freelancers keep free. Every member of the studio sees the whole plan read-only and asks for their own time off, and nobody decides on their own request. The client's guest sees nothing of the module, nor the assistant's answer about it. The rules live in one file, asked through can() by the pages and again by the api (permissions). In the same app, each person's hours are logged in the timesheet, and the work itself moves on the task board.
What a person can work in a week
/** What a person can work in a week, and why it is less than usual. */
export function capacityOf(person: PlanPerson, week: string, facts: CapacityFacts): WeekCapacity {
if (person.kind === "freelancer") {
const hours = facts.availability[person.id]?.[week] ?? person.weeklyHours;
return { hours, base: person.weeklyHours, holidays: [], off: 0, pending: 0, requests: [] };
}
const daily = dailyHours(person);
const requests = facts.timeOff.filter(
(request) =>
request.personId === person.id &&
(request.state === "approved" || request.state === "pending") &&
request.from <= addDays(week, 6) &&
request.to >= week,
);
const holidays: WeekCapacity["holidays"] = [];
let off = 0;
let pending = 0;
for (const weekday of person.workdays) {
const day = addDays(week, weekday);
const holiday = holidayName(day);
if (holiday) {
holidays.push({ day, name: holiday });
continue;
}
const share = (state: TimeOff["state"]) =>
Math.min(
1,
requests.filter((request) => request.state === state).reduce((sum, request) => sum + dayShare(request, day), 0),
);
const approved = share("approved");
off += approved * daily;
pending += Math.min(1 - approved, share("pending")) * daily;
}
const base = person.weeklyHours;
return { hours: Math.max(0, base - holidays.length * daily - off), base, holidays, off, pending, requests };Where else the ScheduleGrid runs
| Example app | Modules that render it |
|---|---|
| An app for a packaging and print company | Cutting dies |
| An app for a studio or agency | Capacity |
| An app for a construction company | Crews |
| An app for restaurants and venues | Shifts |
Questions
How is a person's capacity counted for a week?
From their weekly hours spread over their working days. A bank holiday on a working day and approved time off come off, while time off still asked for is shown dashed and not taken. A freelancer's capacity is the hours they keep free for the studio that week.
When does a week turn amber?
When the plan is over the person's capacity for that week. From half to full the week stays grey, and under half it says how many hours are free.
What does a project budget compare?
The hours sold less the hours logged, against the hours planned from today on. The current week counts only for its working days still ahead, so on a Wednesday two fifths of it.
Can the plan be changed on a phone?
Yes, by the project lead. Below 768px a select picks one person, each of their weeks is a short list of bars with an Edit button, and the project budgets follow. Nothing scrolls sideways.
Is the plan on this page a screenshot?
No. It is rendered from the kit's components when this site was built, with the demo's people, holidays and plan on Wednesday 2 December 2026. The live demo opens the same screen with its own today.
Related
- An app for a studio or agencyExample app
- A construction schedule that reads the weatherScreens
- A content calendar for a creator's posts and brand dealsScreens
- Court bookings on a timeline you dragScreens
- A dispatch plan that checks driving hours on every dragScreens
- A kanban task board for an agency's client workScreens
Two ways
Build it yourself, or have it built
Build it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the frameworkHave it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your app