A decentralized, blockchain-powered version of the classic rock-paper-scissors game, built with TypeScript, React, and Flow blockchain integration.
- Blockchain Integration: Utilizes Flow Testnet for transparent and secure game logic.
- User Authentication: Authenticates users via thirdweb's Sign-In with Ethereum (SIWE) for seamless access.
- Smart Contract: Interacts with a smart contract deployed on the Flow Testnet.
- Responsive Design: Optimized for both desktop and mobile platforms.
- Accounts and Credentials:
- Vercel account for deployment.
- thirdweb dashboard account.
- Flow Wallet Testnet account.
-
Create a
.env
File:- Add your thirdweb client ID:
NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your_thirdweb_client_id
- Add your thirdweb client ID:
-
Set Up Flow Credentials:
- Create a
testnet-account.pkey
file with your Flow private key. - Update
flow.json
with your Testnet account address:{ "accounts": { "testnet-account": { "address": "<YOUR_FLOW_ADDRESS>", "key": { "type": "file", "location": "testnet-account.pkey" } } } }
- Create a
-
Install Flow CLI:
- Run the following command to install Flow CLI:
sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
- Run the following command to install Flow CLI:
-
Deploy Contract to Testnet:
- Deploy your contract using Flow CLI:
flow project deploy --network testnet
- Deploy your contract using Flow CLI:
-
Install Dependencies:
- Install project dependencies:
npm install
- Install project dependencies:
-
Build the Project:
- Build the project for production:
npm run build
- Build the project for production:
-
Deploy to Vercel:
- Deploy your application to Vercel:
vercel --prod
- Deploy your application to Vercel:
- Private Key: Keep your
testnet-account.pkey
secure and never commit it to version control. - thirdweb Client ID: Your thirdweb client ID (
NEXT_PUBLIC_THIRDWEB_CLIENT_ID
) is safe to commit. - Environment Variables: Add
.env
to your.gitignore
file if it's not already there.
- Rahul Khandait: @rahulkhandait
Feel free to contribute or reach out to the team for any queries!
Note: Since the project is on the Flow Testnet, users can acquire test FLOW tokens from the Flow Testnet Faucet to interact with the application.
For more information on integrating thirdweb's Sign-In with Ethereum, refer to their documentation.