mirror of
https://github.com/hanzoai/social.git
synced 2026-11-23 02:56:09 +00:00
Router basename and IAM return move under /post; the build writes /post/assets URLs; the image serves /post. Client hanzo-social becomes hanzo-post. Site slug and image become post. Co-authored-by: Hanzo Dev <[email protected]>
2.2 KiB
2.2 KiB
Hanzo Post (@hanzo/post) — Agent Guide
Sovereign multi-network social publishing web application (hanzo.app/post; social.hanzo.ai redirects there and keeps the Postiz door) and
Postiz-compatible MCP/API adapter backed by Hanzo IAM (hanzo.id), Hanzo KMS,
and the native Go /v1/social contract (hanzo.ai/zip/social on api.hanzo.ai).
Toolchain & Commands (Zero Vite, Zero Playwright)
- Dev server:
pnpm dev(hanzo serve --port 3300) — native SPA dev server with TS/TSX/CSS bundling,react-native->react-native-webresolution, SSE live reload (/__hanzo_hmr), SPA history fallback (/*->index.html), and/v1proxy toHANZO_API(https://api.hanzo.aior local:3690). - Typecheck:
pnpm typecheck(tsc --noEmit). - Production build:
pnpm build(tsc --noEmit && hanzo serve build) — emitsdist/index.html,dist/404.html, and hasheddist/assets/*. - Preview build:
pnpm preview(hanzo serve preview --port 3300). - Server unit tests:
pnpm test(node --test server/*.test.mjs). - Headless CDP E2E tests:
pnpm e2e(node --test e2e/social.e2e.mjs) — drives headless Chrome/Chromium directly over raw CDP WebSocket +server/http.mjswith deterministic in-process/v1/socialand/v1/providerfixtures and zero external network traffic.
Architecture Invariants
- Identity & Auth: Hanzo IAM OIDC (
@hanzo/iam,https://hanzo.id) only. Signed-out browsers render the single sign-in gate and issue zero/v1calls. - Secret Custody: Provider OAuth secrets and tokens live exclusively in
Hanzo KMS (
/v1/provider+/v1/social/credentials). Never ship or fetch provider tokens into the browser. - API Surface: Frontend calls
/v1/social/*(summary,providers,accounts,posts,publish,channels,credentials) and/v1/provideronapi.hanzo.ai(proxied locally byhanzo serveandserver/http.mjs). - Runtime Deduplication:
pnpm-workspace.yamlpins singletons for@hanzo/guiand@hanzogui/*so React theme contexts never split. - No Foreign Tooling: Never reintroduce
vite,@vitejs/plugin-react,@hanzo/vite, or@playwright/test. Usehanzo serveand native CDP (e2e/social.e2e.mjs).