This project is a culmination of the work undertaken by Team Ctrl Alt Elite during project phase of the Northcoders Software Engineering Bootcamp. The team comprises of members: Saima Khanom, Nadia Ibrahim, Dave Hickman, Jorge Martin and Joel Morton.
"Get Your Steps In" is an immersive 3D game developed using React as the foundation, while leveraging React-Three-Fiber to construct the captivating virtual environment. Additionally, the game harnesses the power of Rapier as its physics engine. The primary objective of the game is to skillfully navigate all obstacles in the runner's path in order to boost their step count. Upon successfully reaching the end of this obstacle-laden route, players are rewarded with a trip to the kebab shop!
The backend for this app uses mongoDB to store data relating to users who have played the game and want to save their scores to the leaderboard. The REST API fetches the data from the database sorted by scores highest to lowest, as well as only fetching scores from the last 7 days. It also handles post requests from the frontend app when users post their scores to the leaderboard.
The hosted version of the API as well as the endpoints available can be viewed here.
Feel free to explore the front-end repo here.
To run this project locally, you can fork this repo or clone as follows:
git clone https://github.com/saimakhanom/backend-get-your-steps-in.git
cd backend-get-your-steps-in
Once in the project directory, run the following command to install the required dependencies for the project and start the app:
npm install
npm run dev
To run this project, you will need the following:
- Node: v18.12.1
- npm: 8.19.2
To test all existing endpoints for the app, run the follwoing command:
npm t
Each individual test is set up to test the accepted HTTP methods for each endpoint. The tests also cover successful responses and error-handling. They will also test that the body of the JSON response object is in the correct format, if applicable.
This project uses:
- Express: a fast and minimalist web application framework for Node.js
- MongoDB: a popular NoSQL database for storing and retrieving data
- Nodemon: a utility for monitoring and automatically restarting the server during development
- Jest: a JavaScript testing framework for unit testing and assertions
- Jest-Sorted: an extension for Jest to enable sorting assertions
- Supertest: a library for testing HTTP requests and responses
This project is the property of Northcoders.