• Feb 6, 2023
  • Story
  • 3 min read

The Creation of BTH Programs

By Marcus Fredriksson


Why Does It Exist?

There is a long answer and a short answer. The short answer is because I really dislike having to spend time doing something that I don't have to. The longer answer is that I really really enjoy spending time fixing things and making my life more efficient. The school's official interface does not offer any way of listing all courses in a program, which I find very peculiar. But who am I to judge? More fun for me!

The Tech Stack

Frontend

The frontend is entirely built with SvelteKit using Typescript and hosted on Vercel. The choice of SvelteKit was because I am a huge fan of the syntax, performance and NoScript benefits.

Backend

There is no "backend" as in a server or API, all data is stored in various JSON files and served statically.

Scraper

To retrieve the data and store them in each respective JSON file, I use a Python script that scrapes the official BTH page since no official API exists (to my knowledge). This is of course done with full permission from the site owner, which also happens to be my teacher and the person who recommended me to use that site as a data source (Thanks Martin!).

The data however, is still very unorganized and hard to reuse. This put me in a conundrum, I was forced to fetch each course for each semester for each program, resulting in me making over 2.5K requests to fetch all data (ugh).

What's Changed?

The official interface does not include any way of listing out all courses at once in chronological order. This was the main reason the app was created. However, there has been a redesign of the official site since my app was created, but it still lacks basic functionality, and most importantly, the ability to list all courses.

<figcaption>New- vs custom interface</figcaption>
New- vs custom interface

The Response

I did not expect anyone to use the app, since I created this app mostly for myself. But with time, more and more people started using the app. It was a really cool feeling seeing people use it and finding it a useful application. Some people even helped improve it by providing feedback. For anyone using the app, I hope it provides the information and value you want.

How To Use The Application

<figcaption>The application</figcaption>
The application

In the top right corner, you can change the program you want to view. Note that the program codes might not make sense unless you are a student at BTH, but hey, it was created for the students at BTH.

On top of the page, you will find some basic information about the program, such as the teacher, location, speed and more.

Underneath this, you will find all available semesters (that are still active). Here you can select the year you want to see.

Once you have selected the program and semester you want, start scrolling. Each gray box is a course, and each colorful box is a break of some sort, such as summer break or winter break.

You can click on each course to expand it. Here you will find more information about each course, as well as links to important documents, such as the study plan or the official course page.

Where Can I Find It?

You can find the application at bth.marcusfredriksson.com and the source code on Github.

  • #sveltekit
  • #typescript
  • #python
  • #bth
  • #school