### Install Backend Dependencies Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Installs the necessary Node.js dependencies for the backend service. Ensure you have Yarn installed. ```bash cd coinflip-backend yarn install ``` -------------------------------- ### Start Frontend Development Server Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Launches the frontend development server. This command starts a local server that serves the React application, typically accessible at http://localhost:3000. ```bash yarn start ``` -------------------------------- ### Backend Environment Variables Example Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Example configuration for the backend's .env file. These variables are crucial for connecting to the Solana RPC, managing keys, and database access. ```env RPC=https://api.devnet.solana.com PRIVATE_KEY=your_base58_secret_key FEE_RECEIVER=YourFeeReceiverPublicKey DB_USERNAME=your_user DB_PASSWORD=your_password DB_HOST=cluster0.xxxxx.mongodb.net DB_NAME=coinflip ``` -------------------------------- ### Run Backend and Frontend Locally Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Starts the backend and frontend development servers. Ensure MongoDB is running, .env is configured, and WS_HOST/RPC settings are correct. ```bash cd coinflip-backend && yarn && yarn dev ``` ```bash cd coinflip-frontend && yarn && yarn start ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Installs the necessary Node.js dependencies for the frontend React application. Ensure you have Yarn installed. ```bash cd coinflip-frontend yarn install ``` -------------------------------- ### Run Backend Service Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Starts the WebSocket server for the backend. This command is used for local development. The server listens on port 8881. ```bash yarn dev # or: yarn start (nodemon) ``` -------------------------------- ### Build and Test Smart Contract Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Commands to build the Anchor smart contract and run its associated tests. This is part of the optional smart contract development workflow. ```bash cd coinflip-smart-contract/coinflip yarn install anchor build anchor test ``` -------------------------------- ### Generate Anchor IDL Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md Command to parse the Anchor IDL JSON file and generate a TypeScript file. This is necessary for the backend to interact with the deployed smart contract. ```bash anchor idl parse -f target/idl/coinflip.json -o coinflip.ts ``` -------------------------------- ### Coinflip Program Address Source: https://github.com/justfivedev/solana-casino-coinflip-game/blob/main/readme.md The production PvP program address used by the frontend and backend for coinflip games on Solana. ```plaintext 472RXUv8zUX7zm4LprxNsFQvAZYEpSGaY9EUE4akCvG6 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.