N. C. Lucien · Software Engineer
Download CV

2026 · Solo · Production

Kwarry

Hybrid Web2/Web3 co-creation marketplace: idea owners and builders under Ricardian contracts with milestone escrow on Polygon. Seventeen apps and seventeen libraries, built solo.

Lead EngineerBoardingWorkMar 2026nowTypeScript · Nx · NestJS 11 · gRPC · RabbitMQ · Next.js 16 · React 19 · Vite · PostgreSQL · Prisma · Kysely · Redis · Solidity · Hardhat · ethers v6 · Polygon · Privy · Keycloak · IPFS · Docker Swarm · SOPS

01

Mission

Kwarry turns “I have an idea” and “I can build it” into an enforceable agreement. An Inspirer posts an encrypted spec and prefunds an escrow; a Builder signs an NDA to unlock it, applies, and both sign a Ricardian contract whose hash is anchored on chain. Milestones release USDC on approval, after a 72-hour dispute window, or by a tribunal ruling.

For whom: a Primus Cloud Solutions product with five audiences: Inspirers and Builders in the client app, arbiters and jurors in the tribunal app, and admins behind SSO and an IP allowlist. Constraints: money and signatures on chain, specs that must stay secret until an NDA is signed, and a single engineer to build all of it.

02

Manifest

Bill of materials
LayerChoiceVersionWhy
appNext.js 16 landing + three React 19/Vite appsSSR where search matters, SPAs for the authenticated surfaces.
edgeThree NestJS gateways (client, admin, tribunal)One BFF per audience with its own auth model.
servicesThirteen NestJS gRPC services + RabbitMQIdentity, project, contract, escrow, chain, dispute, media, notification and more; typed sync calls, async domain events.
chainSolidity + Hardhat + ethers v6, EscrowVault and KwarryRegistry, Biconomy relayerEscrow and anchoring on Polygon PoS; users never pay gas.
identityPrivy (users) + Keycloak (staff)Embedded wallets for people without one; SSO for operators.
dataPostgreSQL (one Prisma schema, Kysely runtime), Redis, IPFS via PinataAtomic migrations across services; encrypted specs pinned off-chain.
infraDocker Swarm, GHCR, SOPS + age, GitHub Actions on self-hosted runnersSame shape as the rest of the products I run.
03

Decisions

  • gRPC between services, RabbitMQ for events, never REST inside. Three BFF gateways front thirteen gRPC services; every cross-domain reaction (contract signed, escrow opened, milestone released) is a topic, not a call.

  • One shared Prisma schema, Kysely at runtime. Thirteen services, one migration history, so schema changes stay atomic across the whole marketplace.

  • Ricardian contracts, dual-signed, hash-anchored. A PDF the humans read plus machine clauses the escrow executes; e-signature and EIP-712 typed data cost the user nothing, and only the hash goes on chain with the relayer paying gas.

  • An escrow vault with four exits. Per-project ERC-20 escrow with a six-state milestone machine: released by approval, by auto-release after the dispute window, by an arbiter, or refunded. A separate prefund mapping lets the bounty lock before a builder is chosen.

  • Privy for people, Keycloak for staff. Social, email and passkey sign-in with an MPC embedded wallet for users who have never held one; SSO for the admin console.

  • Specs encrypted before IPFS. AES-256-GCM on the full spec, pinned through Pinata, unlocked only once the NDA is anchored.

04

Impact

Commits
197
Apps / libs
17 / 17
gRPC services
13

Every milestone from the event backbone through money rails, identity hardening and notifications is deployed to a live staging swarm and verified there, with the verification evidence committed next to the code. The contracts are deployed to Sepolia for staging and target Polygon PoS for production. What is not built yet is stated just as plainly in the roadmap: no fiat rails, no KYC, no crawler, no admin console.

The two architecture notes I am proudest of explain signing and escrow to non-experts: what a signature is, why EIP-712 makes one useless on any other chain or app, and why funding takes two transactions instead of one, including the alternatives considered and rejected.

05

What broke

Running the services under an esbuild-based TypeScript runner stripped the decorator metadata Nest uses for constructor injection, so providers resolved to undefined at runtime with no error at build time. The fix became a rule rather than a patch: an explicit inject decorator on every constructor parameter, and gRPC client modules registered in the module that uses them, never at the root.

Separately, when hosted CI was unavailable mid-milestone, the release went out by hand: source shipped over a tar pipe after rsync proved flaky, six service images rebuilt on the box, and the consumer deployed before any producer so the notification queue existed before the first event was published.

06

Ship log

  1. Repository initialised
  2. Monorepo scaffolded: schema, proto, first services
  3. Contracts deployed to Sepolia; escrow lifecycle and tribunal shipped
  4. Notifications, inbox and global search verified on staging