Back to Projects
LegalTech & Blockchain

LexChain

Generates dynamic legal contracts and verifies their integrity with a blockchain fingerprint.

The Problem

Freelancers working with clients in different countries need contracts tailored to each jurisdiction without relying on a lawyer for every simple case, and they need to be able to prove the signed document wasn't altered afterward.

The Solution

LexChain generates dynamic contracts based on the selected jurisdiction and computes a digital fingerprint of the document, recorded on an Ethereum testnet, so anyone can verify at any time that the contract hasn't been modified.

Architecture / Engineering

  • Implemented dynamic PDF generation with pdf-lib from jurisdiction-specific templates.
  • Integrated ethers.js to compute the contract's hash and record it on an Ethereum testnet.
  • Designed a contract template system parameterized by country and agreement type.
  • Validated the form's input data to ensure the generated contract is consistent.

Key Features

  • Dynamic contract generation by jurisdiction.
  • PDF generation from parameterized templates (pdf-lib).
  • Contract fingerprint (hash) computation and recording on an Ethereum testnet.
  • Document integrity verification against its blockchain fingerprint.
  • Form input data validation.

Engineering Challenges

  • Designing contract templates parameterized by country and agreement type without duplicating logic across jurisdictions.
  • Explaining and solving the real problem behind using blockchain here: it's not a trend, it's a verifiable way to prove a document wasn't altered.

Result / Current State

Deployed. Supports 2 jurisdictions (Spain, Venezuela) and generates contracts with a verifiable fingerprint on an Ethereum testnet.

Results

  • 2 jurisdictions supported (Spain, Venezuela)

Stack

Next.jsTypeScriptTailwind CSSpdf-libethers.jsEthereum Testnet
LiveGitHubView all projects →