Skip to content

EssentImmo

PHP website + immohive property admin for Essentimmo.be.

Stack

Layer Technology
Frontend Bootstrap 5.3, League Spartan, Bootstrap Icons
Maps Leaflet.js + leaflet-gesture-handling
Properties immohive (custom PHP/MySQL CRUD)
Immoweb push Cron → immohive/cron/publish.php → connect.xact.be
Hosting DirectAdmin VPS, Apache + PHP 7.4 + MySQL
Deploy GitHub webhook → deploy.php

Directory structure

essentimmo/
├── public/              ← Apache document root
│   ├── index.php        ← Homepage
│   ├── aanbod/          ← Property listing + detail
│   ├── admin/           ← Symlink → immohive/admin (set up on server)
│   ├── css/style.css
│   ├── img/             ← Local images (icons, team photos, …)
│   └── uploads/         ← Property photos (git-ignored)
├── immohive/
│   ├── schema.sql                  ← Run once to create tables
│   ├── migrate-from-wordpress.php  ← One-time WP→immohive migration (CLI)
│   ├── includes/        ← db.php, Property.php, ConnectClient.php
│   ├── admin/           ← Property CRUD UI (login → list → edit)
│   ├── api/             ← JSON API consumed by frontend
│   └── cron/publish.php ← Scheduled Immoweb push
├── templates/           ← header.php, footer.php
├── config.php           ← Loads .env, defines constants
├── .env.example         ← Copy to .env and fill in secrets
└── deploy.php           ← GitHub webhook receiver

Setup on DirectAdmin

1. Clone & configure

cd /home/USERNAME/
git clone https://github.com/rousseauxy/essentimmo app
cd app
cp .env.example .env
nano .env        # fill in DB credentials, CONNECT_API_KEY, DEPLOY_SECRET

2. Point webroot to public/

In DirectAdmin → Domains → essentimmo.be → set document root to:

/home/USERNAME/app/public

3. Database

mysql -u USERNAME -p essentimmo < /home/USERNAME/app/immohive/schema.sql
ln -s /home/USERNAME/app/immohive/admin /home/USERNAME/app/public/admin

5. Generate admin password hash

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

Paste the hash into .env as ADMIN_PASS.

6. Cron job (Immoweb push)

DirectAdmin → Cron Jobs → add:

*/5 * * * *   php /home/USERNAME/app/immohive/cron/publish.php >> /home/USERNAME/logs/immohive.log 2>&1

7. GitHub webhook

GitHub repo → Settings → Webhooks → Add webhook: - Payload URL: https://essentimmo.be/deploy.php - Content type: application/json - Secret: value of DEPLOY_SECRET in your .env - Event: push


Immohive admin

Navigate to https://essentimmo.be/admin/ and log in with the credentials from .env.

Scheduled Immoweb publishing

  1. Add a property → set Status to Scheduled
  2. Set a Publish at datetime
  3. The cron job checks every 5 minutes for due properties and pushes them to connect.xact.be → Immoweb

connect.xact.be

connect.xact.be is a multi-tenant credential proxy. It holds the Immoweb API token for each client. When cron/publish.php sends a property payload + your CONNECT_API_KEY, connect swaps in the Immoweb token and forwards to the Immoweb API.


WordPress migration

immohive/migrate-from-wordpress.php is a one-time CLI script to copy properties from the old WordPress database (Easy Real Estate plugin) into the immohive schema. Edit the DB constants at the top before running:

php /home/USERNAME/app/immohive/migrate-from-wordpress.php --dry-run
php /home/USERNAME/app/immohive/migrate-from-wordpress.php