Architecture
graph LR
browser[Browser] --> asset[asset-adapter-htmx]
browser --> booking[booking-adapter-htmx]
asset --> assetContract[asset-contract]
booking --> bookingContract[booking-contract]
assetImpl[asset-impl-timescale] --> assetContract
bookingImpl[booking-impl-timescale] --> bookingContract
assetImpl --> db[(TimescaleDB)]
bookingImpl --> dbThe slices
examples/skills-only-app/
crates/asset-contract/contractEquipment models, policy descriptor, service portcrates/asset-impl-timescale/implementationEquipment service, repository, migrationcrates/asset-adapter-htmx/adapterCatalog pages and staff formscrates/booking-contract/contractReservation models, interval validation, action portscrates/booking-impl-timescale/implementationTransitions, constraint mapping, migrationcrates/booking-adapter-htmx/adapterReservation forms and viewsweb/compositionWires both slices into one hostWhy the constraint matters
The booking rule — no overlapping approved or checked-out intervals for one item — cannot be enforced by a check-then-insert: two requests can pass the check at the same time. The implementation therefore pairs the service rules with a PostgreSQL exclusion constraint, and maps the constraint violation back to a domain error the form can show. The database is the authority; the service is the friendly face on top of it.