GamBles is a full-stack betting game platform inspired by Stake.com, built using the MERN stack (MongoDB, Express.js, React, Node.js). It features wallet-based betting with a Mines and Dice game, user authentication, wallet tracking, and transaction history โ all wrapped in a modern, responsive UI.
โ ๏ธ This is a learning project and not crypto-based. All funds and bets are simulated with virtual money.
๐ Demo Video ๐ Live Link
- ๐ JWT-based authentication with secure refresh tokens
- ๐งฉ Mines game & ๐ฒ Dice game with profit logic
- ๐ฐ Real-time wallet system and day-wise and bet-wise wallet graph
- ๐ User bet stats and winning streak tracking
- ๐ค Deposit/withdraw transactions with Razorpay simulation
- ๐ก๏ธ Admin view and user activity logging
- ๐ฑ Fully responsive design using Tailwind CSS
- Frontend: React, Tailwind CSS, Vite
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT (access + refresh tokens)
- Payments (Simulated): Razorpay
- Email + OAuth: Resend, Gmail, GitHub
- Docs: Postman Collection
Explore the complete Postman API collection here:
๐ GamBles Postman Docs
POST /registerโ Register new userPOST /loginโ Log in with credentialsPOST /logoutโ Logout sessionGET /my-detailsโ Get logged-in user detailsPOST /refresh-tokenโ Refresh access tokenPOST /resend-verificationโ Resend email verificationPOST /reset-passwordโ Request OTP for resetPOST /verify-reset-password-otpโ Verify OTPPOST /set-new-passwordโ Reset passwordGET /get-day-wise-wallet-statsโ Wallet graph dataPOST /deposit-moneyโ Add virtual funds
POST /mines/start-mineโ Start new mines gamePATCH /mines/reveal-tileโ Reveal a tilePOST /mines/end-mineโ End and cash outPOST /dice/roll-diceโ Roll dice and win/lose
POST /create-betโ Record a game betGET /fetch-bets-by-userโ Get all user betsPOST /fetch-user-bet-by-gameโ Filter bets by gameGET /get-user-totalwin-and-winningstreakโ Stats summary
POST /create-transactionโ Deposit/Withdraw moneyGET /get-all-transaction-by-user-idโ Get full transaction historyPOST /update-transaction-statusโ Admin: update payout status
POST /create-deposit-orderโ Start a simulated Razorpay orderPOST /verify-deposit-paymentโ Verify simulated depositPOST /withdraw-payout-razorpayโ Simulated Razorpay payout
MONGODB_URI=your_mongo_uri
SECRET_KEY_ACCESS_TOKEN=your_access_secret
SECRET_KEY_REFRESH_TOKEN=your_refresh_secret
NODE_ENV=development
CLIENT_URL=http://localhost:5173
SERVER_URL=http://localhost:3000
RESEND_API_KEY=your_resend_api_key
SMTP_USER=your_smtp_user
SMTP_PASSWORD=your_smtp_password
SENDER_EMAIL=your_sender_email
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
RAZORPAYX_ACCOUNT_NUMBER=your_account_numberVITE_API_URL=http://localhost:3000
VITE_RAZORPAY_KEY_ID=your_razorpay_key_id# 1. Clone the repository
git clone https://github.com/YashBhut1524/Gambles
cd Gambles
# 2. Set up frontend
cd client
npm install
cp .env.example .env
# Add your VITE_API_URL and Razorpay Key
# 3. Set up backend
cd ../server
npm install
cp .env.example .env
# Fill out all required keys in .env
# 4. Run development servers
npm run dev # in /server
npm run dev # in /client- GitHub: YashBhut1524
- LinkedIn: linkedin.com/in/yashbhut1524
- Twitter/X: @YaShh1524
- Instagram: @dev.yashh1524
- YouTube: @yashh_1524
This project is open-source and available under the MIT License.
Feel free to fork the repo, open issues, or submit pull requests. All suggestions, features, or improvements are welcome!