Application for teachers to easily manage the upcoming books for each classroom at the HTL Steyr.
Caution
Schulbuchaktion is still in Development. You will find bugs and broken/unfinished features.
Schulbuchaktion follows the Semantic Versioning guidelines. The release cycle is as follows:
A release is created usually after one issue is resolved. The release is then merged into the main
branch and tagged.
You can find the latest and prior releases in the github releases tab. Minor pull requests are patch versions and bigger
feature pull requests are minor versions. A major version is released when the application is ready for production.
- clone the repository:
git clone https://github.com/Dino-Kupinic/Schulbuchaktion.git
- go into the frontend directory
cd frontend
- install packages
pnpm i
Tip
If you don't have pnpm installed, checkout https://pnpm.io/installation to install for your operating system.
- define environment variables
Create a .env
file and checkout the .env.example
. Copy the content into your .env
and replace
the following fields with your own. You may edit some existing fields aswell.
Field | Description |
---|---|
BACKEND_URL |
URL to the Symfony Backend server (e.g. http://localhost:8000/api/v1 in dev) |
Make sure to include the /api/v1
suffix at the end of the URL. This environment variable is used for the Base URL for
fetch requests.
- run dev server
pnpm run dev
- Head to http://localhost:3000/
If it works, great!
Important
Following instruction is optional and may be skipped. If you have slow internet, it may take a while to install Chrome, Safari and Firefox (~150 MB)
- Install playwright browsers
npx playwright install
- go into the backend directory
cd ../backend
- define environment variables
Create a .env
file and checkout the .env.example
. Copy the content into your .env
and replace
the following fields with your own. You may edit some existing fields aswell.
Field | Description |
---|---|
APP_SECRET |
A secret key that's used to secure your application's services. |
SECRET_PASSWORD |
Database password |
USERNAME |
Database user |
BIND_PORT |
Database port |
DATABASE_URL |
The URL String to your database. It will use the env variables above. |
LDAP_PORT |
The port of your LDAP server. |
LDAP_URL |
The URL of your LDAP server. |
LDAP_BASE |
The base of your LDAP server. (dc=schulbuchaktion,dc=env ) |
ROLES |
String of all roles seperated with commas (default 'SBA_ADMIN,SBA_LEHRER,SBA_FV,SBA_AV' ) |
SBA_ADMIN |
Group number of the admin group. (default 500 ) |
SBA_LEHRER |
Group number of the teacher group. (default 501 ) |
SBA_FV |
Group number of the subject responsible group. (default 502 ) |
SBA_AV |
Group number of the head of department group. (default 503 ) |
TOKEN_TIMEOUT |
How long a token is valid. (default 1800 ) |
HOURS_AHEAD |
Timezone (default 2 ) |
JWT_SECRET_ABSOLUT_PATH |
The absolute path to the private key for the JWT. |
CORS_ALLOW_ORIGIN |
The origin that is allowed to access the API. (default localhost ) |
TOKEN_NAME |
Name of Cookie which contains bearer token (default BearerToken ) |
CADDY_MERCURE_JWT_SECRET |
Used to securely sign JWTs for client authentication and authorization in a Caddy server setup with Mercure. |
TRUSTED_PROXIES |
Specifies the IP addresses or ranges of proxies that are trusted to correctly set client-related headers in a server configuration. |
TRUSTED_HOSTS |
Specifies a list of hostnames or patterns that are considered trusted and allowed to make requests. |
CADDY_MERCURE_URL |
Specifies the URL of the Mercure hub used by the Caddy server. |
CADDY_MERCURE_PUBLIC_URL |
Specifies the publicly accessible URL of the Mercure hub. |
HTTP_PORT |
Port which will be open for http connections. (default 80 ) |
HTTPS_PORT |
Port which will be open for https connections. (default 443 ) |
SHELL_VERBOSITY |
Verbosity level of server and symfony. (default 0 ) |
Important
For the APP_SECRET
checkout https://symfony.com/doc/current/reference/configuration/framework.html#secret to see the
latest requirements.
- start docker
docker compose up -d
Tip
If you don't have docker installed, checkout https://www.docker.com/products/docker-desktop/ to install for your operating system.
- install dependencies
composer update
Important
If you get errors, you might have to comment out modules like ldap
or zip
in your php.ini
file. Composer will
tell
you what to do.
- start the dev server
symfony server:start
Important
If you don't have symfony cli installed, checkout https://symfony.com/download#step-1-install-symfony-cli to install for your operating system.
- head to http://127.0.0.1:8000
- go into the docs directory
cd ../docs
- install packages
pnpm i
Tip
If you don't have pnpm installed, checkout https://pnpm.io/installation to install for your operating system.
- run dev server
pnpm run docs:dev
- Head to http://localhost:5173/
-
configure each
.env
in/frontend
and/backend
properly -
check (and adjust) each nginx configuration
-
run docker compose
docker compose up -d
Tip
If you don't have docker installed, checkout https://www.docker.com/.
- deploy in the cloud or your container infrastructure π
Build each service seperately and deploy yourself without docker.
Note
The frontend operates as a "Single Page Application" SPA.
- run generate
pnpm run generate
Tip
If you don't have pnpm installed, checkout https://pnpm.io/installation to install for your operating system.
- check if everything works as it should
pnpm run preview
- Head to http://localhost:3000/
- All generated assets can be found in
./output/public
Tip
Further information regarding deployment can be found on https://nuxt.com/deploy
The latest information regarding deploying symfony can be found here: https://symfony.com/doc/current/deployment.html#symfony-deployment-basics
Note
The documentation uses the same principle as the frontend. More infos: https://vitepress.dev/guide/what-is-vitepress#performance
- run build
pnpm run docs:build
Tip
If you don't have pnpm installed, checkout https://pnpm.io/installation to install for your operating system.
- check if everything works as it should
pnpm run docs:preview
- Head to http://localhost:4173/
- All generated assets can be found in
./vitepress/dist
Tip
Further information regarding deployment can be found on https://vitepress.dev/guide/deploy
- Dino Kupinic
- Daniel Samhaber
- Jannick Angerer
- Michael Ploier
- Lukas Bauer
- Symfony
- Nuxt 3
- MySQL
- Docker
You can find all dependencies in the package.json
and for the nuxt.config.ts
in the modules
section.
You can find all dependencies in the composer.json
.