Skip to content

luazhizhan/multiplayer-tic-tac-toe

Repository files navigation

multiplayer-tic-tac-toe

About the project

A realtime multiplayer tic-tac-toe web application.

Getting Started

Setup and run the project locally on your workstation.

Installation

  1. Node.js

Setup

  1. Create a Firebase project with Annoymous Authentication and Realtime Database.

  2. Update Realtime Database security rules.

{
  "rules": {
    ".read": true,
    ".write": true
  }
}
  1. Clone this repo.

  2. Install packages

npm install
  1. Create .env file with the following variables at the root directory of this repo. These values can be found in your Firebase project.
NEXT_PUBLIC_FIREBASE_KEY=<KEY>
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=<DOMAIN>
NEXT_PUBLIC_FIREBASE_DATABASE_URL=<URL>
NEXT_PUBLIC_FIREBASE_PROJECT_ID=<ID>
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=<BUCKET>
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=<ID>
NEXT_PUBLIC_FIREBASE_APP_ID=<ID>
  1. Start application in development mode
npm run dev

Code analysis

Eslint is configured for the project. a11y plugin has been added to check for issues with accessbility.

npm run lint