A blockchain-ready Texas Hold'em accounting application that tracks rooms, player balances, and round results while keeping the UI consistent across web and native targets.
- Node.js & npm installed locally
- Expo CLI (used via
npx expo) - Hardhat (installed through project devDependencies)
npm install| Command | Description |
|---|---|
npm start |
Start the Expo Metro bundler. |
npm run android |
Launch the Android target. |
npm run ios |
Launch the iOS target (macOS only). |
npm run web |
Open the web target. |
npm run lint |
Run lint checks. |
npm run reset-project |
Reset the project using the provided script. |
npm startThen follow Expo's prompts (w for web, a for Android, i for iOS).
-
Start a local Hardhat node
npx hardhat node
Keep this terminal open. The RPC endpoint is
http://127.0.0.1:8545with chain ID31337. -
Deploy the DePoker2 contract (new terminal)
npx hardhat run scripts/deploy_depoker2.js --network localhost
The script saves deployment info to
deployments/localhost-DePoker2.jsonand updatesblockchain/config/contract.tswith the latest address. -
Start the Expo app (new terminal)
npx expo start
Use
w,a, orito open your target platform once Metro is ready.
Windows users can also follow the automated steps described in TEST_GUIDE.md (
start-blockchain.ps1/start-dev.bat).
Follow these steps after the blockchain services are running to validate on-chain flows. Screens and log outputs mirror the guidance from TEST_GUIDE.md.
-
Create a blockchain room
- In the app, tap "Create New Room".
- Example inputs: Room Name
Blockchain Test, Buy-in1000, Blinds1 / 2. - Enable "Enable Blockchain" and create the room.
- Expected: "Room created on blockchain!" with a room ID (e.g.,
0).
-
Add players
- Tap "Add Player" and enter Name
Alice, Amount1000; repeat forBob. - Expected: "Player added to blockchain!" with distinct addresses for each player.
- Tap "Add Player" and enter Name
-
Start the game
- Tap "Start Game", then "Start New Round".
- Expected: UI switches to BlockchainGamePlay, shows the blockchain icon, and the action button reads "End Round & Vote on Chain".
-
Play and settle a round
- Use Fold / Check / Call / Raise / All-In actions as usual.
- Tap "End Round & Vote on Chain" to select winners (modal on web, alert on mobile) and confirm on-chain settlement and reputation updates.
-
Verify logs
- Hardhat terminal should show transactions such as contract deployment and calls to
joinRoomandstartRoom. - Expo console should log steps like loading test accounts and starting blockchain rooms.
- Hardhat terminal should show transactions such as contract deployment and calls to
- QUICK_START.md – short setup summary
- START_INSTRUCTIONS.md – detailed startup walkthrough
- TEST_GUIDE.md – full blockchain testing guide
- PROJECT_STRUCTURE.md – code layout
- UI_DESIGN.md – interface details
MIT