Automatic court reservations
Find a file
dependabot[bot] 09907a4316
Bump sqlite3 from 5.1.4 to 5.1.5
Bumps [sqlite3](https://github.com/TryGhost/node-sqlite3) from 5.1.4 to 5.1.5.
- [Release notes](https://github.com/TryGhost/node-sqlite3/releases)
- [Commits](https://github.com/TryGhost/node-sqlite3/compare/v5.1.4...v5.1.5)

---
updated-dependencies:
- dependency-name: sqlite3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 21:51:13 +00:00
.github/workflows Correcting docker build command 2023-01-28 11:28:46 +01:00
docker Reoptimization of docker (perhaps) 2023-02-13 15:49:48 +01:00
src Changing how sessions are started and handled to fix issues with multiple reservation requests 2023-02-20 11:08:56 +01:00
tests Changing how sessions are started and handled to fix issues with multiple reservation requests 2023-02-20 11:08:56 +01:00
.eslintrc.json Adding some pretty stuff 2021-11-24 00:00:22 +01:00
.gitignore Switching to use SQLite instead of MySQL 2023-01-28 10:51:46 +01:00
.nvmrc Updating node version, improving build process and adding required modules to dev dependencies 2022-11-07 11:44:57 +01:00
.prettierrc Adding some new packages for password/database features; updating old packages 2022-10-23 11:54:35 +02:00
jest.config.ts Spliting out server code, adding unit test for server 2022-11-27 15:59:20 +01:00
package-lock.json Bump sqlite3 from 5.1.4 to 5.1.5 2023-03-13 21:51:13 +00:00
package.json Bump sqlite3 from 5.1.4 to 5.1.5 2023-03-13 21:51:13 +00:00
README.md Readme updates for anyone who will read it (future me) 2023-02-10 23:51:41 +01:00
tsconfig.json Removing rollup and relying on tsc to make builds. Also updated Docker to have a working development version 2023-01-20 09:38:50 +01:00

autobaan

Automatic court reservation!

Setup

Requirements

  • Node.js (18.x)
  • npm (8.x)
  • gcc (g++-12)
  • nvm (optional)

Using nvm

  1. Install nvm
  2. nvm use will use version specified in .nvmrc
  3. nvm install-latest-npm will upgrade NPM to latest version (8.x)

Usage

npm install
npm run local <username> <password> <year> <month> <day> <startTime> <endTime> <opponentName> <opponentId>

Architecture

|======|
| User |
|======|
    |
[requests reservation]
    |
    |
    V
|===========|                             /---\                           |==========|
| Scheduler | ---[checks possibility]--->/ ok? \--[y/ forward request]--> | Reserver |
|===========|                            \     /                          |==========|
                                          \---/                                 |
                                            |                                   |
                                          [n/ save request]      [find possible, saved reservations]
                                            |                                   |
                                            V                                   |
                                        |==========|                            |
                                        | Database |<---------------------------|
                                        |==========|

Deployment

  • Create a volume which will store the SQLite database file using docker-like
  • Build image via provided dockerfile
  • Run container with built image exposing port 3000 and mapping the aforementioned volume to /app/db

CD

So I don't forget... I am using GHA to create a container image which I pull on my server using podman. This then restarts the container on my server with the latest image. The container is backed by a systemd service to restart and start on boot.