Byte Bets is a high-end, provably fair cryptographic casino platform. It brings a premium, professional UI to Web3 betting, featuring a suite of classic games powered by Next.js, Web3Modal, and smart contracts.
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS + Framer Motion
- Web3: Wagmi, Viem, Web3Modal
- Graphics: React Three Fiber (Three.js)
- Runtime: Node.js + Express
- Realtime: Socket.IO
- Database: SQLite (via Prisma ORM)
- Validation: Zod
- Environment: Hardhat
- Language: Solidity
- Containerization: Docker & Docker Compose
- CI/CD: GitHub Actions
- Linting: ESLint, Prettier
The repository is structured as a monorepo with distinct functional boundaries:
byte-bets/
├── frontend/ # Next.js UI, wagmi hooks, and 3D scenes
├── game-server/ # Node.js Express server handling game logic and websockets
├── contracts/ # Solidity smart contracts and Hardhat deployment scripts
├── docs/ # Detailed architectural and API documentation
└── docker-compose.yml
For more details, see the Architecture Documentation.
- Node.js (v20+)
- Docker & Docker Compose
- MetaMask (or another Web3 Wallet)
The easiest way to run the entire stack locally is using Docker Compose:
# Clone the repository
git clone https://github.com/yourusername/byte-bets.git
cd byte-bets
# Copy environment variables
cp frontend/.env.example frontend/.env
cp game-server/.env.example game-server/.env
# Spin up the containers
docker-compose up --build- Frontend: http://localhost:3000
- Game Server: http://localhost:8080
If you prefer running services directly on your host machine:
cd contracts
npm install
npx hardhat nodecd game-server
npm install
npx prisma db push
npm run devcd frontend
npm install
npm run devNever commit production secrets! Use .env files locally. Check the respective .env.example files in both the frontend and game-server directories.
MIT License. See LICENSE for details.