A blockchain-based decentralized file sharing system built on Aptos blockchain that allows users to securely upload, encrypt, and share files with granular access control.
This project implements a decentralized file sharing system where users can:
- Upload files with client-side encryption
- Store files on IPFS with Pinata
- Manage file access through smart contracts
- Share files with specific users
- Download and decrypt shared files
The system follows these primary workflows:
- File Upload Flow:
- File Retrieval:
- Aptos Blockchain
- Move Programming Language
- Aptos SDK
- React.js with TypeScript
- Petra Wallet Integration
- crypto-js for encryption
- IPFS (InterPlanetary File System)
- Pinata IPFS Pinning Service
- Vite
- Node.js
- npm
- π Client-side AES encryption
- π Decentralized file storage on IPFS
- π Blockchain-based access control
- π₯ User-to-user file sharing
- π― Granular access management
- π± Responsive web interface
-New users will be asked to register
-When you upload a file, you'll get a signature request to safely store metadata about file on-chain
- Node.js (v14 or later)
- npm
- Aptos CLI
- Petra Wallet Browser Extension
- Clone the repository
git clone https://github.com/PratyushChaudhary/dappthon.git
cd dappthon
- Install dependencies for both contracts and frontend
# Install Move dependencies
cd contracts
aptos init
# Install frontend dependencies
cd ../frontend
npm install
- Set up environment variables
VITE_PINATA_API_KEY =YOUR_PINATA_API_KEY
VITE_PINATA_SECRET_KEY =YOUR_PINATA_SECRET_KEY
VITE_EMAILJS_SERVICE_ID=YOUR_EMAILJS_SERVICE_ID
VITE_EMAILJS_TEMPLATE_ID=YOUR_EMAILJS_TEMPLATE_ID
VITE_EMAILJS_USER_ID=YOUR_EMAILJS_USER_ID
VITE_CONTRACT_ADDRESS=YOUR__CONTRACT_ADDRESS
- Update addresses under Move.toml with your deployed contract address (refer to .aptos/config.yaml).
- Update the NETWORK in frontend/src/utils/constants.ts to your APTOS network (currrently set to testnet).
- Configure your environment variables
- Make sure your Petra wallet is connected to the correct network (testnet/mainnet)
- Deploy smart contracts
cd contracts
aptos move publish
- Start the frontend application
cd ../frontend
npm run dev
contracts/
βββ sources/
β βββ user.move (User management)
β βββ file_upload.move (File metadata storage)
β βββ file_access.move (Access control)
frontend/
βββ src/
β βββ components/
β βββ contexts/
β βββ services/
β βββ hooks/
β βββ utils/
- Connect Wallet
- Click "Connect Wallet" button
- Approve connection in Petra wallet
- Upload File
- Select file
- Enter encryption password
- Click "Upload & Encrypt"
- Save the IPFS hash and password
- Share File
- Enter recipient's address
- Confirm transaction in wallet
- Download File
- Enter IPFS hash
- Provide decryption password
- Click "Download & Decrypt"
Our decentralized file sharing system has numerous potential applications across various sectors:
- Prevents certificate fraud through public verification
- Stores certificates with location and recipient data
- Enables mass verification through public ledger
- Quick fraud detection and reporting
- Creates transparent certificate ecosystem
- Time-bound file sharing capabilities
- Automatic access revocation
- Mandatory directory cleanup protocols
- Prevents unauthorized data retention
- Enhanced user privacy protection
- Secure patient record sharing
- Controlled access for healthcare providers
- Complete audit trail of access
- Patient-controlled data sharing
- Compliance with healthcare regulations
- Emergency access protocols
- Secure transcript and certificate distribution
- Real-time verification system
- Research paper sharing platform
- Student record management
- Cross-institution collaboration
- Alumni document access
- Secure contract sharing
- Version control with timestamps
- Multi-party access control
- Compliance audit trails
- Court document management
- Client-attorney privileged sharing
- Secure document sharing
- Employee record management
- Project documentation
- Board meeting materials
- Shareholder documents
- Inter-department file sharing
- Secure data sharing
- Version control
- Access management
- Citation tracking
- Research output protection
- Cross-institution collaboration
- Digital rights management
- Content distribution
- Access control for premium content
- Proof of ownership
- Revenue sharing management
- Property documentation
- Title deed management
- Rental agreements
- Property inspection reports
- Buyer-seller document exchange
- Certificate of origin
- Quality inspection documents
- Shipping documentation
- Customs clearance
- Product authenticity verification
- All files are encrypted client-side before uploading
- Encryption keys never leave the user's browser
- Smart contract handles access control
- Wallet signatures required for all transactions
I would like to express my sincere gratitude to my teammate Aman Pandey for their valuable contributions to this project.












