Xatha / KU-courses

Our better version of KU's course catalogue

Home Page:https://disku.jniemela.dk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KU-Courses

Example of KU-Courses

The entire application is governed through the docker-compose.yml file and is built with docker compose:

Starting the application

  • STEP 1: Install docker and docker-compose, this may need a restart of your system since Docker is a very low level program.
  • STEP 2: Run docker-compose up --build as either a user with permissions to docker, or with sudo/doas, the build flag is required if the backend or frontend code has been changed, additionally -d will make it detach from the terminal.
  • STEP 3: ???
  • STEP 4: PROFIT!!! Docker may appear to hang on the scraper container, this is to be expected since it is downloading 5 courses a second of the ~3.5k and it may take up to 15 minutes to finish scraping since we want to be nice to KU's surprisingly fragile IT infrastructure.

db-manager

Our backend is built with Clojure, a functional programmering language based on Lisp which runs on the Java Virtual Machine.
This part of the project is responsible for gluing our web-scraper together with the frontend and the database. Furthermore, it is responsible for constructing our SQL queries that are served via the API.

scraper

The "scraper" confusingly runs the parser, It was previously responsible for scraping all of the HTMLs and caching them for future use, the parser will convert all the HTMLs into JSON so they can be inserted into the database. The real scraper is now integrated into db-manager

TODO: This entire module is strongly overdue a complete rework into a lighter language (Rust, Haskell, Clojure) since the module is bigger than the entire project combined when built, and takes a long time to parse HTMLs.

Frontend

Frontend is built in Svelte/Typescript.

Statistics

Another module written in Clojure, this module is currently not automatically started by the docker-compose and should be run manually. It is responsible for scraping STADS for the statistics on all courses to add them to the returned JSONs from db-manager.

About

Our better version of KU's course catalogue

https://disku.jniemela.dk

License:MIT License


Languages

Language:Rust 25.5%Language:Clojure 22.5%Language:Svelte 21.3%Language:Python 21.2%Language:TypeScript 4.8%Language:PLpgSQL 1.7%Language:JavaScript 1.5%Language:Nix 0.8%Language:Dockerfile 0.4%Language:Shell 0.2%Language:HTML 0.2%Language:CSS 0.0%