forms-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 ce303909347f
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 cf614aedcf4cdabfa9c45095
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/mine.ts
// "Your forms": the forms this browser made or claimed, with their admin keys. Lives only in this browser.
const KEY = "forms:mine";

export interface Mine { id: string; key: string; title: string; at: number }

export function listMine(): Mine[] {
  try {
    const all = JSON.parse(localStorage.getItem(KEY) || "{}") as Record<string, Omit<Mine, "id">>;
    return Object.entries(all).map(([id, v]) => ({ id, ...v })).sort((a, b) => b.at - a.at);
  } catch {
    return [];
  }
}

export function keyFor(id: string): string | null {
  return listMine().find((m) => m.id === id)?.key ?? null;
}

export function remember(id: string, key: string, title: string) {
  const all = Object.fromEntries(listMine().map(({ id: i, ...v }) => [i, v]));
  all[id] = { key, title, at: all[id]?.at ?? Date.now() };
  localStorage.setItem(KEY, JSON.stringify(all));
}

export function forget(id: string) {
  const all = Object.fromEntries(listMine().filter((m) => m.id !== id).map(({ id: i, ...v }) => [i, v]));
  localStorage.setItem(KEY, JSON.stringify(all));
}

Change history

Quality pass: conditional questions, 0 to 10 scale, QR code, prefill links, results tabs, API docs
ce30390934 · 4 hours ago
Bounded source sync
7d82add8ae · 1 day ago
Bounded source sync
8230fd7d59 · 1 day ago
Bounded source sync
d92a6e3b44 · 1 day ago
Bounded source sync
b548641922 · 1 day ago
Bounded source sync
b89074ffd2 · 1 day ago