muchubatactics / usl-game

A web based game to teach children sign language alphabet

Home Page:https://muchubatactics.github.io/usl-game/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usl-game

A web based game to teach children sign language alphabet

Backend

We're using Google's Firebase for the backend. The database is a Firestore database.

Database Structure or Schema

We have two collections in the database: players and sessions. The players collection stores the user's game information and the sessions collection stores the user's session information like duration played, login times, logout times, etc.

players

{
    name: string,
    age: number,
    gender: string,
    badges: array,
    id: string, // this is auto-generated by Firebase so don't pass it during creation of a new player or update
    createdAt: timestamp/Date, // UNIX timestamp since epoch
    updatedAt: timestamp/Date, // UNIX timestamp since epoch
}

sessions

{
    id: string,
    playerId: string,
    levelStartedAt: timestamp,
    levelEndedAt: timestamp,
    durationPlayed: number,
    scores: string, // stored as JSON string that resolves to array of arrays of integers e.g. [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
}

For Developers

NOTE: We are using npm as the package manager. Make sure you have npm installed on your system. We're aware of other package managers like yarn or pnpm but we're using npm for this project :).

Install dependencies

To install the dependencies, run the following command:

npm install

Formatting the code

We're using prettier to format the code. You can run the following command to format the code:

npm run format

Running in development mode

To run the project in development mode, run the following command:

npm run watch

Make final build

To make the final build, run the following command:

npm run build

This will create a dist directory with the final build.

NOTE: The backend expects all the data it receives to be in the format specified above. We've not included deletion of users or sessions in the backend. We're assuming that the user will not be deleted from the database. All data is stored in the database permanently.

About

A web based game to teach children sign language alphabet

https://muchubatactics.github.io/usl-game/


Languages

Language:JavaScript 57.5%Language:CSS 29.5%Language:HTML 13.1%