ZeroLink Tech Stack

April 5, 2026 · View on GitHub

Language: English | 中文

ZeroLink Tech Stack

Monorepo

pnpm workspaces with three packages: @zerolink/frontend, @zerolink/backend, @zerolink/shared.

shared is the protocol layer — constants, Zod schemas, canonical serialization, and crypto primitives are shared between frontend and backend to prevent protocol divergence (e.g. intent_hash mismatches).

Frontend

TechnologyPurpose
React 18 + TypeScript (strict)UI framework; strict mode catches crypto data type errors
ViteBuild tool and dev server
Tailwind CSS v4 + shadcn/uiUtility CSS + Radix-based component primitives
ZustandLightweight state management
React Router v6Client-side routing
ZodRuntime schema validation; defends against unexpected server responses
i18nextBilingual support (en / zh)
MSWMock Service Worker for UI-layer tests only — never for protocol logic tests

Backend

TechnologyPurpose
Cloudflare WorkersServerless runtime
Durable ObjectsSerialized state per channel (version, nonce, lock, ciphertext)
TypeScript (strict)Type safety across the protocol boundary

Cryptography

LibraryPurpose
Web Crypto APIAES-256-GCM encryption, RSA-OAEP key wrapping, SHA-256 hashing
@noble/hashesArgon2id KDF for password-based private key wrapping
@noble/ed25519Browser-side Ed25519 manifest signature verification
@github/webauthn-jsonWebAuthn API type helpers

Testing

ToolScope
VitestUnit and integration tests across all packages
PlaywrightE2E tests including WebAuthn simulation
React Testing LibraryComponent tests

Protocol logic tests (Canonical, lock_proof, intent_hash) must run against the real backend — MSW is not a substitute here.

Tooling

ToolPurpose
BiomeLinting + formatting (replaces ESLint + Prettier)
Husky + lint-stagedPre-commit: biome check on staged files + full typecheck
GitHub ActionsCI (pr-validate.yml) and deployment (deploy.yml, release.yml)

Deployment

Frontend assets are bundled with the Worker via wrangler.toml [assets] binding — not Cloudflare Pages. Production releases are triggered by pushing a v* tag; staging deploys on every merge to main.

See DEPLOYMENT.md for setup instructions and ARCHITECTURE.md for system design.