Skip to content

RajeshJ3/multiplayer-math-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiplayer Math Game | Hackathon Submission

Description

Multiplayer Math Game is an online game, that anyone can play with their friends. The application is Build using the FARM(FastAPI, React, and MongoDB).

Screenshots

Home Page Lobby Page
Home Page Screenshot of Lobby

Game Page Results Page
Game Page Results Page

How to run it locally?

Step 1. Clone the repository

$ git clone git@github.com:RajeshJ3/multiplayer-math-game.git
$ cd multiplayer-math-game

Step 2. Create .env file in the backend folder

$ nano .env # save the following credentials into .env file
DB_URL=mongodb+srv://<user>:<password>@<host>/?retryWrites=true&w=majority
DB_NAME=<DB_NAME>

Step 3. Installing dependencies

Backend

$ cd backend
$ python3 -m venv env
$ source env/bin/activate
(env)$ pip install -r requirements.txt

Frontend

$ cd frontend
$ yarn # I used yarn for the development, you can use npm as well

Step 4. Spinning the servers up

Backend

$ cd backend
(env)$ # export the environment variables from .env file 
(env)$ # or save the environment variables into your environment
(env)$ python main.py
INFO:     Started server process [9267]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

Frontend

$ cd frontend
$ yarn start

Now, open http://localhost:3000/ in browser.

Prerequisites

  • Git
  • Python 3.8
  • Mongodb cloud
  • Node
  • yarn/npm

Happy Coding

Cheers

About

Multiplayer Math Game - FARM Stack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages