Blockfrost is a free API service that provides access to the Cardano blockchain. It's required for TrustlessTask to submit real transactions to the blockchain.
-
Visit Blockfrost website:
https://blockfrost.io -
Click "Sign Up" or "Get Started"
-
Create account:
- Enter your email
- Create password
- Verify email (check inbox/spam)
-
Log in to Blockfrost dashboard
-
Click "Add Project" or "New Project"
-
Configure project:
- Name: TrustlessTask (or any name you like)
- Network: Select "Cardano Preprod" (IMPORTANT!)
- Click "Create Project"
-
Find your project in the dashboard
-
Click on the project to open details
-
Copy the Project ID:
- It looks like:
preprodXXXXXXXXXXXXXXXXXXXXXXXXXXXX - This is your API key!
- It looks like:
-
Open the file:
frontend/.env -
Find this line:
VITE_BLOCKFROST_PROJECT_ID=preprodDemo123
-
Replace with your actual key:
VITE_BLOCKFROST_PROJECT_ID=preprodYourActualKeyHere
-
Save the file
-
Stop the current server:
- Go to terminal running frontend
- Press
Ctrl + C
-
Start it again:
cd frontend npm run dev -
Wait for it to start:
- Should show:
ready in XXXXms - URL:
http://localhost:3000orhttp://localhost:3001
- Should show:
Your wallet needs testnet ADA to pay transaction fees:
-
Get your wallet address:
- Connect wallet in TrustlessTask
- Copy your address from the navbar
-
Visit Cardano Faucet:
https://docs.cardano.org/cardano-testnet/tools/faucet/ -
Request testnet ADA:
- Paste your wallet address
- Complete captcha
- Click "Request"
- Wait ~20 seconds
-
Verify you received it:
- Check your wallet
- Should show balance (e.g., 1000 tADA)
Once setup is complete:
- Create a project in TrustlessTask
- Complete a milestone (as freelancer)
- Approve milestone (as client)
- Watch for wallet popup - Approve the transaction
- Transaction submitted to Cardano blockchain!
- View on explorer: https://preprod.cardanoscan.io
Problem: API key is wrong or not set
Solution:
- Double-check you copied the full key
- Make sure it starts with
preprod - No extra spaces before/after
- Restart frontend server after changing .env
Problem: Wallet has no testnet ADA
Solution:
- Visit faucet and request testnet ADA
- Wait 20-30 seconds for confirmation
- Refresh wallet balance
- Try transaction again
Problem: Various reasons
Solutions:
- Check wallet has enough ADA (need ~2 ADA for fees)
- Make sure wallet is unlocked
- Try different wallet (Nami, Lace, Eternl)
- Check Blockfrost status: https://status.blockfrost.io
Problem: .env changes not loaded
Solution:
- Stop frontend server (Ctrl+C)
- Clear browser cache (Ctrl+Shift+Delete)
- Start frontend again:
npm run dev - Hard refresh browser (Ctrl+F5)
The free tier includes:
- ✅ 50,000 requests per day
- ✅ 10 requests per second
- ✅ Unlimited projects
- ✅ All networks (Preprod, Preview, Mainnet)
This is more than enough for development and testing!
- Never commit your API key to Git
- Never share your API key publicly
- Use .env files (already in .gitignore)
- Different keys for dev/prod
Your .env file is already in .gitignore, so it won't be committed to Git. This keeps your API key safe.
When ready for production:
-
Create new Blockfrost project:
- Select "Cardano Mainnet" (not Preprod)
- Get new API key
-
Update .env:
VITE_BLOCKFROST_PROJECT_ID=mainnetYourKeyHere VITE_NETWORK=mainnet
-
Use real ADA:
- No faucet for mainnet
- Real ADA costs real money
- Test thoroughly on testnet first!
- Documentation: https://docs.blockfrost.io
- Status Page: https://status.blockfrost.io
- Discord: https://discord.gg/blockfrost
- Check console (F12) for detailed error messages
- Review logs in terminal
- Test on testnet before mainnet
# Required for blockchain transactions
VITE_BLOCKFROST_PROJECT_ID=preprodYourKeyHere
# Network (preprod for testing, mainnet for production)
VITE_NETWORK=preprod
# API URL (usually don't need to change)
VITE_API_URL=http://localhost:8080/api/v1- Blockfrost: https://blockfrost.io
- Testnet Faucet: https://docs.cardano.org/cardano-testnet/tools/faucet/
- Preprod Explorer: https://preprod.cardanoscan.io
- Mainnet Explorer: https://cardanoscan.io
After setup:
- ✅ Create test project
- ✅ Complete milestone (sends 1 ADA to self)
- ✅ Approve milestone (sends ADA to freelancer)
- ✅ View transaction on explorer
- ✅ Verify funds transferred
Congratulations! You're now making real Cardano blockchain transactions! 🎉