Simple Monolithic Backend for Draw and Guess Game using Node.js, Typescript, Mongo DB, Express and Web Sockets. It also supports multiplayer.
In order to run directly on your system, you must have installed NPM, Node.js and MongoDB on your system.
Since it uses Bcrypt
, you are required to install:
node-gyp
andpython
on Linux based systems.- Additionally C# and C++ would be needed for Windows Users.
Can further check out instructions on Bcrypt's Github page.
From the terminal in the root of the project, run the following command:
npm run dev
Above sounds too much? 👀
✨Docker Compose✨ to the rescue!
Run following from the root of the project, and you should be good!
docker-compose up --build
-
There is no authentication in the app. When user opens the app for the first time, a guest user is created in the DB.
-
Main routes of the app are as follows:
-
Words are seeded into DB when server is started.
-
Web Sockets have been used for communication between different users.
-
The user who creates the room is Admin as well as master, that broadcasts to other users about timely events such as timer start, next turn, navigation etc.
You can check sockets event management here.
These APIs have been created for the Kotlin Compose Multiplatform Mobile game which you can check here.