Skip to content

mwihoti/csvtochain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CSVToChain πŸ“Šβ›“οΈ

Transforming CSV Data into Verifiable Digital Assets on Hedera


πŸ“‹ Submission Details

Project Description

CSVToChain is the first CSV-to-NFT tokenization platform built on Hedera Hashgraph, solving the fundamental problem of data authenticity and ownership in the digital age. The platform transforms ordinary CSV files into verifiable, tradeable blockchain assets with immutable proof of integrity, NFT-based ownership with clear provenance, and a built-in marketplace for monetizing datasets. Users can upload CSV files, validate data quality, mint NFTs representing their datasets, browse a decentralized marketplace, and purchase tokenized data using their Hedera walletsβ€”all in under 60 seconds with military-grade cryptographic verification.

Demo Video link: https://youtu.be/h3_Vm9uZ-4o

Hackathon Track

DeFi & Tokenization

Tech Stack

Frontend:

  • Next.js 16 (React 19, TypeScript 5)
  • Tailwind CSS 4 (responsive design)
  • Lucide React (icons)
  • React Hot Toast (notifications)

Blockchain:

  • Hedera SDK 2.76.0 (HTS, HCS, crypto operations)
  • Hedera Mirror Node API (account lookups, transaction verification)
  • HashPack Wallet (Hedera native wallet)
  • MetaMask (Web3 wallet compatibility)

Backend & Services:

  • Next.js API Routes (purchase processing, data endpoints)
  • Browser localStorage (persistent storage)
  • CoinGecko API (real-time HBAR pricing)
  • SHA-256 cryptographic hashing

Infrastructure & DevOps:

  • Vercel (deployment ready)
  • Docker support (containerization)
  • pnpm (package management)
  • ESLint & Prettier (code quality)

🎯 Key Features

1. CSV-to-NFT Tokenization Pipeline

CSV Upload β†’ Validation β†’ Hashing β†’ NFT Minting β†’ HCS Verification β†’ Marketplace Listing
  • Drag & Drop Upload: Modern file interface with real-time progress tracking
  • Smart Validation: Multi-layer checks (size, structure, quality scoring)
  • Cryptographic Hashing: SHA-256 for immutable data integrity proof
  • Real NFT Minting: Live Hedera Token Service integration
  • Automatic Marketplace Sync: Tokenized datasets appear instantly in the data marketplace

2. Data Marketplace

  • Browse Datasets: Advanced search and filtering by category
  • Purchase Functionality: One-click purchasing with wallet verification
  • Price Discovery: Dynamic pricing with HBAR conversion
  • Transaction Verification: HashScan integration for blockchain proof
  • Purchase History: Track all acquired datasets with metadata

3. Wallet Integration

  • HashPack Support: Native Hedera wallet integration
  • MetaMask Compatibility: Popular Web3 wallet support
  • Multi-wallet Switching: Seamless account selection
  • Live Balance Display: Real-time HBAR balance from Mirror Node
  • Transaction Signing: Secure, user-controlled transactions

4. Transaction Analytics Dashboard

  • Account Explorer: Deep dive into Hedera accounts
  • Multi-Network Support: Mainnet, Testnet, Previewnet
  • Real-Time Data: Live transaction history and balances
  • AI Categorization: Automated transaction classification
  • CSV Export: Download transaction data for analysis

5. Dual-Layer Verification

  • Hedera Token Service (HTS): NFT represents ownership
  • Hedera Consensus Service (HCS): Immutable timestamp + hash
  • Military-Grade Security: Double verification architecture

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone Repository
git clone https://github.com/mwihoti/csvtochain.git
cd csvtochain
  1. Install Dependencies
pnpm install
  1. Configure Environment
cp .env.local.example .env.local

Edit .env.local:

HEDERA_ACCOUNT_ID=0.0.YOUR_ACCOUNT_ID
HEDERA_PRIVATE_KEY=YOUR_PRIVATE_KEY
HEDERA_NETWORK=testnet
NEXT_PUBLIC_TREASURY_ACCOUNT=0.0.YOUR_ACCOUNT_ID
HCS_TOPIC_ID=0.0.YOUR_TOPIC_ID (optional)
NEXT_PUBLIC_HEDERA_NETWORK=testnet
  1. Test Connection
pnpm test:connection
  1. Start Development Server
pnpm dev

Access the app at http://localhost:3000


πŸ§ͺ Testing Instructions

Test 1: CSV Upload & Validation

  1. Navigate to http://localhost:3000/tokenized-data
  2. Upload public/examples/sample-sales.csv
  3. Verify validation passes with:
    • βœ… 15 rows, 7 columns
    • βœ… Quality score shown
    • βœ… Data preview displayed
    • βœ… SHA-256 hash generated

