mirror of
https://github.com/hanzo-apps/retro.git
synced 2026-10-30 19:05:52 +00:00
Three-column pastel sticky board (Went Well / To Improve / Action Items) with voting, plus an action tracker (owner + done, progress). Per-sprint retros. Forked from hanzo-starter: identical provider stack, vite.config, PKCE auth, and static-SPA deploy contract; 100% @hanzo/gui primitives. - retros / cards / actions org-scoped Base collections (schema.sql) - tsc --noEmit clean, vite build green
4.4 KiB
4.4 KiB
Sprint Retro (sprint-retro) — agent notes
A team-retrospective app, forked from the canonical Hanzo starter.
Vite + React 19 + @hanzo/gui (UI) + @hanzo/iam (auth) + @hanzo/base (data).
Keep it REAL — every surface must build and run, no fabricated UI.
The app
- Retro board (
src/views/board.tsx) — three calm pastel columns of sticky-note cards (Went Well · To Improve · Action Items). Each column has an inline composer and its cards; a card shows text, a vote pill, and (on Action Items) aTrack →that promotes it into the actions collection. Cards sort most-voted first (cardsIn). - Action tracker (
src/views/actions.tsx) — the follow-through:actionswith a free-textownerand adonetoggle (a Button, not a Checkbox), plus a progress bar (progressIn). - Signed-in shell (
src/views/home.tsx) — brand bar, a sprint switcher (retros), and Board / Actions tabs for the current retro. First run shows a "start your first retro" empty state. - Landing (
src/views/signed-out.tsx) — the honest public view; an illustrative preview board (same sticky styling, not live data) + the PKCE sign-in. This is the catalog thumbnail. src/lib/retro.ts— types, the pastelCOLUMNS, ink/paper constants, and thecardsIn/actionsIn/progressIn/votesIn/isDonehelpers. One place for retro logic.
One way, decomplected
- Providers (
src/providers.tsx) mount in the canonical order every Hanzo surface ships:GuiProvider→IamProvider→BaseProvider.BaseProvidergets aBaseClientcarrying the IAM access token; rebuilt when the token changes (src/lib/base.tsbaseAs). That single seam scopes everyuseQuery/useMutationto the signed-in user's org. The design system runs in its light theme (defaultTheme="light") for the pastel board. - Env is one place (
src/env.ts), read fromimport.meta.env.VITE_*. The IAM client id isVITE_HANZO_CLIENT_ID(fallbackhanzo-app). - UI is one system —
@hanzo/guiprimitives only (no second kit, no Tailwind).
Gotchas (do not regress)
@hanzo/guiunder Vite needs three things invite.config.ts(it is the Tamagui line; the in-browser builder runtime can't do this, which is the whole reason this ships as a real repo): (1) aliasreact-native→react-native-web, (2)defineprocess.env.TAMAGUI_TARGET/NODE_ENV/__DEV__, (3)dedupereact/react-dom/react-native-web. No Tamagui compiler, noone, no Expo.@hanzo/guiprops are Tamagui LONGHAND with this v5 config:alignItems/justifyContent/backgroundColor/padding/paddingHorizontal/alignSelf/borderRadius/borderTopWidth/textAlign— NOT theitems/justify/bg/p/px/self/rounded/textshorthands. Shorthands pass at runtime but FAILtsc.Button/pressables useonPress;Input/TextAreausevalue/onChangeText. Pastel hues are raw hex strings (#5b6ce0, alpha tints like#5b6ce022) — Tamagui accepts them.- PKCE storage is
localStorage(not sessionStorage) so the verifier/state survive the round-trip to hanzo.id. schema.sqlis the data contract. It is thedatabaseSchemaDDL the deploy translates into Base collections (provisionBaseFromDDL). Keep it in lockstep withsrc/lib/retro.ts+ the views.cards.retro/actions.retrohold the owningretros.id; scoping to a retro is client-side by that id.
Deploy contract (Hanzo Cloud)
- Static SPA:
npm run build→dist/, served at<slug>.hanzo.appfrom object storage. No server process. - On publish,
schema.sql→provisionBaseFromDDLcreates the collections (org-scoped, IAM-native). Runtime read/write is browser →VITE_HANZO_BASE_URLwith the IAM token. - IAM redirect registration is the one external requirement: the IAM client
(
VITE_HANZO_CLIENT_ID, defaulthanzo-app) must allow this origin's/auth/callback. The deploy provisions a per-apphanzo-<app>client.
Proven
npm run typecheck (tsc --noEmit) clean · npm run build (tsc + vite) →
dist/ · the landing renders under headless Chrome at 1280×800 with the
branded hero + pastel preview board. login() performs a real PKCE S256
redirect to hanzo.id.
Build
CI (.github/workflows/ci.yml) runs npm ci && npm run typecheck && npm run build — build-verification only, NEVER a container image (Hanzo Cloud owns
deploys; do not build images locally).