This project demonstrates a prototype for a data storage drive application that leverages Filecoin’s verifiable storage, powered by Proof of Data Possession (PDP), payable with FIL-backed Stablecoin.
More details on PDP here.
Before setting up Hot Vault, ensure you have the following installed and configured:
- Docker Desktop
- Go 1.21 or later
- Node.js 18.x or later
- npm 9.x or later
- MetaMask browser extension
- PDP Tool - Must be installed and configured
- Use Google Chrome (we are working on supporting more browsers in the near future)
- Disable all wallet extensions except MetaMask (other wallets may cause conflicts)
- USDFC tokens in your MetaMask wallet for Filecoin Calibration Net
- Contract Address:
0xb3042734b608a1B16e9e86B374A3f3e389B4cDf0
- Contract Address:
Important: The server and client applications must be run simultaneously in separate terminal instances.
-
Clone the Repository
git clone https://github.com/FilOzone/hotvault-demo.git cd hotvault-demo -
Server Setup
# Navigate to server directory cd server # Install Go dependencies go mod tidy
Create a
.envfile in the server directory:# Create the .env file touch .envAdd the following content to the
.envfile (note that several values are specific to Calibnet):PORT=8080 ENV=development DB_HOST=localhost DB_PORT=5432 DB_USER=postgres DB_PASSWORD=postgres DB_NAME=fws_db DB_SSL_MODE=disable JWT_SECRET=secret_key JWT_EXPIRATION=24h PDPTOOL_PATH=/absolute/path/to/pdptool # Update this with your pdptool path # The following values are specific to Calibnet PDP Service Provider SERVICE_NAME=pdp-service-name # Service Should be registered in the PDP Tool with the provider SERVICE_URL=https://yablu.net # Service URL where the service is registered RECORD_KEEPER=0xdbE4bEF3F313dAC36257b0621e4a3BC8Dc9679a1 # Calibnet-specific PDP service provider Address
Start the database and server:
# Start PostgreSQL in Docker make postgres-start # Wait for about 10 seconds for PostgreSQL to fully start # Start the server make run
Note: This will start a long-running process. Leave this terminal window open and running.
-
Client Setup
# Open a new terminal window # Navigate back to the project root directory cd /path/to/fws-demo-app # Then navigate to client directory cd client # Install dependencies npm install --legacy-peer-deps
Create a
.env.localfile in the client directory:# Create the .env.local file touch .env.localAdd the following content to the
.env.localfile:NEXT_PUBLIC_API_BASE_URL=http://localhost:8080 # The following addresses are specific to Filecoin Calibration Network (Calibnet) # For mainnet addresses, please refer to the official documentation NEXT_PUBLIC_USDFC_TOKEN_ADDRESS=0xb3042734b608a1B16e9e86B374A3f3e389B4cDf0 NEXT_PUBLIC_PAYMENT_PROXY_ADDRESS=0x0E690D3e60B0576D01352AB03b258115eb84A047 NEXT_PUBLIC_PDP_SERVICE_ADDRESS=0xdbE4bEF3F313dAC36257b0621e4a3BC8Dc9679a1
Start the frontend:
npm run dev
-
Open http://localhost:3000 in Google Chrome
Remember to ensure that:
- You are using Google Chrome
- Only the MetaMask extension is enabled (disable other wallet extensions)
- Your MetaMask is connected to Filecoin Calibration Network
- You have minimum 10 USDFC and tFIL tokens in your wallet
- If you encounter issues with MetaMask, try refreshing the page or reconnecting your wallet
- Ensure your PDP Tool is properly configured and accessible at the path specified in your
.envfile - Check that your MetaMask is connected to the correct network (Filecoin Calibration)
For additional help or to report issues, please open a GitHub issue.