This is a simple tic-tac-toe game built with React and Firebase. It allows users to play tic-tac-toe against each other in real-time, using Firebase's firestore database to keep the game state synced between players.
Before you can run this project, you'll need to have the following software installed on your computer:
To get started, follow these steps:
- Clone this repository to your local machine using
git clone https://github.com/the-mr-compiler/async-tic-tac-toe.git
. - Navigate to the project directory and install the dependencies by running
npm install
. - Create a new Firebase project and get your Firebase config by following the steps in the next section.
- In src
src/firebase/firebase.js
change the firebaseConfig object with new firebase config from previous section - Run the project in development mode by running
npm start
. This will start a local development server and open the game in your default web browser.
To create a new Firebase project and get your Firebase config:
- Go to the Firebase console.
- Click the "Add project" button.
- Give your project a name and click "Continue".
- Enable the "Google Analytics" for your project and click "Create project".
- Click the "Web" icon to set up a new web app for your project.
- Give your app a nickname and click "Register app".
- Copy the Firebase config object from the Firebase console and use it to replace the firebaseConfig in
src/firebase/firebase.js
file as described in the previous section.
To build and deploy the production version of the app, run the following command:
Copy code
npm run build
This will create a production-ready build of the app in the build
folder. You can then serve the app using any static file server, such as Firebase Hosting.