Practical overview
When it fits
Use the application when a head-to-head Solana coinflip room and live lobby suit the task; use the repository when setting up or studying its documented frontend, backend and contract components.
Who it is for
- Solana developers examining a wallet-connected, on-chain multiplayer game architecture.
- Players seeking a head-to-head coinflip flow using SOL or SPL-token stakes, where the application is available.
Documented uses
- Create a coinflip room by choosing a side, stake amount and token.
- Find and join an open room for a head-to-head match.
- Follow room activity and results through a WebSocket-updated lobby.
- Inspect a sample architecture combining an Anchor program, wallet UI, backend relayer and MongoDB.
Requirements & limits
The GitHub repository is public and exposes its README and source. No license is specified.
- Players need a Solana wallet; the documented local-testing prerequisite is a wallet funded with devnet SOL.
- The application uses Phantom through Solana wallet-adapter, and room creation and joining require transaction signing.
- The documented outcome path uses Orao VRF and on-chain settlement; the backend tracks rooms, chat and match history in MongoDB.
- The backend IDL file is gitignored and must be supplied for compilation.
- The included contract folder is described as learning and testing material; the README says the live PvP game uses a deployed program and rebuilding requires matching program ID, IDL and frontend/backend constants.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare the local backend and frontend
Set up the documented local development services and point the frontend at the local backend.
Before you start
- Node.js 18 or later and Yarn or npm
- MongoDB instance and connection credentials
- Solana RPC endpoint
- Funded relayer keypair and fee-receiver public key
- The backend Anchor IDL file, coinflip.ts
Steps
Create a MongoDB database and note its connection credentials.
In coinflip-backend, install dependencies and create the .env file with the RPC, relayer, fee receiver and MongoDB settings; place coinflip.ts in the backend directory.
In coinflip-frontend, install dependencies and set WS_HOST to ws://localhost:8881 and RPC to the chosen Solana cluster URL.
Start the backend with yarn dev, then start the frontend with yarn start and open the documented local address, http://localhost:3000.
Expected outcome
The documented local frontend and WebSocket backend are configured to communicate, with the backend connected to MongoDB and a Solana RPC endpoint.
Guide limitations
- The IDL file is gitignored and required for the backend to compile; the guide does not cover generating or deploying a contract.
- This is a setup sequence from the README, not a verified execution test.
- The README's example RPC uses devnet; a wallet with devnet SOL is listed as a testing prerequisite.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- justFiveDev/Solana-Casino-Coinflip-Game · Official homepage title · retained in its source language

