HufflePay is a platform that leverages Bitcoin Lightning Network and Taproot to enable instant cross-currency payments and asset transfers on Bitcoin. It allows users to send payments in one currency (e.g., USD stablecoins) and have the recipient receive them in another currency (e.g., BTC or EUR stablecoins).
The project consists of two main parts:
- Backend: A Node.js API server that handles the actual currency swaps using Lightning Network and Taproot Assets
- Frontend: A web interface for users to interact with the system
- Cross-currency transfers using Bitcoin Lightning Network
- Real-time currency conversion
- Low-fee transactions
- Educational content about cryptocurrencies and finance
- User dashboard with transaction history
- Social feed for sharing financial journeys
- Node.js (v16+)
- npm
- Docker and Docker Compose (for running the Bitcoin and Lightning nodes)
-
Navigate to the app directory:
cd hufflepay -
Install dependencies:
npm install
-
Set up Bitcoin and Lightning nodes:
docker-compose up -d
-
Create a wallet for each Lightning node:
# Create a new wallet with the docker-compose container names docker exec -it hufflepay-lnd-alice-1 lncli --network=regtest create docker exec -it hufflepay-lnd-bob-1 lncli --network=regtest create docker exec -it hufflepay-lnd-edge-1 lncli --network=regtest create
-
Fund the nodes:
# Create a Bitcoin wallet docker exec -it hufflepay-bitcoind-1 bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoin createwallet "mywallet" # Generate an address NEW_ADDRESS=$(docker exec -it hufflepay-bitcoind-1 bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoin -rpcwallet=mywallet getnewaddress) # Generate blocks docker exec -it hufflepay-bitcoind-1 bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoin -rpcwallet=mywallet generatetoaddress 101 "$NEW_ADDRESS"
-
Start the server:
npm start
-
The backend API will be available at http://localhost:3000/api
-
Navigate to the frontend directory:
cd hufflepay/frontend -
Install dependencies:
npm install
-
Start the frontend server:
npm start
-
The frontend will be available at http://localhost:8080 (Can change port if required)
- Open your browser and go to http://localhost:8080
- You can navigate through the different pages:
- Home page: View educational content and social feed
- Exchange page: Perform currency exchanges
- Dashboard: View transaction history and account information
- Reels: Educational videos about finance and crypto
For demo purposes, you can use the following account:
- Username: demouser
- Password: demopassword


