Introduction
Welcome to the documentation for MVA h2h marketplace!
This documentation will guide you through the features, setup, and usage of the project. Below, you will find a structured list of all the sections included in this documentation for the project.
About This Documentation
The H2H Market Documentation website is a guide for understanding how the Empirica Marketplace Simulation works.
What it does:
- Explains how the H2H market codebase works – covers client folder, server folder, and mechanics.
- Breaks down the code – details how different parts of the system function together.
- Helps developers – modify and expand the codebase.
- Provides deployment instructions – how to install, run, and use the simulation.
- Documents each feature – detailed info on stages, functions, and variables.
This serves as a resource to make the H2H market simulation easy to understand and use.
Files are organized into the following folders:
- Callbacks
- Client Stages
- Client Components
- Deployment
Folder format matches the main branch of the h2h-market repository!
Documentation: How to document code?
You should ideally document everything you push or edit in the h2h-market repository!
Setup for editing the documentation:
The website is built using Docusaurus (https://docusaurus.io/docs). To contribute, pull the code from the documentation
branch in the digital-information-research-lab.github.io
repository.
Steps to start working:
- Install Dependencies: run
install npm
in your terminal. - Run the site locally: run
npm run start
. - Modify and edit markdown files following the documentation structure.
- Commit and push your changes in the
documentation
branch to keep the documentation updated.
Important: Try NOT to edit the configuration file, as it is linked to deployment!
Documentation: Format to document code - Client Side
Each file in the h2h-market repository has a corresponding file in this documentation website.
How to document a function:
- Add a description – What the function does.
- List function parameters – Explain input variables.
- Specify the return value – What the function returns.
- Include a code explanation – With clear logical steps.
- Explain logical flow – Describe how the function works step by step.
Documentation: Format to document code - Callbacks.js
Each function in callbacks.js has a separate file in this documentation website.
How to document a function in Callbacks.js:
- Each function file is divided into conditions.
- Each condition is further divided into smaller conditions (if statements).
- For each condition:
- Include a description of the condition (in the first line).
- Explain how the logic inside the condition works and its logical flow(in the second line).
Callbacks Docs
This section explains the core callbacks used in the game logic.
Client Components Docs
This section provides details on the client-side React components used in the project.
Client Stages Docs
This section explains the different game stages in the client-side implementation.
Deployment Docs
This section explains how to deploy the marketplace in Google Cloud Platform.
By following this documentation, you will gain an in-depth understanding of the MVA h2h marketplace and how to work with it effectively.