Fork of hanzo-apps/hanzo-starter: identical stack, providers, vite.config, auth (PKCE @ hanzo.id) and deploy contract. Two views in @hanzo/gui — a typographic Resume and an Editor — over profile + entries Base collections (schema.sql, org-scoped). Light theme, ATS-clean, prints as one clean page.
4.5 KiB
resume-curriculum — agent notes
Curriculum — a polished, print-friendly online resume, built on the canonical
Hanzo app stack: Vite + React 19 + @hanzo/gui (UI) + @hanzo/iam (auth) +
@hanzo/base (data). It is a real, buildable fork of hanzo-apps/hanzo-starter;
keep every surface REAL — it must build and run, no fabricated UI.
The app
Two views over two Base collections:
- Resume (
src/views/resume.tsx) — the read/print surface. Renders the oneprofileheader and everyentriesrow grouped by section, in one centered typographic column that prints clean. - Editor (
src/views/editor.tsx) — the write surface. Upserts the singleprofilerow (newest is the live one) and appends/removesentries. src/views/home.tsxis the signed-in shell: a Resume ⇄ Editor toggle, a Print button, and Sign out. The toolbar is removed onbeforeprintso the resume prints alone.src/views/signed-out.tsxis the pre-auth landing (hero + a live preview of the resume paper).
src/lib/sections.ts is the one list of canonical sections (Experience /
Projects / Skills / Education) + the ordering used by both views. src/lib/models.ts
is the shared Profile/Entry row types.
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; it is rebuilt when the token changes (src/lib/base.tsbaseAs). That single seam is what makes everyuseQuery/useMutationorg-scoped to the signed-in user. Curriculum fixes the light theme (a resume is paper; light prints clean). - Env is one place (
src/env.ts), read fromimport.meta.env.VITE_*. Auth readsVITE_HANZO_CLIENT_ID(fallbackhanzo-app). - UI is one system —
@hanzo/guiprimitives only (no second kit, no Tailwind). The only non-gui styling is a page-level@media printblock inindex.html(print margins / color-adjust — Tamagui can't express print media).
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 — the optimizer is a perf pass, not a correctness one.@hanzo/guiprops are Tamagui LONGHAND with this v5 config:alignItems/justifyContent/backgroundColor/padding/paddingVertical/alignSelf/borderRadius/textAlign— NOT theitems/justify/bg/p/self/rounded/textshorthands. Shorthands pass at runtime but FAILtsc.Buttonhas nocolorprop. Set label color via<Button.Text color=…>as a child (see the segmented toggle inhome.tsxand the section picker ineditor.tsx).ButtonusesonPress;Input/TextAreausevalue/onChangeText.- 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).whenis a reserved word — it stays quoted ("when"). Keep this file in lockstep withresume.tsx/editor.tsx.
Deploy contract (Hanzo Cloud)
- Static SPA:
npm run build→dist/, served at<slug>.hanzo.appfrom object storage (the*.hanzo.apppublished-sites edge). No server process. - On publish,
schema.sql→provisionBaseFromDDLcreates the collections (org-scoped, IAM-native, rule@request.auth.org_id = org). 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. Production needs ahttps://*.hanzo.app/auth/callbackwildcard on the shared client (or a per-apphanzo-<app>client).
Proven
tsc --noEmit clean · vite build → dist/ (897 modules) · renders under Vite
with the light-theme resume paper + editor.
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).