feat(chatelet): guest booking UI — slice 1 (browse + availability) #142

Open
padreug wants to merge 2 commits from feat/chatelet-guest-ui into dev
Owner

Slice 1 of the chatelet guest booking UI (#141): the standalone app + read-only browse rooms → room detail → date-range availability check. Booking→pay→confirm is slice 2.

What's here

Standalone app (mirrors events): chatelet.html, src/chatelet-app/{main,app,App,app.config,views/SettingsPage}, vite.chatelet.config.ts (port 5188, dist-chatelet, manifest id aiolabs-chatelet), + dev:/build:/preview:chatelet scripts and entries in dev:all / build:demo (VITE_BASE_PATH=/chatelet/).

Module src/modules/chatelet/:

  • ChateletApiService — plain HTTP wrapper (the TicketApiService pattern) hitting chatelet's public guest endpoints (GET /public/rooms[/{id}], POST /availability). Unauthenticated by default.
  • useChatelet composable + pinia store, services via DI (tryInjectService, never direct import).
  • ChateletPage (room grid) + ChateletDetailPage (details + date pickers → availability with sats/fiat quote; Book stubbed for slice 2).
  • SERVICE_TOKENS.CHATELET_API.

Transport note

HTTP-for-now: chatelet's kind-21000 RPC surface exists but the webapp's RPC client is disabled post-#9 (aiolabs/lnbits#64). When that lands, only ChateletApiService swaps HTTP→RPC — no view changes. Backend endpoints shipped in chatelet v0.3.0 (in the catalog; upgrade chatelet on aio-demo to serve them).

Verified

  • npm run build:chateletvue-tsc -b typechecks clean + Vite bundles the whole app (views chunked, PWA generated, built in 3.5s).
  • 👀 Live render needs your eyes — run npm run dev:chatelet (port 5188) against an aio-demo with chatelet ≥ v0.3.0, or wait for the staging deploy. Point VITE_LNBITS_BASE_URL at the instance.

Follow-ups

  • Slice 2: booking → Lightning pay → confirmation (needs a public booking-status endpoint on chatelet — I'll add it in slice 2).
  • Suggest an app:chatelet label (couldn't create via MCP); applied enhancement.

Release flow

Per webapp rules this targets dev (staging). Handing off merge to you via the Forgejo UI.

🤖 Generated with Claude Code

Slice 1 of the chatelet guest booking UI (#141): the standalone app + read-only **browse rooms → room detail → date-range availability check**. Booking→pay→confirm is slice 2. ## What's here **Standalone app** (mirrors `events`): `chatelet.html`, `src/chatelet-app/{main,app,App,app.config,views/SettingsPage}`, `vite.chatelet.config.ts` (port 5188, `dist-chatelet`, manifest id `aiolabs-chatelet`), + `dev:/build:/preview:chatelet` scripts and entries in `dev:all` / `build:demo` (`VITE_BASE_PATH=/chatelet/`). **Module** `src/modules/chatelet/`: - `ChateletApiService` — plain HTTP wrapper (the `TicketApiService` pattern) hitting chatelet's public guest endpoints (`GET /public/rooms[/{id}]`, `POST /availability`). Unauthenticated by default. - `useChatelet` composable + pinia store, services via DI (`tryInjectService`, never direct import). - `ChateletPage` (room grid) + `ChateletDetailPage` (details + date pickers → availability with sats/fiat quote; **Book** stubbed for slice 2). - `SERVICE_TOKENS.CHATELET_API`. ## Transport note HTTP-for-now: chatelet's kind-21000 RPC surface exists but the webapp's RPC client is disabled post-#9 (**aiolabs/lnbits#64**). When that lands, only `ChateletApiService` swaps HTTP→RPC — no view changes. Backend endpoints shipped in chatelet **v0.3.0** (in the catalog; upgrade chatelet on aio-demo to serve them). ## Verified - ✅ `npm run build:chatelet` — `vue-tsc -b` typechecks clean + Vite bundles the whole app (views chunked, PWA generated, built in 3.5s). - 👀 **Live render needs your eyes** — run `npm run dev:chatelet` (port 5188) against an aio-demo with chatelet ≥ v0.3.0, or wait for the staging deploy. Point `VITE_LNBITS_BASE_URL` at the instance. ## Follow-ups - Slice 2: booking → Lightning pay → confirmation (needs a public booking-status endpoint on chatelet — I'll add it in slice 2). - Suggest an **`app:chatelet`** label (couldn't create via MCP); applied `enhancement`. ## Release flow Per webapp rules this targets **`dev`** (staging). Handing off merge to you via the Forgejo UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Slice-1 part B of the chatelet guest booking UI (aiolabs/webapp #141).

- ChateletApiService: plain HTTP wrapper (events TicketApiService pattern) →
  chatelet's public guest endpoints (/public/rooms, /availability). Unauth by
  default; swaps HTTP→kind-21000 RPC once aiolabs/lnbits#64 lands, no view change.
- useChatelet composable + pinia store (DI via tryInjectService, never direct import).
- Views: ChateletPage (room grid) + ChateletDetailPage (details + date-range
  availability check with sats/fiat quote; Book button stubbed for slice 2).
- SERVICE_TOKENS.CHATELET_API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
chatelet.html + src/chatelet-app/{main,app,App,app.config,views/SettingsPage}
+ vite.chatelet.config.ts (port 5188, cacheDir .vite-chatelet, dist-chatelet,
manifest id aiolabs-chatelet), mirroring the events standalone. package.json
gains dev:/build:/preview:chatelet + entries in dev:all and build:demo
(VITE_BASE_PATH=/chatelet/). Verified: build:chatelet typechecks + bundles clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/chatelet-guest-ui:feat/chatelet-guest-ui
git switch feat/chatelet-guest-ui

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch dev
git merge --no-ff feat/chatelet-guest-ui
git switch feat/chatelet-guest-ui
git rebase dev
git switch dev
git merge --ff-only feat/chatelet-guest-ui
git switch feat/chatelet-guest-ui
git rebase dev
git switch dev
git merge --no-ff feat/chatelet-guest-ui
git switch dev
git merge --squash feat/chatelet-guest-ui
git switch dev
git merge --ff-only feat/chatelet-guest-ui
git switch dev
git merge feat/chatelet-guest-ui
git push origin dev
Sign in to join this conversation.
No description provided.