Polls

Setup

This app runs inside Planeward as an iframe: a staff dashboard in the workspace and a member channel in the community. Build it in the local emulator, then register it in Planeward when you’re ready for real data.

Run it in the local emulator
A local Planeward host, API and webhooks. No account or tunnel needed.
  1. Start Postgres with pnpm db:up and run pnpm db:migrate.
  2. Stop this server and run pnpm --filter @repo/polls dev:emulator from the repo root. It starts the app with local PLANEWARD_* credentials and opens the emulator.
  3. Switch viewers, create and vote in polls, and follow the Requests and Webhooks panels.
Environment
Read from this app’s .env locally, or the Worker’s secrets when deployed. Postgres is the HYPERDRIVE binding in wrangler.jsonc, not a variable. Values are never shown. Everything is set.
  • PLANEWARD_APP_IDSet
  • PLANEWARD_APP_SECRETSet
  • PLANEWARD_WEBHOOK_SECRETSet
  • PLANEWARD_BASE_URLSet
Register in Planeward
In Planeward: Apps › All apps › Create app. Built from this request’s host. Use your public HTTPS domain in production. Steps, browsers and webhooks: docs/going-live.md.
Scopes to request
The same scopes as planeward.json, which the emulator grants.
  • COMMUNITY_MESSAGES_WRITE“Announce this poll” on the dashboard, and the channel list for announce targets and names