Skip to content

Monster0506/Websocket-Bingo

Repository files navigation

Multiplayer Bingo Game

A real-time multiplayer bingo game built with Next.js and WebSockets.

Features

  • Real-time multiplayer gameplay via WebSocket
  • Create and join game rooms
  • Automatic number marking
  • Win detection (rows, columns, diagonals)
  • Host controls for starting games and drawing balls

Tech Stack

  • Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS
  • Backend: Node.js WebSocket server (ws library)
  • Deployment: Vercel (frontend), Render (WebSocket server)

Getting Started

Prerequisites

  • Node.js 18+
  • npm or pnpm

Installation

npm install

Development

npm run dev

The app will be available at http://localhost:3000

WebSocket Server

The WebSocket server is in the server/ directory. To run it locally:

cd server
npm install
npm start

Set the NEXT_PUBLIC_WS_URL environment variable to ws://localhost:3001 for local development.

Environment Variables

  • NEXT_PUBLIC_WS_URL: WebSocket server URL (e.g., wss://websocket-bingo-server.onrender.com)

Project Structure

├── app/              # Next.js app directory
├── components/       # React components
├── lib/             # Utility functions and clients
├── server/          # WebSocket server
└── public/          # Static assets

License

MIT

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors