Skip to content

Configuration

All runtime configuration is driven by a .env file (git-ignored) loaded by config.php. Copy .env.example to .env and fill in the values before first run.


Environment variables

Variable Default Description
DB_HOST localhost MySQL host
DB_PORT 3306 MySQL port
DB_NAME essentimmo Database name
DB_USER Database username
DB_PASS Database password
CONNECT_URL https://connect.xact.be Base URL of the connect.xact.be credential proxy
CONNECT_API_KEY API key / site JWT issued by connect.xact.be
OFFERER_SITE essentimmo.be Client identifier in connect.xact.be (= site domain)
SITE_URL https://v2.essentimmo.be Public base URL — used to build photo URLs in Immoweb payloads
IMMOWEB_ENV test test or production — selects the Immoweb target environment
DEPLOY_SECRET HMAC-SHA256 secret for the GitHub webhook; generate with openssl rand -hex 32
ADMIN_USER admin Immohive admin username
ADMIN_PASS bcrypt hash of the admin password (see below)

Generating the admin password hash

php -r "echo password_hash('your_secure_password', PASSWORD_DEFAULT) . PHP_EOL;"

Paste the output as ADMIN_PASS in .env.


config.php constants

config.php reads the .env file and exposes every value as a PHP constant so application code never reads $_ENV directly.

Constant Source variable
DB_HOST DB_HOST
DB_NAME DB_NAME
DB_USER DB_USER
DB_PASS DB_PASS
DB_PORT DB_PORT
CONNECT_URL CONNECT_URL (trailing slash stripped)
CONNECT_API_KEY CONNECT_API_KEY
OFFERER_SITE OFFERER_SITE
SITE_URL SITE_URL (trailing slash stripped)
IMMOWEB_ENV IMMOWEB_ENV
DEPLOY_SECRET DEPLOY_SECRET
ADMIN_USER ADMIN_USER
ADMIN_PASS ADMIN_PASS (bcrypt hash)
BASE_DIR __DIR__ (absolute path to repo root)
UPLOAD_DIR BASE_DIR . '/public/uploads'
UPLOAD_URL /uploads

config.php is required from every entry point via an absolute path:

require_once dirname(__DIR__) . '/config.php';

This keeps it outside the Apache document root (public/) even though it lives one level up.


connect.xact.be

connect.xact.be is a credential proxy — it holds the Immoweb API token for each client.

cron/publish.php
  └─► ConnectClient::publish() / update() / withdraw()
        └─► POST https://connect.xact.be/api/immoweb/upsert
              └─► connect.xact.be swaps in the Immoweb token
                    └─► Immoweb Classifieds Pipeline API

CONNECT_API_KEY authenticates the site to connect.xact.be via the X-Api-Key header. OFFERER_SITE tells connect.xact.be which client the request belongs to.


IMMOWEB_ENV

Value Behaviour
test Payloads reach the Immoweb test pipeline — listings are not publicly visible
production Payloads reach the live Immoweb platform

Switch to production only after verifying test pushes succeed.