bfe64032d8
Turborepo (pnpm workspaces) with all dependencies pinned to latest mutually-compatible versions: turbo 2.9, TypeScript 6, Fastify 5, React 19, Vite 8, better-sqlite3 12 + Drizzle ORM 0.45. Layout: - apps/server Fastify backend (local JWT auth + role guard, /health) - apps/web React 19 + Vite 8 operator SPA - packages/db Drizzle schema on SQLite/WAL; append-only events + users - packages/devices reader/printer/relay adapter interfaces (intent-only relay) - packages/shared shared domain types Architecture constraints from the design wiki are encoded in the scaffold: append-only hash-chained + signed event log, device-agnostic adapters, "a barrier is not a door" (relay expresses intent only), fully-local offline-first auth. wiki/ is an LLM-maintained Obsidian knowledge base (28 pages) ingested from the architecture & design notes, with its own maintenance schema. Verified: pnpm install, full turbo build (5/5), server boots and serves /health, drizzle-kit generates the initial migration.
41 lines
1.9 KiB
Markdown
41 lines
1.9 KiB
Markdown
---
|
|
type: concept
|
|
tags: [parking, architecture, readers]
|
|
sources: [parking-system-architecture]
|
|
updated: 2026-06-14
|
|
---
|
|
|
|
# Entry / Exit Readers
|
|
|
|
There are **two populations** of users, and they map to **two integration paths**. (See
|
|
[[parking-system-architecture]] §8.)
|
|
|
|
- **Permit holders / subscribers** — want hands-free/quick entry. Best served by reads reaching
|
|
the **controller directly** ([[wiegand]]) so it can decide autonomously (works if host is down).
|
|
- **Casual / transient** — printed ticket, pay-on-exit, or plate recognition. Inherently
|
|
**host-side** identity sources ([[lpr-camera]], QR/ticket scanner).
|
|
|
|
## How reads reach the system
|
|
|
|
| Reader type | Who sees the read | Decision by | Offline autonomy |
|
|
| --- | --- | --- | --- |
|
|
| [[wiegand]] reader → UHPPOTE port | The controller | Controller (onboard card list) | **Yes** — works if host down |
|
|
| Pure TCP/IP reader | Host only | Host, then UDP `open` to relay | No — host on critical path |
|
|
| [[lpr-camera|LPR]] / QR scanner | Host only | Host | No |
|
|
|
|
## Key points
|
|
|
|
- **Pure network readers are invisible to the [[uhppote-controller]]** — it only generates events
|
|
for its own terminals. For a pure-TCP reader, only the host can listen/decide/command; the
|
|
controller is demoted to a commanded relay (onboard card DB + offline autonomy bypassed).
|
|
- **Check for a Wiegand output first** — many "network" readers have both; wiring Wiegand in
|
|
keeps autonomy + native event log.
|
|
- **Both models can share one relay** (valid Wiegand read **or** host `open` in "controlled"
|
|
mode), so one lane serves permit + casual.
|
|
- **Host-in-the-loop is good for fraud detection** — two independent records (host's signed
|
|
[[append-only-event-chain]] entry + the UHPPOTE remote-open event) should reconcile 1:1; any
|
|
mismatch is an anomaly.
|
|
|
|
Autonomy caveat: with remote-host control enabled, the controller expects host comms every ~30 s
|
|
or reverts to local control (Wiegand-on-board lanes only).
|