A blockchain-based physical asset verification and ownership tracking system built for SUPPLY: THE FUTURE apparel.
verify.supply.tf is a robust blockchain-based verification system designed to track and verify the authenticity and ownership of physical products. It creates an immutable digital record for each item, enabling secure ownership transfers and authenticity verification through NFC integration.
Feature | Description |
---|---|
π Blockchain Verification | Immutable history tracking using a custom blockchain implementation |
π€ Ownership Management | Secure transfer system with email verification |
π·οΈ NFC Integration | Physical-digital product linkage through NFC tags |
π± Mobile-First Design | Responsive interface optimized for mobile verification |
π Audit Trail | Complete historical record of ownership transfers |
π‘οΈ Tamper Protection | Cryptographic verification of product authenticity |
classDiagram
class Block {
+blockNumber: number
+timestamp: string
+previousHash: string
+merkleRoot: string
+blockNonce: number
+calculateHash()
+verifyTransaction()
}
class Transaction {
+type: string
+itemId: string
+timestamp: string
+nonce: string
+data: object
}
Block "1" *-- "many" Transaction
graph TB
A[New Block] -->|Hash| B{Verify Previous Hash}
B -->|Valid| C{Check Block Number}
C -->|Valid| D{Verify Merkle Root}
D -->|Valid| E{Verify Transactions}
E -->|Valid| F[Block Accepted]
B -->|Invalid| X[Reject Block]
C -->|Invalid| X
D -->|Invalid| X
E -->|Invalid| X
graph TB
subgraph Merkle Tree
R[Root Hash] --- H1[Hash 1-2]
R --- H2[Hash 3-4]
H1 --- T1[Transaction 1]
H1 --- T2[Transaction 2]
H2 --- T3[Transaction 3]
H2 --- T4[Transaction 4]
end
V[Verify Transaction] --> P[Build Proof]
P --> C{Check Against Root}
C -->|Match| Valid[Valid Transaction]
C -->|No Match| Invalid[Invalid Transaction]
sequenceDiagram
participant Current Owner
participant System
participant Blockchain
participant New Owner
Current Owner->>System: Initiate Transfer
System->>System: Generate Transfer Nonce
System->>New Owner: Send Confirmation Email
New Owner->>System: Confirm Transfer
System->>Blockchain: Create Transfer Block
Blockchain->>Blockchain: Verify Chain Integrity
Blockchain->>System: Confirm Transfer
System->>Current Owner: Send Transfer Complete
System->>New Owner: Send Ownership Confirmation
|
// Block Structure
interface BlockData {
blockNumber: number;
timestamp: string;
previousHash: string;
merkleRoot: string;
blockNonce: number;
}
// Transaction Record
interface TransactionData {
type: "create" | "transfer";
itemId: string;
timestamp: string;
nonce: string;
data: {
from?: {
name: string;
email: string;
};
to: {
name: string;
email: string;
};
item: ItemDetails;
};
} |
- Node.js 18+
- PostgreSQL 15+
- pnpm (recommended)
- Clone and install dependencies:
git clone https://github.com/jiaweing/verify.supply.tf.git
cd verify.supply.tf
pnpm install
- Configure environment:
cp .env.example .env
# Edit .env with your settings
- Initialize database:
pnpm db:push
pnpm db:seed
- Start development server:
pnpm dev
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).
See the LICENSE file for details.
Built with β€οΈ for SUPPLY: THE FUTURE