{"id":15024418,"url":"https://github.com/openlegaldata/oldp","last_synced_at":"2025-08-19T16:32:57.612Z","repository":{"id":41516216,"uuid":"132149199","full_name":"openlegaldata/oldp","owner":"openlegaldata","description":"Open Legal Data Platform","archived":false,"fork":false,"pushed_at":"2024-01-09T17:37:39.000Z","size":9137,"stargazers_count":90,"open_issues_count":50,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-25T04:42:41.579Z","etag":null,"topics":["django","documents","legal","open-data","search"],"latest_commit_sha":null,"homepage":"https://openlegaldata.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openlegaldata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-04T14:16:19.000Z","updated_at":"2024-04-01T06:48:49.000Z","dependencies_parsed_at":"2024-01-13T16:35:42.789Z","dependency_job_id":null,"html_url":"https://github.com/openlegaldata/oldp","commit_stats":{"total_commits":288,"total_committers":12,"mean_commits":24.0,"dds":"0.19791666666666663","last_synced_commit":"298953d762733e17d4c2d0e8a88c3bd7c414057a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openlegaldata%2Foldp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openlegaldata%2Foldp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openlegaldata%2Foldp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openlegaldata%2Foldp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openlegaldata","download_url":"https://codeload.github.com/openlegaldata/oldp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230363998,"owners_count":18214717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","documents","legal","open-data","search"],"created_at":"2024-09-24T20:00:19.991Z","updated_at":"2025-08-19T16:32:57.577Z","avatar_url":"https://github.com/openlegaldata.png","language":"Python","funding_links":[],"categories":["Legal and Legislation"],"sub_categories":[],"readme":"# OLDP: Open Legal Data Platform\n\n\u003e [!NOTE]  \n\u003e We're back! This project is getting a fresh update - join us on [Discord](https://discord.gg/WCy3aq25ZF) to help revive it.\n\n[![Documentation Status](https://readthedocs.org/projects/oldp/badge/?version=latest)](https://oldp.readthedocs.io/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/oldp.svg)](https://badge.fury.io/py/oldp)\n\nOLDP is a Web application, written in Python 3.12 and based on the [Django web framework](https://www.djangoproject.com/),\nIt is used for processing legal text and providing a REST-API and Elasticsearch-based search engine.\nOLDP is being develop by the non-profit initiative [Open Legal Data](https://openlegaldata.io/) with the goal\nof building an Open Data platform for legal documents (mainly court decisions and laws).\nThe platform makes legal information freely accessible for the general public and especially third-party apps.\n\nOur documentation is available [here](https://oldp.readthedocs.io/).\n\n## Demo\n\n[![Live demo](https://github.com/openlegaldata/oldp/raw/master/docs/_static/screenshot.sm.png)](https://github.com/openlegaldata/oldp/raw/master/docs/_static/screenshot.png)\n\nA live demo is available [here](https://de.openlegaldata.io/) (in German).\n\n## Features\n\n- **Cases**: Court decisions with meta data and content in HTML.\n- **Laws**: Full-text laws and regulations and their corresponding case-law.\n- **Courts**: Browse courts organized by states, jurisdiction and level of appeal from your country.\n- **Search**: A document search engine based on Elasticsearch/Haystack supporting most common search syntax and faceting.\n- **API**: Adding, updating, retrieving and deleting data through CRUD REST API based on [DRF](https://www.django-rest-framework.org/) including\n    auto-generated API clients from Swagger.\n- **Themes**: Easily adjust the look and feel depending on your countries needs (see [German theme](https://github.com/openlegaldata/oldp-de)).\n\n## Installation guide\n\nBefore you can use OLDP, you’ll need to get it installed.\nFor a more detailed guide on how to get started with OLDP have a look at:\n[Getting started](https://oldp.readthedocs.io/en/latest/getting-started.html)\n\n### Docker\n\nTo skip the whole installation procedure you can simply run OLDP as Docker (or Podman) container.\nJust `git clone` the repository first and then start everything with a `docker compose up` from within the repository directory. After running `docker compose up`, navigate to [http://localhost:8000] to view the site.\nA small tutorial on how to use OLDP with Docker can be found [here](https://oldp.readthedocs.io/en/latest/docker.html).\n\n### Dependencies\n\nBefore anything else you will need to install the application dependencies.\n\n- **Python 3.12** with pip (uv recommended)\n- **Database (MySQL, SQLite, ...):** All database engines that support\n  [Django's DB API](https://docs.djangoproject.com/en/2.1/ref/databases/) should work. MySQL is recommended.\n- **Elasticsearch 5.4.x**: Our search engine backend. Other systems supported by [haystack](http://haystacksearch.org/)\n  should also work.\n- **gcc** Required to compile some Python libs\n- **python-mysqldb, libmysqlclient-dev** if you choose MySQL as database\n- **gettext** for Django locales with msguniq\n- **pandoc** convert docbook to HTML (import GG)\n- **GDAL**: Geospatial libraries used by the haystack search module (see\n  [here](https://docs.djangoproject.com/en/2.1/ref/contrib/gis/install/geolibs/)).\n\n```bash\n# Create virtualenv with uv\nuv venv --python 3.12\nsource .venv/bin/activate\n\n# Clone repository to current directory\ngit clone https://github.com/openlegaldata/oldp.git .\n\n# Install dependencies\napt-get install -y $(cat apt_requirements.txt)\nuv pip install -e \".[dev]\"\n```\n\nThe first time you run OLDP, you will need to initialize the database with its default blank values. If you want\nto run OLDP in production mode, you also need to prepare static files and localization.\n\n```bash\n# Prepare assets (JS, CSS, images, fonts, ...)\n./manage.py compress\n\n# Prepare database\n./manage.py migrate\n\n# Localization (German and English, needed for production)\n./manage.py compilemessages --l de --l en\n\n# Prepare static files (needed for production)\n./manage.py collectstatic --no-input\n```\n\n## Run\n\nRun the following command to start the web app at [http://localhost:8000/](http://localhost:8000/).\n\n```bash\n./manage.py runserver 8000\n```\n\n### Settings\n\nThe manage the app settings we rely on [django-configurations](https://django-configurations.readthedocs.io/en/stable/).\nPre-configured settings can be used by setting the `DJANGO_CONFIGURATION` environment variable to either `ProdConfiguration`, `DevConfiguration` or `TestConfiguration`.\nYou can as well override specific settings from `src/oldp/settings.py` with environment variables:\n\n| Variable name | Default value | Comment |\n| ------------- | ------------- | ------- |\n| `DJANGO_SETTINGS_MODULE` | `oldp.settings` | Tell  Django which settings file you want to use (in Python path syntax). |\n| `DJANGO_CONFIGURATION` | `DevConfiguration` | Choice a predefined class of settings: `DevConfiguration`, `ProdConfiguration` or `TestConfiguration` |\n| `DATABASE_URL` | `mysql://oldp:oldp@127.0.0.1/oldp` | Path to database (usually mysql or sqlite) |\n| `DJANGO_SECRET_KEY` | `None` | Set this to a secret value in production mode |\n| `DJANGO_ELASTICSEARCH_URL` | `http://localhost:9200/` | Elasticsearch settings (scheme, host, port) |\n| `DJANGO_ELASTICSEARCH_INDEX` | `oldp` | Elasticsearch index name |\n| `DJANGO_DEBUG` | `True` | Enable to show debugging messages and errors |\n| `DJANGO_ADMINS` | `Admin,admin@openlegaldata.io` | Format: `Foo,foo@site.com;Bar,bar@site.com` |\n| `DJANGO_ALLOWED_HOSTS` | `None` | Format: `foo.com,bar.net` |\n| `DJANGO_LANGUAGES_DOMAINS` | | Format: `{'de.foo.com':'de','fr.foo.com':'fr'}` |\n| `DJANGO_DEFAULT_FROM_EMAIL` | `no-reply@openlegaldata.io` | Emails are sent from this address |\n| `DJANGO_EMAIL_HOST` | `localhost` | SMTP server |\n| `DJANGO_EMAIL_HOST_USER` | | SMTP user |\n| `DJANGO_EMAIL_HOST_PASSWORD` | | SMTP password |\n| `DJANGO_EMAIL_USE_TLS` | `False` | enable TLS |\n| `DJANGO_EMAIL_PORT` | `25` | SMTP port |\n| `DJANGO_FEEDBACK_EMAIL` | `feedback@openlegaldata.io` | Messages from feedback widget are sent to this address. |\n| `DJANGO_TIME_ZONE` | `UTC` | Time zone |\n| `DJANGO_TEST_WITH_ES` | `False` | Run tests that require Elasticsearch |\n| `DJANGO_TEST_WITH_WEB` | `False` | Run tests that require web access |\n| `DJANGO_LOG_FILE` | `oldp.log` | Name of log file (in logs directory) |\n| `DJANGO_CACHE_DISABLE` | `False` | Set to `True` to disable cache (Redis) |\n\n\n\n## Issues\n\nPlease use our [GitHub issues](https://github.com/openlegaldata/oldp/issues) to report bugs, request feature or simply\nleave some feedback.\n\n## Contact\n\nTo contact Open Legal Data Platform, see here:\n\nhttps://de.openlegaldata.io/contact/\n\n## Citation\n\nPlease cite the following [research paper](https://arxiv.org/abs/2005.13342), if you use our code or data:\n\n```bibtex\n@inproceedings{10.1145/3383583.3398616,\nauthor = {Ostendorff, Malte and Blume, Till and Ostendorff, Saskia},\ntitle = {Towards an Open Platform for Legal Information},\nyear = {2020},\nisbn = {9781450375856},\npublisher = {Association for Computing Machinery},\naddress = {New York, NY, USA},\nurl = {https://doi.org/10.1145/3383583.3398616},\ndoi = {10.1145/3383583.3398616},\nbooktitle = {Proceedings of the ACM/IEEE Joint Conference on Digital Libraries in 2020},\npages = {385–388},\nnumpages = {4},\nkeywords = {open data, open source, legal information system, legal data},\nlocation = {Virtual Event, China},\nseries = {JCDL '20}\n}\n```\n\n## License\n\nOLDP is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenlegaldata%2Foldp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenlegaldata%2Foldp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenlegaldata%2Foldp/lists"}