This repository contains the code of the website vplan.fr, which is free to use and already supports many schools in (eastern) Germany! If you want to contribute to the project, contact us, submit an issue or fork this repo and create a pull request for changes.
To get started, install Python >= 3.11 and the requirements:
python3.11 -m pip install -r requirements.txt
Next, install Node.js and the used packages:
cd client
npm install --force
MongoDB is also a requirement and needs the following collections:
users
creds
which contains entries in the following format:
{
"_id": "<school_number>",
"display_name": "<display name>",
"hosting": {
"creds": {
"students": {
"username": "<username>",
"password": "<password>"
},
"teachers": {
"username": "<username>",
"password": "<password>"
}
},
"endpoints": "https://stundenplan24.de/<school_number>/"
},
"icon": "<school_number>.jpg",
"school_number": "<school_number>",
"short_name": "<short name>",
"comment": "<optional comments>"
}
The plan crawler can be started with the following command:
python3.11 -m backend.load_plans
To run the plan loader once instead of continuously, the flag --once
can be set in the command above.
A .env
file has to be created in the project root, containing the following variables:
MONGO_URL=mongodb://<user>:<password>@<domain>/<database>
: MongoDB URLWEBHOOK_TEST=<discord_webhook_url>
: Where webhooks get sent when Production is FalseWEBHOOK_USER_CREATION=<discord_webhook_url>
: Message on user creation and deletionWEBHOOK_SCHOOL_AUTHORIZATION=<discord_webhook_url>
: Message on school authorizationWEBHOOK_CONTACT=<discord_webhook_url>
: Message on contactPRODUCTION=<True|False>
: If the current instance is being run in production or developmentTo start the website, start the flask server using:
python server.py
and in another terminal, the npm dev server using:
cd client
npm run dev
If you have any more questions or need help with the setup, don't hesitate to contact us. :)