Skip to content

Development Setup

Prerequisites

  • Python 3.10+
  • Docker & Docker Compose (for containerised dev)
  • Windows: PowerShell 7+ recommended

Environment Variables

Copy the example and fill in secrets:

powershell Copy-Item .env.example .env

Key variables to set in .env:

Variable Description
SECRET_KEY Django secret key
DEBUG True for local dev
DATABASE_URL Postgres connection string
REDIS_URL Redis for Celery / caching
GOOGLE_CLIENT_ID / _SECRET Google OAuth credentials
BOX_CLIENT_ID / _SECRET Box OAuth credentials
DROPBOX_APP_KEY / _SECRET Dropbox credentials
ONEDRIVE_CLIENT_ID / _SECRET OneDrive credentials
STRIPE_SECRET_KEY Billing (Stripe)

See .env.example and docs/docs/sample_env.md for the full list.

```powershell

Start all services (postgres, redis, django, celery)

.\dev.ps1

or

docker compose -f docker/docker-compose.dev.yml up --build ```

Option B — Local Python

```powershell

Create venv

python -m venv .venv ..venv\Scripts\Activate.ps1

Install dependencies

pip install -r requirements/dev.txt

Apply migrations

cd indox python manage.py migrate

Create superuser

python manage.py createsuperuser

Run dev server

python manage.py runserver ```

Running Tests

```powershell cd indox python manage.py test

or with pytest

pytest ```

Useful Management Commands

powershell python manage.py shell # Django shell python manage.py showmigrations # Check migration state python manage.py collectstatic # Collect static files