PhoenixKitBookings

Universal booking module for PhoenixKit.

One install runs any mix of booking shapes — the shape is per-service configuration, never a module-level setting:

Archetype Config Example
Day / night stays time_unit: night (or day), pooled seats inventory, min/max stay, check-in/out times A hotel room type with 7 rooms
Fixed slots time_unit: minutes, duration + slot_interval grid A massage parlor booked on the hour, for an hour
Free-form flexible_duration, min_duration, max_duration (blank = unlimited) A gym floor booked from any time, for any length

All three coexist in one install (a hotel that also offers massages), share one admin, one public surface, and one bookings table.

Features

Installation

# mix.exs of your PhoenixKit host app
{:phoenix_kit_bookings, "~> 0.1.4"}

Requires phoenix_kit ~> 2.14. The floor is not cosmetic: the site time frame is built on PhoenixKit.Utils.Date.shift_to_offset/2 and parse_datetime_local/2, which resolve a timezone per instant only from core 2.14.1 — below that they answer 0 for every IANA id and every booking is silently stored as UTC. Run mix deps.get, then mix phoenix_kit.update — the module owns its versioned migration (PhoenixKitBookings.Migrations.Schema, discovered via migration_module/0). Enable Bookings on the admin Modules page.

Development

mix test.setup # createdb phoenix_kit_bookings_test + migrations
mix test # 105 tests; :integration auto-excluded without a DB
mix precommit # compile --warnings-as-errors, credo --strict, dialyzer

Cross-repo work against local checkouts: PHOENIX_KIT_PATH=../phoenix_kit and/or PHOENIX_LIVE_CALENDAR_PATH=../phoenix_live_calendar (unset = the published Hex pins). See AGENTS.md for architecture notes.