Timetable V2
Timetable V2 is a substitution plan and timetable viewer that is meant to be a placement for the HTML files that my school provides via DSB Mobile BOLLE.
This Project fetches the latest substitution plan files from the specified source and parses them, which converts the HTML files exported by Untis to a JSON format. The Programm then compares the new substitution plan to the previous one and finds changed, deleted and newly added substitutions and adds them to the database.
The substitutions in the database and their history can then be viewed in the web browser, where they are also being filtered by class and linked with the students timetable.
Screenshots
Untis Export | Timetable V2 |
---|---|
![]() |
![]() |
Setup with Docker
To setup Timetable V2 in a docker container, you firstly have to build the docker image:
docker-compose build
Next you will need to set your environment variables. For that rename .env.sample
in the server directory to .env
and change the variables as described in the file.
Then you can run the app
docker-compose up -d
And check its logs
docker-compose logs -f
If everything is working, you should be able to connect to the app at http://localhost:3000 (or the IP address of your docker host)
To create an admin key for managing timetables or creating keys, you can use the createAdminKey.js
script
docker compose exec app node /app/server/createAdminKey.js
Setup for Development
To setup a development environment for Timetable V2, you will need to have NodeJS and Docker installed. (If you don't want to install Docker, you can also install PostgreSQL natively on your computer)
Build the frontend
To build the Vue.js based frontend, you will need to be in the root folder of the project and run
npm install
npm run build
Or if you want to work on the frontend you can run
npm run dev
This creates a development server with live reload on port 3001. This also proxies all API routes to the backend running on port 3000.
Run the backend
First you will need to install a PostgreSQL instance. This can be simply done by launching a PostgreSQL docker container:
docker run --name timetable-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
The backend can be found at ./server
, so all upcomming commands need to be run in that directory.
For the app to be able to fetch substitution plan files, you need to create a .env
file (you can use the .env.sample
as a template) and set the values correctly. You don't need to change the database url used in .env.sample
for development.
To apply the database schema to the newly created database, you need to run:
npx prisma db push
Now you just need to install the dependencies and are ready to run the app:
npm install
node index.js
If you want to create an admin key, you can again use the createAdminKey.js
script
node createAdminKey.js