Skip to content
forked from okfde/froide

Freedom Of Information Portal

License

Notifications You must be signed in to change notification settings

CodeWithAloha/froide

This branch is 3 commits ahead of, 340 commits behind okfde/froide:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1dd7b99 · Jan 21, 2025
Apr 15, 2024
Apr 16, 2014
Jun 2, 2022
Jan 21, 2025
Nov 18, 2024
Jun 10, 2024
Jan 29, 2019
Aug 1, 2023
Nov 13, 2023
Apr 8, 2021
Feb 5, 2024
Apr 4, 2022
May 4, 2011
Aug 19, 2024
May 24, 2023
Oct 7, 2013
Nov 2, 2022
Dec 27, 2020
May 24, 2023
Oct 7, 2013
Aug 13, 2021
Feb 19, 2024
Sep 11, 2023
Apr 4, 2023
Mar 7, 2024
Mar 7, 2024
Mar 7, 2024
Sep 5, 2022
May 24, 2023
Aug 1, 2023
Aug 1, 2023
Feb 19, 2024

Repository files navigation

Froide

Froide CI

Froide is a Freedom Of Information Portal using Django 3.2 on Python 3.8+.

It is used by the German and the Austrian FOI site, but it is fully internationalized and written in English.

Development on Froide

After clone, create a Python 3.8+ virtual environment and install dependencies:

python3 -m venv froide-env
source froide-env/bin/activate

# Install dev dependencies
pip install -r requirements-test.txt

# Install git pre-commit hook
pre-commit install

Start services

You can run your own Postgres+PostGIS database and Elasticsearch service or run them with Docker.

You need docker and docker-compose. Make sure Docker is running and use the following command:

docker-compose up

This will start Postgres and Elasticsearch and listen on port 5432 and 9200 respectively. You can adjust the port mapping in the docker-compose.yml.

Setup database and search index, start server

If you need to adjust settings, you can copy the froide/local_settings.py.example to froide/local_settings.py and edit it. More steps:

# To initialise the database:
python manage.py migrate --skip-checks
# Create a superuser
python manage.py createsuperuser
# Create and populate search index
python manage.py search_index --create
python manage.py search_index --populate
# Run the Django development server
python manage.py runserver

Run tests

Make sure the services are running.

# Run all tests
make test
# Run only unit/integration tests
make testci
# Run only end-to-end tests
make testui

Development tooling

For Python code, we use flake8 following black code style. JavaScript, Vue and SCSS files are formatted and linted with ESLint and Prettier.

Make sure to have pre-commit hooks registered (pre-commit install). For VSCode, the Python, ESLint and Vetur extensions are helpful, with these workspace settings recommended:

{
  "eslint.format.enable": true,
  "eslint.packageManager": "yarn",
  "vetur.format.defaultFormatter.css": "prettier",
  "vetur.format.defaultFormatter.html": "prettier",
  "vetur.format.defaultFormatter.js": "prettier-eslint"
}

Upgrade dependencies

# with pip-tools
pip-compile -U requirements.in
pip-compile -U requirements-test.in

Docs

Read the documentation including a Getting Started Guide.

Froide is supported by the Open Knowledge Foundation Germany and Open Knowledge Foundation International.

License

Froide is licensed under the MIT License.

About

Freedom Of Information Portal

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 69.2%
  • HTML 15.8%
  • Vue 9.0%
  • TypeScript 2.3%
  • JavaScript 2.0%
  • SCSS 1.7%