A web based game to teach children sign language alphabet
We're using Google's Firebase for the backend. The database is a Firestore database.
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.
{
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
}
{
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]]
}
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 :).
To install the dependencies, run the following command:
npm install
We're using prettier
to format the code. You can run the following command to
format the code:
npm run format
To run the project in development mode, run the following command:
npm run watch
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.