Inspiration
A small equipment pool can receive more requests than it can satisfy. Each request has dates, quantities and sometimes several items that must be available together. BorrowFair explores a specific question: which requests fit, and what changes when the coordinator keeps a long loan or adds one unit of stock?
What it does
BorrowFair plans one lending round in the browser. A coordinator enters equipment stock and requests using borrower aliases. The app compares whole-date loan intervals, limits each borrower to one request, and explains why requests were not selected.
The allocation rule is visible. It first serves as many borrowers as possible, then prefers a lower total of previous loans, then earlier request dates. A coordinator can keep a request that must be included. Conflicting keeps stop the plan rather than being silently ignored.
An extra-unit comparison reruns the same requests with one more camera, microphone or other item. It names borrowers added and displaced without changing inventory until the coordinator applies it. Workspace backups and plan reports can be exported as JSON.
How it was built
The app uses original JavaScript modules, semantic HTML and CSS. A bounded branch-and-bound planner runs in a Web Worker. It starts from a feasible first-come comparison, searches candidate allocations and checks every returned plan against capacity, borrower and keep constraints. Limited searches explicitly say that optimality is unproven.
Workspace storage stays in the browser. Imports are validated and previewed before replacement. Storage failures leave an exportable draft, and detected changes from another tab block stale writes. There is no backend, paid API or runtime AI model.
OpenAI Codex assisted with the code, tests, interface text and documentation. The project was started on November 1, 2026 during the GenHacks build period. No previous completed application was reused.
What was tested
Eleven Node tests passed, including 400 seeded small rounds checked against an independent exhaustive subset oracle. Ten Chrome browser scenarios cover the core workflow and recovery behavior. Automated axe checks found no violations in the three main views under the selected WCAG A/AA rules; this is not a full accessibility audit.
In the fictional film-club example, the app selects nine borrowers compared with six under first-come allocation. One extra tripod allows ten. These numbers describe that example, not a measured improvement at a real lending service.
Limits and next steps
BorrowFair supports a single local round, up to 48 requests and a 31-day span. It does not make reservations, verify prior-loan histories, handle partial-day handovers or track checkout and returns. The allocation rule can favor several short loans over one long loan; it does not measure need or define fairness for every setting.
The next useful evidence would be a coordinator evaluating the rule on an appropriately anonymized round, with particular attention to long-loan trade-offs. No such study or deployment is claimed here.
Track and tools
Open track. JavaScript, HTML, CSS, Web Workers, Web Storage, Web Locks, Node.js, Playwright, axe-core and OpenAI Codex. The MIT-licensed source and working application are public.
Built With
- axe-core
- css3
- html5
- javascript
- node.js
- openai-codex
- playwright
- web-locks
- web-storage
- web-workers