Skip to content

Proposal nexus framework

OPENPull Request
by mehmetkr-3122-02-2026Needs Revision
canton-apis

Development Fund Proposal Submission

Proposal file: /proposals/nexus-framework.md

Public implementation repository: https://github.com/mehmetkr-31/nexus

---

Summary

The Nexus Framework (NXFS) is a type-safe, isomorphic TypeScript SDK that turns Daml smart contracts into a first-class React 18/19 and Next.js 15+ developer experience. It consumes the standard daml codegen js output directly and delivers Typed Daml Namespaces, Isomorphic Authentication with AES-256-GCM sessions, automatic Package ID resolution via DALF parsing, idempotent Canton command deduplication handling, and finality-aware mutations built on submit-and-wait-for-transaction — eliminating the boilerplate and architectural friction that currently blocks modern web teams from building on Canton.

Nexus is also framework-agnostic on the server: a single forRequest(req: Request) entry point works inside Next.js, TanStack Start, Hono, Bun.serve, Cloudflare Workers, Deno, or any Web-standard runtime — with thin adapters shipped for the most common frameworks.

Nexus is purely additive: it sits on top of the stable Canton JSON Ledger API and the official Daml codegen output. It does not fork, patch, or compete with any existing Canton tooling.

Implementation is already underway and fully public at https://github.com/mehmetkr-31/nexus — reviewers are explicitly invited to inspect the code, open issues, or suggest changes directly on the repository.

---

What's in the repo today

  • @nexus-framework/coreCantonClient, PackageResolver (DALF bytecode parsing), PartyIdResolver, SessionManager (AES-256-GCM), JwtManager, and auth plugins (sandboxAuth, jwtAuth, oidcAuth).
  • @nexus-framework/reactcreateNexusClient, typed namespaces, TanStack Query plugin, streaming plugin, optimistic UI plugin, identity plugin, Next.js SSR adapters.
  • createNexusServer + forRequest — universal server factory with framework adapters for Next.js, TanStack Start, and Hono (transparent Canton proxy). Bun.serve({ routes }) works natively via forRequest; Express and Fastify adapters land in Milestone 3.
  • PQS integrationpqsDatabasePlugin built on Kysely + pg, querying Canton's documented active() table function with automatic Row-Level Security scoping per party.
  • @nexus-framework/clicreate-nexus-app interactive project scaffolder.
  • Canton sandbox — wired up for end-to-end testing.

Runtime requirements: Node.js 18+, Bun, modern browsers, and edge runtimes (Vercel Edge, Cloudflare Workers). Nexus uses Web Crypto directly and does not rely on Node-specific crypto modules.

The first packages will land on npm soon.

---

Checklist

  • [x] Proposal file added under /proposals/
  • [x] Milestones and funding amounts defined
  • [x] Acceptance criteria and adoption success metrics included
  • [x] Alignment with Canton priorities described
  • [x] Evidence of ecosystem demand documented (Canton Developer Survey 2026 + 8 forum references)
  • [x] Public implementation repository linked for reviewer audit

---

Notes for Reviewers

  • Nexus addresses documented, reproducible pain points: the @daml/react WebSocket memory leak, React 16 lock-in in create-daml-app, 75 unresolvable npm vulnerabilities in the official scaffold, and the absence of a Next.js SSR path for Canton.
  • Demand is validated by the Canton Network Developer Experience & Tooling Survey (2026) with 41 active builders, which ranks "Typed SDKs & language bindings" and "JWT authentication middleware" among the top missing tools.
  • Technical precision points the committee may want to verify directly in the repo: (1) mutations use POST /v2/commands/submit-and-wait-for-transaction for true commit-time resolution; (2) DUPLICATE_COMMAND (409) is resolved to the original command's actual outcome via completionOffset/updateId lookup — never blindly treated as success; (3) PQS queries target the documented, stable active() table function (not internal tables); (4) SessionManager uses Web Crypto AES-256-GCM directly, so it runs on Node 18+, Bun, and edge runtimes identically.
  • Nexus is additive only — it consumes daml codegen js and the Canton JSON Ledger API as stable interfaces. No coordination with existing tooling maintainers is required to avoid overlap.
  • Much of the Milestone 1 and Milestone 2 surface area is already scaffolded in the public repo. The per-milestone week estimates cover completion, hardening, integration testing, documentation, and npm publication — not greenfield implementation. Milestone 1 remains the Minimal Viable Deliverable: a self-contained @nexus-framework/core package that is independently useful even if subsequent milestones were not pursued.
  • All packages will be released under Apache 2.0 from day one. We have zero reservations about the reviewers auditing the source c