Test 2: NFT Minting (Requires HBAR)

  1. Complete Test 1
  2. Click "Mint Dataset NFT on Hedera"
  3. Approve transaction in wallet
  4. Verify success message shows:
    • Token ID
    • Serial Number
    • HashScan verification link

Test 3: Marketplace Listing

  1. After minting, navigate to http://localhost:3000/data-marketplace
  2. Verify your tokenized CSV appears in listings
  3. Click "View Details" to see metadata
  4. (Optional) Click "Purchase" to test purchase flow

Test 4: Wallet Integration

  1. Connect wallet via button on homepage
  2. Verify account ID and balance display
  3. Switch between HashPack and MetaMask (if available)
  4. Verify balance updates correctly

Test 5: Transaction Analytics

  1. Navigate to http://localhost:3000/dashboard
  2. Search for a known account ID
  3. Verify transaction history loads
  4. Check dark mode functionality

πŸ“ Project Structure

csvtochain/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ mint-dataset/          # NFT minting endpoint
β”‚   β”‚   └── purchase-data/         # Marketplace purchase processing
β”‚   β”œβ”€β”€ dashboard/                 # Transaction analytics
β”‚   β”œβ”€β”€ data-marketplace/          # Browse & purchase datasets
β”‚   β”œβ”€β”€ my-purchases/              # Purchase history
β”‚   β”œβ”€β”€ seller-dashboard/          # Listing management
β”‚   β”œβ”€β”€ token-gallery/             # Minted NFTs gallery
β”‚   β”œβ”€β”€ tokenized-data/            # CSV upload & minting
β”‚   β”œβ”€β”€ layout.tsx                 # Root layout
β”‚   └── page.tsx                   # Homepage
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ CSVTokenizer.tsx           # Upload & minting UI
β”‚   β”œβ”€β”€ DashboardOverview.tsx      # Analytics dashboard
β”‚   β”œβ”€β”€ PurchaseModal.tsx          # Marketplace purchase modal
β”‚   β”œβ”€β”€ TransactionTable.tsx       # Transaction display
β”‚   └── [other components]
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ csv-processor.ts       # CSV validation & hashing
β”‚   β”‚   β”œβ”€β”€ hedera-sdk.ts          # Hedera interactions
β”‚   β”‚   β”œβ”€β”€ marketplace.ts         # Listing & purchase logic
β”‚   β”‚   β”œβ”€β”€ token-minting.ts       # NFT minting service
β”‚   β”‚   └── categorization.ts      # Transaction categorization
β”‚   β”œβ”€β”€ contexts/
β”‚   β”‚   └── WalletContext.tsx      # Wallet state management
β”‚   └── api/
β”‚       └── mirror-node.ts         # Hedera Mirror Node queries
β”œβ”€β”€ public/
β”‚   └── examples/
β”‚       β”œβ”€β”€ sample-sales.csv       # Test dataset
β”‚       └── sample-analytics.csv   # Test dataset
β”œβ”€β”€ contracts/
β”‚   └── DatasetRegistry.sol        # Smart contract for registry
└── package.json

πŸ” Security Considerations

  • Environment Variables: Never commit .env.local to git
  • Private Keys: Use secure vaults in production
  • Testnet Only: Development uses testnet for safety
  • Data Privacy: Only SHA-256 hash stored on-chain, full dataset stays off-chain
  • GDPR Compliant: No PII stored in blockchain metadata

πŸ“Š Performance Metrics

  • Tokenization Time: < 60 seconds (upload to NFT minted)
  • Validation Time: < 5 seconds
  • Hash Generation: < 1 second
  • API Response Time: < 500ms
  • Dashboard Load: < 2 seconds
  • Marketplace Sync: < 1 second

πŸ›£οΈ Future Roadmap

Phase 2: Advanced Features

  • Batch CSV upload & tokenization
  • Fractional dataset ownership (ERC-1155)
  • Advanced search with AI/ML filtering
  • Royalty system for creators

Phase 3: Monetization

  • Built-in payment streaming (HTS token distribution)
  • Dataset subscription models
  • Creator rewards program
  • Governance token (DAO)

Phase 4: Enterprise Features

  • White-label marketplace
  • Compliance & audit trails
  • Data insurance
  • Integration APIs
  • Enterprise wallet support

Key Learnings

  • Hedera's consensus architecture enables 99.9% reliability
  • Privacy-first design (only hash on-chain) is crucial for adoption
  • User experience matters more than technical complexity
  • Real-time analytics drive user engagement
  • Marketplace liquidity requires clear pricing mechanisms

πŸ“ License

MIT License - See LICENSE file for details


🀝 Contributing

Contributions welcome! Please follow the existing code style and submit pull requests to the main branch.


πŸ“ž Support

For issues or questions:

  • Create a GitHub issue
  • Check existing documentation
  • Review test files for usage examples

🎬 Demo Video

[Demo video will be embedded in pitch deck]


CSVToChain: Where Data Meets Blockchain

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors