# nithish-github07/ipstamp architecture

> Architecture diagram of the GitHub repository nithish-github07/ipstamp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nithish-github07/ipstamp
- Repository: https://github.com/nithish-github07/ipstamp

## Overview

IPStamp is a decentralized IP registration and licensing application. A creator selects a file; the frontend hashes it, optionally pins it through the backend to IPFS, and submits the fingerprint and CID to the registry contract. Creators can manage license terms, buyers can purchase licenses, and users can inspect ownership, verify files, and manage license usage. The README documents the product capabilities; several connections below rely on that documentation because contract and backend implementation excerpts were not provided.

Main entry points: [`frontend/src/main.jsx`](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/main.jsx) (App coordinator), [`contracts/IPContentRegistry.sol`](https://github.com/nithish-github07/ipstamp/blob/main/contracts/IPContentRegistry.sol) (IPContentRegistry), [`contracts/IPLicense.sol`](https://github.com/nithish-github07/ipstamp/blob/main/contracts/IPLicense.sol) (IPLicense), [`frontend/src/lib/ownedTokens.js`](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/ownedTokens.js) (Token details reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend workflows"]
  node_app["App coordinator<br/>[main.jsx]"]
  node_hash["File hashing<br/>[main.jsx]"]
  node_ipfsclient["IPFS client<br/>[ipfs.js]"]
  node_portfolio["Creator portfolio"]
  node_terms["License terms UI<br/>[TermsModal.jsx]"]
  node_marketplace["License marketplace<br/>[Marketplace.jsx]"]
  node_vault["Licensee vault<br/>[LicenseeVault.jsx]"]
  node_verify["File verification<br/>[main.jsx]"]
end

subgraph group_read["Chain read services"]
  node_marketread["Listing reader<br/>[market.js]"]
  node_ownedread["Token details reader<br/>[ownedTokens.js]"]
  node_enumerate["Token enumeration<br/>[enumerate.js]"]
  node_rpc["Sepolia read provider<br/>[rpc.js]"]
end

subgraph group_backend["IPFS service"]
  node_backend["Upload API<br/>[server.js]"]
end

subgraph group_chain["Sepolia contracts"]
  node_registry["IPContentRegistry"]
  node_license["IPLicense<br/>[IPLicense.sol]"]
end

node_creator(("Creator"))
node_buyer(("Buyer"))
node_verifier(("Verifier"))
node_wallet["MetaMask wallet"]
node_pinata[("Pinata / IPFS")]
node_sepolia[("Sepolia blockchain")]

node_creator -->|"uses"| node_app
node_buyer -->|"uses"| node_app
node_verifier -->|"uses"| node_app
node_app -->|"hashes file"| node_hash
node_app -->|"requests pin"| node_ipfsclient
node_ipfsclient -->|"uploads file"| node_backend
node_backend -->|"pins file"| node_pinata
node_app -->|"registers and verifies"| node_registry
node_app -->|"requests transactions"| node_wallet
node_wallet -->|"signs transactions"| node_registry
node_app -->|"renders"| node_portfolio
node_portfolio -->|"loads owned IP"| node_ownedread
node_app -->|"opens terms"| node_terms
node_terms -->|"submits terms"| node_app
node_app -->|"sets terms"| node_license
node_app -->|"renders"| node_marketplace
node_marketplace -->|"loads listings"| node_marketread
node_marketread -->|"lists tokens"| node_enumerate
node_marketread -->|"reads chain"| node_rpc
node_marketread -.->|"reads listings"| node_license
node_marketread -.->|"reads records"| node_registry
node_app -->|"buys and manages"| node_license
node_buyer -->|"approves purchase"| node_wallet
node_app -->|"renders"| node_vault
node_vault -->|"loads licenses"| node_ownedread
node_ownedread -->|"lists tokens"| node_enumerate
node_ownedread -->|"reads chain"| node_rpc
node_ownedread -.->|"reads IP records"| node_registry
node_ownedread -.->|"reads license data"| node_license
node_vault -->|"uses license"| node_license
node_app -->|"handles verification"| node_verify
node_verify -->|"checks fingerprint"| node_registry
node_registry -->|"stores ownership"| node_sepolia
node_license -->|"stores licenses"| node_sepolia
node_registry -.->|"links IP rights"| node_license

click node_app "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/main.jsx"
click node_hash "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/main.jsx"
click node_ipfsclient "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/ipfs.js"
click node_portfolio "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/CreatorPortfolio.jsx"
click node_terms "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/TermsModal.jsx"
click node_marketplace "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/Marketplace.jsx"
click node_vault "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/LicenseeVault.jsx"
click node_verify "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/main.jsx"
click node_marketread "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/market.js"
click node_ownedread "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/ownedTokens.js"
click node_enumerate "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/enumerate.js"
click node_rpc "https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/rpc.js"
click node_backend "https://github.com/nithish-github07/ipstamp/blob/main/backend/server.js"
click node_registry "https://github.com/nithish-github07/ipstamp/blob/main/contracts/IPContentRegistry.sol"
click node_license "https://github.com/nithish-github07/ipstamp/blob/main/contracts/IPLicense.sol"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_hash,node_ipfsclient,node_portfolio,node_terms,node_marketplace,node_vault,node_verify toneBlue
class node_marketread,node_ownedread,node_enumerate,node_rpc,node_pinata,node_sepolia toneAmber
class node_backend toneMint
class node_registry,node_license toneRose
class node_creator,node_buyer,node_verifier,node_wallet toneIndigo
```

## Components

### Frontend workflows

- [App coordinator](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [File hashing](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [IPFS client](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/ipfs.js): `frontend/src/ipfs.js`
- [Creator portfolio](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/CreatorPortfolio.jsx): `frontend/src/components/CreatorPortfolio.jsx`
- [License terms UI](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/TermsModal.jsx): `frontend/src/components/TermsModal.jsx`
- [License marketplace](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/Marketplace.jsx): `frontend/src/components/Marketplace.jsx`
- [Licensee vault](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/components/LicenseeVault.jsx): `frontend/src/components/LicenseeVault.jsx`
- [File verification](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`

### Chain read services

- [Listing reader](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/market.js): `frontend/src/lib/market.js`
- [Token details reader](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/ownedTokens.js): `frontend/src/lib/ownedTokens.js`
- [Token enumeration](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/enumerate.js): `frontend/src/lib/enumerate.js`
- [Sepolia read provider](https://github.com/nithish-github07/ipstamp/blob/main/frontend/src/lib/rpc.js): `frontend/src/lib/rpc.js`

### IPFS service

- [Upload API](https://github.com/nithish-github07/ipstamp/blob/main/backend/server.js): `backend/server.js`

### Sepolia contracts

- [IPContentRegistry](https://github.com/nithish-github07/ipstamp/blob/main/contracts/IPContentRegistry.sol): `contracts/IPContentRegistry.sol`
- [IPLicense](https://github.com/nithish-github07/ipstamp/blob/main/contracts/IPLicense.sol): `contracts/IPLicense.sol`

### Other components

- **Creator**
- **Buyer**
- **Verifier**
- **MetaMask wallet**
- **Pinata / IPFS**
- **Sepolia blockchain**

## Connections

- Creator → App coordinator: uses (evidence: `README.md`)
- Buyer → App coordinator: uses (evidence: `README.md`)
- Verifier → App coordinator: uses (evidence: `README.md`)
- App coordinator → File hashing: hashes file (evidence: `frontend/src/main.jsx`)
- App coordinator → IPFS client: requests pin (evidence: `frontend/src/main.jsx`)
- IPFS client → Upload API: uploads file (evidence: `frontend/src/ipfs.js`)
- Upload API → Pinata / IPFS: pins file (evidence: `README.md`)
- App coordinator → IPContentRegistry: registers and verifies (evidence: `README.md`)
- App coordinator → MetaMask wallet: requests transactions (evidence: `frontend/src/main.jsx`)
- MetaMask wallet → IPContentRegistry: signs transactions (evidence: `README.md`)
- App coordinator → Creator portfolio: renders (evidence: `frontend/src/main.jsx`)
- Creator portfolio → Token details reader: loads owned IP (evidence: `frontend/src/components/CreatorPortfolio.jsx`)
- App coordinator → License terms UI: opens terms (evidence: `frontend/src/main.jsx`)
- License terms UI → App coordinator: submits terms (evidence: `frontend/src/main.jsx`)
- App coordinator → IPLicense: sets terms (evidence: `README.md`)
- App coordinator → License marketplace: renders (evidence: `frontend/src/main.jsx`)
- License marketplace → Listing reader: loads listings (evidence: `frontend/src/components/Marketplace.jsx`)
- Listing reader → Token enumeration: lists tokens (evidence: `frontend/src/lib/market.js`)
- Listing reader → Sepolia read provider: reads chain (evidence: `frontend/src/lib/market.js`)
- Listing reader → IPLicense: reads listings
- Listing reader → IPContentRegistry: reads records
- App coordinator → IPLicense: buys and manages (evidence: `README.md`)
- Buyer → MetaMask wallet: approves purchase (evidence: `README.md`)
- App coordinator → Licensee vault: renders (evidence: `frontend/src/main.jsx`)
- Licensee vault → Token details reader: loads licenses (evidence: `frontend/src/components/LicenseeVault.jsx`)
- Token details reader → Token enumeration: lists tokens (evidence: `frontend/src/lib/ownedTokens.js`)
- Token details reader → Sepolia read provider: reads chain (evidence: `frontend/src/lib/ownedTokens.js`)
- Token details reader → IPContentRegistry: reads IP records
- Token details reader → IPLicense: reads license data
- Licensee vault → IPLicense: uses license (evidence: `frontend/src/components/LicenseeVault.jsx`)
- App coordinator → File verification: handles verification (evidence: `README.md`)
- File verification → IPContentRegistry: checks fingerprint (evidence: `README.md`)
- IPContentRegistry → Sepolia blockchain: stores ownership (evidence: `README.md`)
- IPLicense → Sepolia blockchain: stores licenses (evidence: `README.md`)
- IPContentRegistry → IPLicense: links IP rights
