FileGuard is a decentralized file storage and sharing system powered by Ethereum smart contracts. It supports subscription-based access with multiple tiers and billing cycles, allowing users to upload, manage, and securely share encrypted files on-chain with full transparency and control.
-
🔐 Subscription-Based Access
- Tiers: Free | Basic | Pro | Business
- Billing: Monthly | Quarterly | Yearly
-
📂 Decentralized File Management
- Upload and register files with metadata
- Track usage and storage consumption
-
🔄 Secure File Sharing
- Share file access with recipients via on-chain permissions and encrypted keys
-
💰 Tokenized Payments
- Pay for subscriptions in ETH or FIL
- Integrated with Chainlink price feeds for accurate USD to crypto conversion
-
🧠 Smart Contract Controlled
- Built in Solidity with modular architecture for subscriptions, access control, and sharing logic
- Node.js ≥ 16
- npm or yarn
- MetaMask wallet
- Hardhat (or Truffle)
- Web3.js or Ethers.js
- Infura or Alchemy API
git clone https://github.com/IamTamheedNazir/FileGuard.git
cd FileGuard
npm install-
Set up your
.envfile:PRIVATE_KEY=your_wallet_private_key INFURA_API_KEY=your_infura_project_id
-
Compile and deploy to Sepolia:
npx hardhat compile npx hardhat run scripts/deploy.js --network sepolia
-
Copy the deployed contract address and ABI to your frontend config.
- Choose your tier and billing cycle
- Submit the subscription via MetaMask
- Provide the file hash and size
- Smart contract stores metadata with your subscription ID
- Enter the file hash, recipient’s address, and encrypted access key
- The recipient can retrieve and decrypt the file via smart contract query
- Solidity – Smart contracts for subscription & sharing logic
- Chainlink – Price feed integration for real-time crypto rates
- Hardhat – Development and deployment
- IPFS (Planned) – Off-chain storage backend
- React + Ethers.js (Frontend, Optional) – Web3 integration for user interaction
FileGuard/
├── contracts/ # Smart contract files (Solidity)
├── scripts/ # Deployment scripts
├── test/ # Contract test cases
├── frontend/ # React-based Web3 UI (optional)
├── .env # Environment variables (ignored)
├── hardhat.config.js # Hardhat config
├── README.md # This documentationWe welcome contributions from the community!
- Fork the repository
- Create a new branch
- Submit a pull request with changes
Before contributing, please check the CONTRIBUTING.md (coming soon).
This project is licensed under the MIT License.
See the LICENSE file for more information.
Created with ❤️ by Tamheed Nazir
📧 Email: tamheednazir1@gmail.com
🔗 GitHub: @IamTamheedNazir