This repo ships:
- A React UI mockup of Vortex (Humanode governance hub)
- An off-chain “simulation backend” served from
/api/*(Cloudflare Pages Functions)
Humanode mainnet is used only as a read-only eligibility gate; all simulated governance state lives off-chain.
- React with React Router
- Rsbuild
- Tailwind v4 (via PostCSS) + token-driven CSS (
src/styles/base.css) - Yarn (Node version:
.node-version) - Pages Functions API in
functions/+ Postgres via Drizzle
corepack enable
yarn install
yarn devDev server: http://localhost:3000
Landing: http://localhost:3000/ App: http://localhost:3000/app
The UI reads from /api/* (Cloudflare Pages Functions). For local dev, run the API locally so the UI can reach it:
- One command:
yarn dev:full(API on:8788+ UI on:3000+/api/*proxy) - Two terminals:
- Terminal 1:
yarn dev:api - Terminal 2:
yarn dev
- Terminal 1:
If only yarn dev runs, /api/* is not available and auth/gating/read pages will show an “API is not available” error.
In production, Pages Functions use runtime env vars. If DATABASE_URL is not configured, the API falls back to an ephemeral in-memory mode (useful for quick demos, not durable). For a persistent public demo, set DATABASE_URL and run yarn db:migrate against that database.
- Start here:
docs/README.md - Docs are grouped in:
docs/simulation/,docs/ops/,docs/paper/ - Module map (paper → docs → code):
docs/simulation/vortex-simulation-modules.md - API contract:
docs/simulation/vortex-simulation-api-contract.md - Proposal wizard architecture:
docs/simulation/vortex-simulation-proposal-wizard-architecture.md - Local dev:
docs/simulation/vortex-simulation-local-dev.md - Scope and rules:
docs/simulation/vortex-simulation-scope-v1.md,docs/simulation/vortex-simulation-state-machines.md - Vortex 1.0 reference (working copy):
docs/paper/vortex-1.0-paper.md
yarn dev– start the dev serveryarn dev:api– run the Pages Functions API locally (Node runner)yarn dev:full– run UI + API together (recommended)yarn dev:api:wrangler– run the API viawrangler pages devagainst./distyarn build– build the appyarn test– run API/unit testsyarn prettier:check/yarn prettier:fix
- Repo typecheck (UI + Pages Functions + DB seed builders):
yarn exec tsc --noEmit
src/app– App shell, routes, sidebarsrc/components– shared UI (Hint, PageHint, SearchBar) and primitives underprimitives/src/data– glossary (vortexopedia), page hints/tutorial contentsrc/pages– feature pages (proposals, human-nodes, formations, chambers, factions, courts, feed, profile, invision, etc.)src/styles– base/global stylesfunctions/– Pages Functions API (/api/*) + shared server helpersdb/– Drizzle schema + migrations + seed buildersscripts/– DB seed/clear + local API runnerprolog/vortexopedia.pl– Prolog glossary mirrorpublic/landing/– landing page assets (seepublic/landing/README.md)
- Hints:
HintLabelfor inline glossary popups;PageHintfor page-level help overlays. - Search:
SearchBarcomponent standardizes the search row across pages. - Status/Stage bars: proposal pages share a stage bar for Draft → Pool → Chamber vote → Formation.
dist/is generated build output.- Keep glossary entries in sync between
src/data/vortexopedia.tsandprolog/vortexopedia.plif you edit definitions. - DB-backed dev requires
DATABASE_URL+yarn db:migrate && yarn db:seed(seedocs/simulation/vortex-simulation-local-dev.md).