Built with stubsTypeScriptdomainuiserver

Volunteer Hours

src/features/volunteer-hours

Volunteers log hours served; coordinators review, approve, and export hour records for reporting.

Brick

  • __tests__/

  • domain/

  • host/

  • server/

  • testing/

  • ui/

Host adapter (not part of the brick)

domain/index.ts
1/**
2 * The pure entrypoint: types and logic with no React and no I/O. Importable
3 * from both server and client code.
4 */
5
6export type { VolunteerHour, VolunteerHourStatus, LogHoursInput, ApproveHoursInput, ExportHoursInput, ISODateTime } from './types';
7export { VolunteerHoursError, NotImplemented } from './errors';
8export type { VolunteerHoursErrorCode } from './errors';
9export { initialVolunteerHourStatus, canVolunteerHour, transitionVolunteerHour, availableVolunteerHourEvents } from './lifecycle';
10export type { VolunteerHourEvent } from './lifecycle';
11

Requirements

  • ✓

    REQ-1Volunteer can log hours for a shift, creating a pending record

    ✓ [REQ-1] Volunteer can log hours for a shift, creating a pending record #1

  • !

    REQ-2Coordinator can approve a pending hour record

    … [REQ-2] Coordinator can approve a pending hour record #1 (not implemented: slot approveHours) · approveHours was not implemented within budget.

  • !

    REQ-3Approving a non-existent hour record throws NOT_FOUND

    … [REQ-3] Approving a non-existent hour record throws NOT_FOUND #1 (not implemented: slot approveHours) · approveHours was not implemented within budget.

  • !

    REQ-4Approving an hour record that is not pending throws INVALID_STATE

    … [REQ-4] Approving an hour record that is not pending throws INVALID_STATE #1 (not implemented: slot approveHours) · approveHours was not implemented within budget.

  • !

    REQ-5Export all approved hour records when no filter is provided

    … [REQ-5] Export all approved hour records when no filter is provided #1 (not implemented: slot exportHours) · exportHours was not implemented within budget.

  • !

    REQ-6Export hour records filtered by volunteerId

    … [REQ-6] Export hour records filtered by volunteerId #1 (not implemented: slot exportHours) · exportHours was not implemented within budget.

  • ✓

    GATE-PORTABLESelf-contained: relative imports only, nothing escapes the brick (R1–R6)

    brick-lint + builder harness

  • ✓

    GATE-CONTRACTVendored host contract is byte-identical (R8)

    sha-256 comparison

  • ✓

    GATE-TYPESTypechecks under the strictest-superset tsconfig

    in-process tsc

  • ✓

    GATE-TESTSShips its own tests and they pass (R12)

    9 passing

  • ✓

    GATE-LIFECYCLE-VOLUNTEERHOURVolunteerHour.status only changes through declared transitions

    8 generated lifecycle tests

Built 29/10/2026, 06:00:09 by Ada Lovelace · 9 tests passing · operations by openrouter