How theanamsaqib/craft-chain works
Craft-Chain is a handmade-batch provenance app: users create batches, record journey updates, and transfer ownership; anyone can look up a batch and view its history. The frontend coordinates wallet-based contract reads and writes, while a server route pins JSON metadata through Pinata. The source excerpts show the tracking queries and contract interactions, but do not expose the full creation or update handlers. The contract source and README were not provided, so those details and links are limited to the evidence available.
Main entry points: page.js Batch app · CraftBatch721.sol Batch ERC-721 · route.js Pin API · Icons.js UI icons
Components 9
Web app
- Batch app
frontend/src/app/page.js - UI icons
frontend/src/app/Icons.js - Journey display
frontend/src/app/BatchView.js
On-chain provenance
- Batch ERC-721
contracts/contracts/CraftBatch721.sol
Metadata storage
- Pin API
frontend/src/app/api/pin/route.js
Other components
- Batch participant
- Public viewer
- Pinata
- Sepolia chain
Connections 8
- Batch participant → Batch app: uses
frontend/src/app/page.js - Public viewer → Batch app: tracks batches
frontend/src/app/page.js - Batch app → UI icons: renders
frontend/src/app/page.js - Batch app → Journey display: renders
frontend/src/app/page.js - Batch app → Batch ERC-721: reads and writes
frontend/src/app/page.js - Batch ERC-721 → Sepolia chain: deployed on
- Batch participant → Pin API: submits metadata
- Pin API → Pinata: pins JSON
frontend/src/app/api/pin/route.js