Skip to content

Screens

A site diary day, prefilled and signed by the right person

The site diary lists a site's working days, newest first, and opens one day's record in a side panel beside the list. The record starts prefilled from the forecast, the attendance and the machine log, so the people who run the site only describe the work, and only the site manager of that site may sign it. A signed record is locked: it can be supplemented, never changed.

By Bohuslav PoláčekChecked

The site diary of Vinery Court flats with today's draft open beside the list, as the managing director sees it, rendered from the kit's components with the demo's data on 2 December 2026.

Open it in the live demo An app for a construction company

What the screen shows

  • The days: one site's working days, newest first, each with its state as a glyph and a word and the first lines of the work done. Four views sit above them with their counts: All days, To sign, Waiting for a reply and Missing.
  • Today's record above the table: the day, its state, the weather, the people and the machines on site, and one button whose label follows the person. The site manager gets "Finish and sign", the managing director "Open the record".
  • The record in the side panel: the page and job number as a small eyebrow, the day as the title, then the work done, the weather and the state of the site, the people by trade, deliveries with their delivery notes, machinery with engine hours, inspections, photos, the signature, the supervisor's entries and the history.

Filled in before anyone types

A working day's record starts from what the app already knows: the weather from the forecast, the people from the attendance on the site, the engine hours from the machine log. The history names the prefill as its own actor, shown as the system and not as a person: "Record created" by Record prefill, "Prefilled from the forecast, the attendance and the machine log."

What is left for people is what only they know: the work done, the state of the site, deliveries, inspections and photos. Today's record at Vinery Court reads "38 m³ C25/30 XC1, 4 mixer trucks and a pump", with the supervisor's take-over of the reinforcement at 7:40 written beside it as his own entry.

One record, a different next step for each person

The rules in the excerpt above decide what each person sees on the same draft:

  • Robert Brooks, the managing director, reads "The record is not signed yet. Lucy King will sign it." and nothing to click.
  • Lucy King, the site manager, can edit the draft and reads "Check the record and sign it by the next evening at the latest." with the Sign the record button.
  • Joe Vaughan, the foreman, can edit the draft and reads "Lucy King signs the record. Add the description of the work and save the draft."
  • Martin Dale, the client's supervisor, reads "The record is not signed yet. You can add your entry now." with the Add an entry button.

The next step is the kit's NextStep: a calm line when there is nothing to do, a panel with one button when there is. Signing goes through a confirm that says what it means: "A signed record cannot be changed any more, only supplemented." See the permissions pattern for the rule behind it.

The day's state and the next evening

A record is due on every working day, the same day or the next day at the latest. One vocabulary serves the list, the month view and the record (domain/status.tsx in the demo), drawn as a StatusLabel: the glyph in the state's colour with the word beside it.

What AI coding tools get wrong here

  • A diary as one big form. A generated diary is usually a form anybody can edit at any time. Here the record has a life: a draft, a signature behind a confirm, then supplements under the work with their author and time, and every step in an AuditTimeline.
  • Roles compared in the markup. A check like role === "manager" in a component drifts from what the server allows. The kit keeps one permissions file per module, asked through usePermission or <Can>, and a backend enforces the same rules.
  • The record on its own page. Opening a day that replaces the list loses the week. The record opens in a RecordPeek beside the list (?nahled= and the date), steps through the days with Alt and the arrows, and expands to the full page, where the record sits beside its A4 page for the paper diary (record side panel).

Who may write, sign and answer

apps/demo/src/modules/diary/domain/permissions.ts
export function canDiary(person: Person, action: string, subject?: unknown) {
  if (!action.startsWith("diary.")) return false;
  const site = siteOf(subject);
  const manages = site ? site.managerId === person.id : person.role === "manager";
  const foremans = site ? site.foremanId === person.id : person.role === "foreman";
  switch (action as DiaryAction) {
    case "diary.read":
      return person.role !== "supervisor" || !site || site.supervisor === person.name;
    case "diary.write":
    case "diary.respond":
      return person.role === "manager" ? manages : person.role === "foreman" && foremans;
    case "diary.sign":
    case "diary.supplement":
      return person.role === "manager" && manages;
    case "diary.entry":
      return person.role === "supervisor" && (!site || site.supervisor === person.name);
    default:
The diary's rules in the demo, one function per module. Every button asks it through usePermission with the site as the subject; no component compares roles.

Questions

Can the foreman fill in the site diary on a phone?

Yes. The foreman may write the record of his own site, and on a phone the record opens as a full-screen sheet over the list. Signing stays with the site manager of that site.

Can the client's supervisor see other sites?

No. The supervisor reads only the sites he supervises, and his entry box is there only. He writes as the client's supervisor; the people who run the site answer him.

What happens to a record after it is signed?

It is locked. Signing asks first, because a signed record can only be supplemented. A supplement shows under the work with its author and time, and the history keeps every step.

Where do the people and the machine hours come from?

From data the app already holds: the attendance on the site and the machine log, with the weather from the forecast. The history names the prefill as the system, not as a person.

What if nobody writes a record for a day?

The day shows No record yet and counts in the Missing view. Once the next evening has passed it turns into Record missing in red, and a draft nobody signed turns to a warning.

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 framework
  • Have 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