AI-powered editable design platform with cryptographic edit provenance.
editchain/
├── apps/
│ ├── web/ # React + Vite frontend (canvas editor)
│ └── api/ # Node.js + Express backend (AI + provenance)
├── packages/
│ └── shared-types/ # TypeScript types shared across apps
└── contracts/ # Solidity smart contracts (Hardhat)
- Node.js 20+
- pnpm 9+
- Docker (for Postgres + Redis)
pnpm installcp .env.example .env
# Fill in ANTHROPIC_API_KEY and other valuesdocker compose up -dcd apps/api
pnpm prisma migrate devpnpm dev # runs both web + api via Turborepo- Frontend: http://localhost:5173
- API: http://localhost:3001
| File | Purpose |
|---|---|
apps/api/src/services/svgGenerator.service.ts |
AI prompt → structured SVG |
apps/api/src/services/editChain.service.ts |
Merkle tree provenance (novel) |
apps/web/src/store/designStore.ts |
Canvas state management |
apps/web/src/store/editChainStore.ts |
Edit event accumulation |
contracts/EditChainNFT.sol |
On-chain provenance + ERC-721 |
packages/shared-types/design.ts |
Core data model |
The core novelty is element-level edit provenance:
- Every canvas edit creates an
EditEventwith a pointer to the previous event's hash - The chain of events forms a Merkle tree
- The Merkle root is stored on-chain at mint time
- Anyone can verify a single edit event without downloading the full chain (Merkle proof)
This is distinct from existing work which only hashes the final output.
- Connect Prisma DB to routes
- Add Fabric.js canvas editor component
- Implement IPFS upload via Pinata
- Deploy contracts to Polygon Mumbai testnet
- Add wallet connection (wagmi + RainbowKit)
- User study for research paper