modaq
v1.38.1
Published
Quiz Bowl Reader using TypeScript, React, and MobX
Downloads
1,287
Readme
MODAQ
MODAQ (MODerator Assistant for Quizbowl) is an application for assisting moderators with reading and scorekeeping quizbowl matches. It helps track all the events that occur during the match, such as buzzes, substitutions, protests, and more. It also tracks buzz point data and can export it to a QBJ file, a JSON file, and/or TJ/UCSD Sheets.
See the wiki to learn how to use the reader.
Importing
To use MODAQ in your project as an npm package:
Add
modaqas a dependency to yourpackage.jsonfile:npm install modaqIn your React file, import MODAQ with:
import * as Modaq from "modaq";Then use the control like
<Modaq.ModaqControl />.If you want to export to Google Sheets format, you need to supply your application's client ID and include this in your HTML:
<script async defer src="https://apis.google.com/js/api.js"></script>If you want to use the packet parser (instead of passing in a packet parameter), you need to include a URL to YAPP.
For details on props, visit the ModaqControl props section of the MODAQ wiki.
Development
Codebase Overview
See the MODAQ Wiki for a more thorough overview of how MODAQ works internally.
Prerequisites
VS Code is recommended as an IDE. If using VS Code, install the Prettier extension for code formatting.
Setup
Download the latest release or clone the repository:
git clone https://github.com/alopezlago/MODAQ.git cd MODAQInstall dependencies:
npm install # or yarn install
Building
To build the project:
npm run build
# or
yarn buildThis compiles TypeScript and prepares the output.
Development Server
To run the development server:
npm run dev
# or
yarn devFor testing via the Dev server (required for Google Sheets functionality), which requires HTTPS:
Add this entry to your hosts file (on macOS/Linux:
/etc/hosts, on Windows:C:\Windows\System32\drivers\etc\hosts):127.0.0.1 localhost.quizbowlreader.com- If using Chrome, you may also need to set the flag at
chrome://flags#local-network-access-check.
- If using Chrome, you may also need to set the flag at
Run the dev server:
npm run dev # or yarn devOpen https://localhost.quizbowlreader.com:5173/out
You can accept the HTTPS certificate or create your own self-signed certificate.
Testing
To run the tests:
npm test
# or
yarn testTests use Mocha and are located in the tests/ directory.
Linting
To check for linting issues:
npm run lint
# or
yarn lintTo automatically fix linting issues:
npm run lintFix
# or
yarn lintFixDemo
To build the demo:
npm run buildDemo
# or
yarn buildDemoTo serve the demo:
npm run serve
# or
yarn serveContributing
Contributions are welcome! Please follow these steps:
- Fork the repository. and create a feature branch.
- Alternatively, you can clone this repository, and create a feature branch on this repository directly.
- Commit your changes to the feature branch.
- Ensure
npm run lintandnpm testpass without warnings or failures. - Submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
