Storage web application running on top of Rinkeby testnet that uses IPFS protocol for storing files in an open and decentralized way.
This is a dApp or decentralized application with a simple frontend connected with a set of backend services composed by a Smart Contract deployed to Rinkeby testnet and a storage service using IPFS.
The Smart Contract role is to store basic information about the users and files stored in the app.
IPFS is a P2P API for storing files in a decentralized way, where each client work as a node for persisting files. Learn more
- Solidity for Smart Contract development on Ethereum.
- Truffle Suite for local infrastructure and SC deployment.
- Ganache as a local development blockchain.
- Metamask for in-browser user authentication.
- React.js (Next.js Framework).
- Mocha/Chai for Smart Contract testing
- Tailwind CSS for styling components.
- Ant UI framework for prebuilt UI components.
- Github Actions for CI and automated tests.
- Vercel for CD and Frontend hosting.
- The users connect their account to Metamask after pressing Connect button (the app attempts to do this automatically if there is an existing account logged in in Metamask).
- Once there is a connected account in the app, the app enables the button for start uploading files on the Upload section.
- Once you uploaded your first file, you will be able to see the result in the Files section (Below the upload section).
First, configure .env
file for blockchain configuration
INFURA_PROJECT_ID = <Your Infura Project ID>
PRIVATE_KEY = <Your Infura private key>
ACCOUNT_ADDRESS = <Your Account Address>
Then, configure .env.local
file for frontend application.
NEXT_PUBLIC_MODE = <PROD | DEV (depending of your environment)>
NEXT_PUBLIC_CONTRACT = <Address of the smart contract>
In case you want to run locally for development, run a local blockchain using Ganache.
First, initialize truffle project on the repo.
truffle init
Then migrate smart contracts to ganache or any other network (see truffle-config.js
for configuring networks).
In case you're running Ganache.
truffle migrate --network development
In case you prefer to debug against a deployed Smart Contract on rinkeby.
truffle migrate --network rinkeby
Then, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.