Skip to content

IsmailBinMujeeb/TicTacToe-MultiPlayer-Game

Repository files navigation

TicTacToe-MultiPlayer-Game

Welcome to the TicTacToe Multiplayer Game! This application allows multiple players to engage in the classic TicTacToe game in real-time.

wakatime

Features

  • Real-Time Multiplayer: Play TicTacToe with friends or other players in real-time.
  • User Authentication: Secure login and registration system to keep track of player statistics.
  • Interactive UI: A user-friendly interface that enhances the gaming experience.

Technologies Used

  • EJS CSS JavaScript
  • NodeJS Express.js
  • MongoDB Redis
  • Socket.io

Installation GitHub Docker

To set up the project locally, follow these steps:

  1. Clone the Repository:
git clone https://github.com/IsmailBinMujeeb/TicTacToe-MultiPlayer-Game.git
cd TicTacToe-MultiPlayer-Game
  1. Install Dependencies: Ensure you have Node.js and npm installed. Then, run:
npm install
  1. Set Up Environment Variables:
  • Duplicate the .example.env file and rename the copy to .env.
cp .example.env .env
  • Open the .env file and configure the following variables:
PORT=3000
SESSION_SECRET=
GOOGLE_CALLBACK_URL=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
DB_CONN_STR=
REDIS_URL=
  1. Start the Application:
npm start

The server will start, and you can access the application at http://localhost:3000.

Docker Deployment

For those who prefer using Docker:
Docker Image

  1. Build the Docker Image:
docker build -t tictactoe-multiplayer-game .
  1. Run the Docker Container:
docker run -d -p 3000:3000 --name tictactoe-game tictactoe-multiplayer-game
  1. Or pull the image
docker pull ismailbinmujeeb/tic-tac-toe

The application will be available at http://localhost:3000.

Alternatively, you can use Docker Compose:

  1. Start Services:
docker-compose up -d

This will set up the application along with any dependencies defined in the docker-compose.yml file.

Contributing

We welcome contributions! If you'd like to contribute:

  1. Fork the repository.

  2. Create a new branch (git checkout -b feature/YourFeature).

  3. Commit your changes (git commit -m 'Add YourFeature').

  4. Push to the branch (git push origin feature/YourFeature).

  5. Open a Pull Request.

Please ensure your code adheres to the project's coding standards and includes appropriate tests.