openstate / open-rechtspraak

Transparantie in de rechtspraak
https://openrechtspraak.nl/
4 stars 0 forks source link

Open Rechtspraak

Requirements

Stack

Back end

Front end

Getting started

Did you make any changes to the code base?

Periodically scraping data

Scraping data from people is done in two steps:

  1. Retrieving a list of people with make import_people from the https://namenlijst.rechtspraak.nl/Services/WebNamenlijstService/Zoek service. These people are saved.
  2. We enrich the details from people through https://namenlijst.rechtspraak.nl/Services/WebNamenlijstService/haalOp/?id=<rechtspraak_id> where rechtspraak_id is a unique ID assigned by namenlijst.rechtspraak.nl to the person.

Similarly, two commands exist for scraping verdicts and enriching them.

  1. Retrieving a list of verdicts (default = verdicts of the past three days) with make import_verdicts.
  2. Enriching verdicts with make enrich_verdicts in two steps: (1) collecting additional metadata of the verdict and (2) checking whether a person is mentioned in a verdict.

Warning: The number of verdicts imported by make import_verdicts can be high (ca. 50k a year). Consider this carefully when you use the --start_date and --end_date cli params.

Protecting a scraped person from public eyes

The People model has an attribute called protected. Toggling that attribute to True removes the person from all public listings (i.e. the API search endpoint) and blocks access to their detail page.

Config for production

These env variables are required for production:

How to deploy this app to production

  1. docker-compose up -d
  2. Compiling new assets: docker exec ors_webpack_1 npm run prod
  3. Running the latest migrations: docker exec ors_app_1 sh ./release/tasks.sh
  4. Ensure a cron is running with the jobs mentioned in release/cron.sh

Sitemap

Contact details

Questions? Contact developers@openstate.eu.

Local dev

Without Flask in Docker, but a Docker based DB: