book-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev f8f1b3a80195
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 7385a6c1c47153b1728160ff
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
src/lib/pages.ts
// The booking pages this browser manages, so a returning owner finds them on the landing page.
// Admin keys stay on this device; the admin link carries one to another device.
export interface MyPage { handle: string; title: string; key?: string; at: number }

const KEY = "book:pages";

export function myPages(): MyPage[] {
  try {
    const list = JSON.parse(localStorage.getItem(KEY) || "[]");
    return Array.isArray(list) ? list.filter((p) => p && typeof p.handle === "string") : [];
  } catch {
    return [];
  }
}

export function rememberPage(page: Partial<MyPage> & { handle: string }) {
  const list = myPages();
  const prev = list.find((p) => p.handle === page.handle);
  const next = { title: "", at: Date.now(), ...prev, ...page };
  localStorage.setItem(KEY, JSON.stringify([next, ...list.filter((p) => p.handle !== page.handle)].slice(0, 200)));
}

export function adminKey(handle: string): string | undefined {
  return myPages().find((p) => p.handle === handle)?.key;
}

Change history

Add favicon.ico and link tag
f8f1b3a801 · 2 hours ago
Quality pass: guest reschedule, days off, calendar feed, API docs
c827e5d073 · 5 hours ago
Bounded source sync
68e67b4092 · 1 day ago
Bounded source sync
ab2e006f9b · 1 day ago
Bounded source sync
bb10824b54 · 1 day ago
Bounded source sync
d22f765fb7 · 1 day ago
Bounded source sync
30b4b06513 · 1 day ago
Bounded source sync
c3d297477a · 1 day ago
Bounded source sync
7b18317417 · 1 day ago