This repository contains the Verwerkingsregister. This project has 2 main components:
CMS
The CMS is built using Laravel. This is where all the data for the processing records (verwerkingen) are kept and maintained.
Directory: /src/cms/
Static website
This contains the configuration for generating a static website using Hugo. It uses JSON and markdown data as its input to generate static html files.
Directory: /src/static-website/
- See docs/environment_variables.md for an overview of all environment variables that can be set in the
.envfile. - See docs/roles_and_permissions.md for an overview of all roles and permissions and the location where they are configured.
All
artisancommands must be run via Sail (sail artisan ...or insidesail shell). Runningphp artisandirectly on your host will fail becauseDB_HOST=pgsqlis only reachable inside Docker.
- An up-to-date Docker (Desktop) installation
-
Open a new terminal at
/src/cms -
Create an
.envfile by copying the./.env.exampleto./.env -
Setup docker using laravel/sail by running:
docker run --rm \ -u "$(id -u):$(id -g)" \ -v "$(pwd):/var/www/html" \ -w /var/www/html \ laravelsail/php84-composer:latest \ composer install --ignore-platform-reqsFor more information see: https://laravel.com/docs/10.x/sail#installing-composer-dependencies-for-existing-projects
(The steps below assume you have an alias for
./vendor/bin/sail) -
Start the container by running
sail up -d -
Run
sail artisan key:generateto generate a new application key -
Run
sail artisan migrate:fresh --seedto (re)run all migrations and default seeder
As a result of these steps, you have created your local docker working directory, a database and seeded it with a user.
We now need the Public website script to build the static files within your container.
- Open the shell with
sail shell - Run
npm ci(NPM clean install) to install the required dependencies. If you visit your local website (in your browser) you should see a warning that says something likeVite manifest not found at: /var/www/html/public/build/manifest.json. - Run
npm run build(within the shell) to build the static files. This will generate the static files in thepublicfolder. - Exit the shell (
exit). - Run
sail artisan storage:linkto link the configured (default) /static-website to the actual static files of the website. - Run
sail artisan static-website:refreshto generate the public website content from the CMS database.
As a result of these steps, you have created the static files for the public website and in your browser you can see the Login page.
- Navigate to http://localhost/static-website (or http://web.cms.orb.local/static-website for Orbstack users)
- Visit the project in your browser
- Login with the following credentials:
- Email:
admin@minvws.nl(this user is added with the TestDataSeeder)
- Email:
- Open your local Mailpit instance to see the email that is send
- Click on the link in the email to login
- Add the 2FA code which you do not have
To be able to login, you have three options:
A. Set ENV variable ONE_TIME_PASSWORD_DRIVER to fake in your .env file
- Open the
.envfile - Add
ONE_TIME_PASSWORD_DRIVER=faketo the file - Visit your local default project url again and use a random 6-digit code for 2FA
B. Disable 2FA for the added user
sail shellto enter the Shellphp artisan user:disable-otp- add the email again and press Enter
- Visit your local default project url again and you are now logged in
C. Create a new admin user with 2FA disabled
sail shellto enter the Shellphp artisan user:create-admin- add the name and desired (fake) email you want to use to login
- Visit your local default project url again and login (with the email you just added)
Note: to actually use the CMS, you must have 2FA activated.
The current CI workflow consists of static code analysis and automated tests. The latter requires a local 'testing' database. You can use the testing database (which is available by default), which requires to run the migrations there:
- Bash into the sail-container:
php artisan sail - Run
DB_DATABASE=testing php artisan migrate:fresh --seedto (re)run all migrations and default seeders - Run the test:
php artisan test(optionally with the--coverageparameter)
Execute the following bin script to run all CI checks: ./bin/ci-local
- rdo-package.yml
- Build the zip file (used by iRealisatie) for the dataprocessing register
The source code is released under the EUPL license. The documentation is released under the CC0 license. The EUPL 1.2 and the CC0 do not apply to photos, videos, infographics, fonts or other forms of media. Specifically the rijkslogo and rijkshuisstijl have specific terms of use. Some images have a specific terms of use from Unsplash.
This repository follows the REUSE Specfication v3.3.
Please see REUSE.toml and the individual *.license files for copyright and license information.