# Installation from the sources

### Prerequisites

{% hint style="danger" %}
This section describes how to install Prophecies for development. This environment disables many security settings provided by Django and isn't meant to be used for internet-facing instances. For that purpose please follow the [installation guide with Docker](/prophecies/getting-started/installation-with-docker.md).
{% endhint %}

* Python 3.9
* Node 16.x
* Poetry >= 1.2
* Yarn 1.x
* Git

### Setup steps

Checkout the repository with git:

```bash
git clone git@github.com:ICIJ/prophecies.git
cd prophecies/
```

After entering the directory, setup a virtualenv with `poetry` and to install required packages:

```bash
make install
```

To setup the database (using SQLite3 by default):

```bash
make migrate
```

To create a superuser:

```bash
make createsuperuser
```

For more customization, this app utilizes [12factor](https://www.12factor.net/) inspired environment variables to configure your Django application. You can create `.env` file using the custom settings variables:

```bash
DEBUG=on
DATABASE_URL=
CACHE_URL=dummycache://
STATIC_URL=/static/
SOCIAL_AUTH_PROVIDER_KEY=
SOCIAL_AUTH_PROVIDER_SECRET=
SOCIAL_AUTH_PROVIDER_HOSTNAME=http://localhost:3001
SOCIAL_AUTH_PROVIDER_USERNAME_FIELD=uid
SOCIAL_AUTH_PROVIDER_GROUPS_FIELD=groups_by_applications.prophecies
SOCIAL_AUTH_PROVIDER_STAFF_GROUP=icijstaff
```

The application can be configured with [many environment variables](/prophecies/getting-started/configure-prophecies.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://icij.gitbook.io/prophecies/developers/installation-from-the-sources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
