# Pie Night A cozy, mobile-first sign-up page for pie nights. A host starts an event, shares one link, and guests say which pies they are bringing. Everyone sees the list fill in live. Guests never need an account. - **Events with codes.** Each pie night lives at `/e/`. Codes are forgiving: `Smith Pies 2026`, `smith pies 2026`, and `smith-pies-2026` all land on the same page. - **Hosts.** Anyone signed in with Kody can start a pie night at `/new`. The creator is the host and can add co-hosts by Kody username. Hosts change the title, date, time, place label, message, and theme, bring back removed pies, and start fresh. - **Share images per event.** Every event gets its own preview image with its title, date, time, and place, drawn on the server with [Satori](https://github.com/vercel/satori). The image link changes when the details change, so chat apps pick up the new one. - **Live updates.** New, changed, and removed pies, and who is on the page right now, show up instantly over Kody realtime sockets. Polling keeps things in sync if a socket drops. - **Installable app.** Add it to your home screen. Pages you have opened work offline, and a Refresh banner appears when there is a new version. - **Push notifications (optional).** Guests can tap "Notify me when a pie is added". Hosts can turn on notifications from the host page and send a test. Works in Chrome, Edge, Firefox, and Android, and in Safari on iPhone and iPad once the app is added to the home screen. - **Light and dark.** Follows the device setting with a warm night-time look. - **Themes.** Harvest orange, Berry pink, or Evergreen. ## Make your own Fork the package. Push is optional: generate a P-256 VAPID pair in a trusted Kody execute run, save the PKCS#8 private key with `kody.secretSet` as a user-scope `signing` credential, provider `web-push`, with only these hosts: `fcm.googleapis.com`, `updates.push.services.mozilla.com`, `web.push.apple.com`, `*.notify.windows.com`. Never return or log the private key. Map the `webPush` slot to it, then store only its base64url public half: ```ts import setupPush from 'kody:@you/pie-night/setup-push' export default () => setupPush({ publicKey: 'YOUR_PUBLIC_KEY' }) ``` Without it, everything else works and the notify buttons stay hidden. A saved package cannot provision a signing credential itself; creation happens in the trusted owner run, never the anonymous app. Approve the app's capabilities when Kody asks (anonymous realtime for live updates). ## Owner settings Send visitors of the bare home page (`/`) to one event, for example while an old link still points there. It is a temporary 302, so turning it off is instant: ```ts import { setHomeRedirect } from 'kody:@you/pie-night/settings' export default () => setHomeRedirect({ code: 'smith-pies-2026' }) // on // export default () => setHomeRedirect({ code: null }) // off ``` While it is on, add `?home` to the URL to see the real home page. ## Privacy Never put a street address in an event. Use a friendly label like "At our house". Names shown as "here now" are whatever people typed on their own device.