No description
  • TypeScript 47%
  • Pug 23.7%
  • CSS 15.1%
  • JavaScript 7.1%
  • Nix 7.1%
Find a file
2026-06-15 18:37:44 +02:00
anciennes_editions chore(2025): move previous year files 2026-06-15 18:37:26 +02:00
nix Update nix config 2025-08-06 13:03:24 +02:00
public fix bugs from admin sessions 2025-08-06 11:42:43 +02:00
src fixed missing return causing 502 2025-08-06 13:22:09 +02:00
views made graphs have labels every hour 2025-08-06 12:12:52 +02:00
.editorconfig Initial implementation of a session/login system 2024-06-30 14:18:12 +02:00
.gitignore feat(packaging): Add host machine config 2025-07-25 23:41:11 +02:00
kahulm.sqlite removed navbar on question page 2025-07-26 22:09:14 +02:00
package-lock.json Does not work yet | also we should use sequelize to do it 2025-07-27 21:16:46 +02:00
package.json chore(2026): bump version and update package 2026-06-15 18:37:44 +02:00
questions.csv Added questions 2025-07-21 23:13:21 +02:00
README.md feat(readme): add content explaining the things to do to create 2026-06-15 18:36:55 +02:00
shell.nix chore(2026): bump version and update package 2026-06-15 18:37:44 +02:00
tsconfig.json Does not work yet | also we should use sequelize to do it 2025-07-27 21:16:46 +02:00
yarn.lock chore(2026): bump version and update package 2026-06-15 18:37:44 +02:00

Kahulm

Install / update dependencies

yarn install

To update packages to their latest versions within the ranges declared in package.json:

yarn upgrade

Run the server

For production:

export NODE_ENV=production
yarn install
yarn start

For dev:

yarn dev

Reset and initialize the database

To wipe the existing database and start fresh (re-creates tables and seeds teams, users, and questions from questions.csv):

# 1. Delete the current SQLite file (filename must match DB_FILE in your .env)
rm -f kahulm.sqlite

# 2. Compile and run the database initialisation script
yarn init-db

Note: yarn init-db compiles the TypeScript sources and then runs dist/createDatabase.js. It will generate two output files:

  • users.csv — login/password pairs for all created users
  • locations.csv — location names and their database IDs

If the server is started (yarn dev or yarn start) and no SQLite file is found, it will also call initDatabase() automatically — but that only creates the empty schema. Run yarn init-db to seed the data.

.env format

# port of the server
PORT=2000
# password for sessions
SESSION_SECRET=my secret
# base url of the website
BASE_URL=http://localhost:2000
# the SQLite db filename
DB_FILE=kahulm.sqlite

# If you want to create an initial admin account.
# Can be omitted.
# Only works at database init;
# if there is already a SQLite db file, it is ignored.
ADMIN_USERNAME=admin
ADMIN_PASSWORD=test

# Config for how to hash passwords.
PASSWORD_SALT_LENGTH=128
PASSWORD_HASH_LENGTH=64