aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-11-16 16:17:36 +0100
committerKaran Jayachandra <mail@karanjayachandra.com>2025-11-16 16:17:36 +0100
commit2e323bf7c20cc59a8d2017517b14d615344c5863 (patch)
treefcfc212a79e3e34b0e0bdfcc4cca7fb05f65123e
parent0ce5b4d4ec3303f0fc1e04012e900e5998875981 (diff)
Changed the README
-rw-r--r--README.md89
-rw-r--r--assets/docs.png3
-rw-r--r--src/main.js2
3 files changed, 40 insertions, 54 deletions
diff --git a/README.md b/README.md
index 98e58f4..98662c4 100644
--- a/README.md
+++ b/README.md
@@ -1,79 +1,64 @@
# Match Up
-Match Up! is a flask web application to create pairings of players from a pool and assign to a limited number of slots.
+Match Up! is a web application to create pairings of players from a pool and assign to a limited number of slots. It is [live](https://mu.karanj.com)!
Here it is in action:
-![Game Page](https://gitlab.com/KaranJayachandra/match_up/-/raw/main/docs/game_screen.png?ref_type=heads)
-
-![Player Page](https://gitlab.com/KaranJayachandra/match_up/-/raw/main/docs/player_screen.png?ref_type=heads)
+![Game Page](https://gitlab.com/KaranJayachandra/match_up/-/raw/main/assets/docs.png?ref_type=heads)
Some features of this application are:
-- Propose pairings to create a round
+- Activate and deactivate named players, guests and courts
+- Propose pairings to each court from a set of players
+ - Considers player levels (optionally mingle players)
+ - Prioritize players that haven't played as many games
- Timer to limit the time for each round
-- Create pairings based on player level
-- Prioritize players with fewer played games
-- Blocking spaces that aren't available any more
-- Blocking players that aren't available any more
-- Regular and guest players
What this application ***IS***:
-- Simple: Easy to modify, extend and use
+- Open: The source code is available for modifications and extension
+- Private: All player data is stored in your browser via local storage
What this application ***IS NOT***:
-- Secure: This was designed to be used locally on a machine
-- Performant: It was designed for use by a single admin user
+- Secure: The data is available for anyone to observe via the browser console
+- Performant: Works with a small number of named players (<3 MB)
-## How to install
+## Usage
-With [python](https://realpython.com/installing-python/) installed, run the following command preferably in a seperate virtual environment.
+- Select or deselect the courts available
+- Check in and check out the regular players
+- Optionally add guests to the game
+ - Beginner: Level 1
+ - Novice: Level 3
+ - Intermediate: Level 6
+- Choose how the pools should be created
+ - All levels (Disregard levels)
+ - 2 Levels (Players split into two categories)
+ - 3 Levels (Players split into three categories)
+ - Skill based (Consider all levels)
+- Request a proposal and confirm to start a round
+- Repeat as many times as needed
+- Reset the session at the bottom of the page
+- You can update the list of players by providing a CSV file. The format is show below:
-### Using pip
+|id|first_name|last_name|level|
+|---|---|---|---|
+|104|John|Doe|4|
+|104|Jane|Doe|9|
-```bash
-pip install git+https://gitlab.com/KaranJayachandra/match_up.git
-```
+Levels are defined between 1 to 10.
-### How to complile from source
+## Compilation
-Please install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [python](https://realpython.com/installing-python/) on your machine before proceeding further. Once installed, open the terminal to a folder of your choosing and run the following commands to setup the application.
+Please install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [node](https://nodejs.org/en) on your machine before proceeding further.
+
+Once installed, open the terminal to a folder of your choosing and run the following commands to setup the application.
```bash
git clone https://gitlab.com/KaranJayachandra/match_up.git
cd match_up
-python -m venv .venv
-.venv/Scripts/activate
-pip install .
-```
-
-To run the application, just run:
-
-```bash
-match_up
-```
-
-The application should be running now in 'localhost', just navigate there using a browser. Use the `--help` option to get an explanation of the application.
-
-## Startup Automation
-
-Create a powershell script with the following content in the folder with the code.
-
-```bash
-.venv/Scripts/activate
-pythonw match_up
+npm install
```
-Create a task using Task Scheduler to run this script on start up.
-
-## Architectural Design Record
-
-This part of the README focuses on the motivation of why this application was built and contains background information. Please read on in case you want to know more about the technological choices made.
-
-This is a simple application build using [flask](https://flask.palletsprojects.com/en/3.0.x/), [htmx](https://htmx.org/) and [Bulma](https://bulma.io/). Flask acts as the backend that generates HTML responses using the wonderful [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) templating language. Interactivity of the application is done using HTMX using simple GET and POST methods to the backend. The application is styled using the Bulma with its easy to used CSS classes.
-
-- Python was choose to prioritize delivery speed not for performance. More over, the sheer number of Python programmers allows for the application to be easily maintained by others.
-- Flask was choosed as it more than enough for the features that I needed instead of Django. The application is to run locally on a laptop and doesn't really need to have complicated features.
-- Due to a lack of frontend developers, the simplest UI stack was choosen. HTMX requires no need of JavaScript and was a natural choice. The website needed some basic styling and after looking at a few CSS frameworks, Bulma provided most of the styling. A toasting library, "Notyf" was also used for simple notifications to be sent via some custom javascript code for a simple timer.
+To run a development server run `npm run dev` or run `npm run build` to create a optimized bundle of static content. I choose to serve this content via GitLab pages but you could choose to do so in any other server.
diff --git a/assets/docs.png b/assets/docs.png
new file mode 100644
index 0000000..a285f5d
--- /dev/null
+++ b/assets/docs.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:15e4f5d832d0589d5054bcbfa61e011143051c20ed6150501ff98f2935d5e436
+size 332802
diff --git a/src/main.js b/src/main.js
index 654300a..59f66d0 100644
--- a/src/main.js
+++ b/src/main.js
@@ -37,7 +37,6 @@ export class GameManager extends Manager {
}
addBehaviour() {
let confirmedStatus = this.data[0].status;
-
let description = confirmedStatus ? "Round " + this.round : "Proposal";
document.getElementById("Game-description").innerHTML = description;
}
@@ -128,7 +127,6 @@ export class GameManager extends Manager {
for (let i = 0; i < this.data.length; i++) {
this.data[i].status = true;
}
- // Increment the number of games played
let selectedPlayers = [];
for (let game of this.data) {
console.log(game);