This backend handles user authentication, game room creation, and multiplayer communication using Express, Socket.IO, and Supabase. It supports both solo and multiplayer modes with real-time interactions.
- User Authentication: Secure login and registration with password hashing.
- Game Room Management: Create, join, and delete game rooms for online multiplayer.
- Real-time Communication: Synchronize game state between players using Socket.IO.
- Supabase Integration: Store user and game data.
- Express for the server framework.
- Socket.IO for real-time bidirectional event-based communication.
- Supabase for database storage.
- Bcrypt for password hashing.
Create a .env file in the root directory with the following variables:
PORT=5000
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
- Install dependencies:
npm install- Start the server:
npm run startBy default, the server runs on http://localhost:5000 (or your local ip adress).
- Fork the repository.
- Create a new branch (
feature/YourFeature). - Commit changes.
- Push to the branch.
- Create a pull request.