Built with stubsTypeScriptdomainuiserver

Expense Reports

src/features/expense-reports

Members submit expense reports for admin approval; admins review and approve or reject submissions.

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 { ExpenseReport, ExpenseReportStatus, SubmitExpenseReportInput, ISODateTime, Money } from './types';
7export { ExpenseReportsError, NotImplemented } from './errors';
8export type { ExpenseReportsErrorCode } from './errors';
9export { initialExpenseReportStatus, canExpenseReport, transitionExpenseReport, availableExpenseReportEvents } from './lifecycle';
10export type { ExpenseReportEvent } from './lifecycle';
11

Requirements

  • !

    REQ-1Submitting a valid expense report creates a pending report and returns it

    … [REQ-1] Submitting a valid expense report creates a pending report and returns it #1 (not implemented: slot submitExpenseReport) · submitExpenseReport 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)

    8 passing

  • ✓

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

    8 generated lifecycle tests

Built 28/10/2026, 13:21:01 · 8 tests passing · operations by openrouter