v1.0.0

Getting Started

This guide walks you through installing Clientra CRM on your server, from verifying system requirements to completing the setup wizard and taking your first steps in the application.

System Requirements

Server Software

ComponentMinimumRecommended
PHP8.08.2+
MySQL5.78.0+
MariaDB10.410.6+
Web ServerApache 2.4 / Nginx 1.18Latest stable
Disk Space500 MB5 GB+ (for uploads)
RAM512 MB2 GB+

Required PHP Extensions

  • pdo — Database abstraction layer
  • pdo_mysql — MySQL/MariaDB driver
  • mbstring — Multi-byte string handling
  • openssl — Encryption (email passwords)
  • curl — HTTP requests (Meta Ads, webhooks)
  • zip / ZipArchive — Backup/restore
  • gd or imagick — Image processing
  • json — JSON encode/decode

PHP Configuration

Update your php.ini with these minimum settings:

ini
memory_limit          = 256M
upload_max_filesize   = 64M
post_max_size         = 64M
max_execution_time    = 120
max_input_vars        = 5000
date.timezone         = Asia/Dubai   ; or your timezone

Installation Steps

Follow the 6-step installation wizard to get Clientra CRM running.

Upload Files to Server

Upload the entire Clientra CRM package to your server. The package contains two main directories: config/ and public/. The placement of these directories is critical.

Point Domain to public/ Directory
❌ Critical Security Requirement
Your domain's document root MUST point to the public/ directory. The config/ directory must remain outside the web root. If config/ is web-accessible, your database credentials and encryption keys will be exposed.
text
Correct layout:
/home/user/                       ← Server home
  config/                         ← PROTECTED (outside web root)
    db.php
    secrets.php
    sessions/
  public_html/   OR  public/      ← Document root
    index.php
    api.php
    assets/
    ...
Create the Database

Create a new MySQL/MariaDB database and user. Note the database name, username, and password — you'll need them in the next step.

sql
CREATE DATABASE invejrek_crmmain CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'clientra'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON invejrek_crmmain.* TO 'clientra'@'localhost';
FLUSH PRIVILEGES;
Run the Installation Wizard

Open https://yourdomain.com/install/install.php in your browser. The 6-step wizard will guide you through setup:

StepDescription
1 Requirements CheckVerifies PHP version, extensions, and directory permissions
2 Database ConfigEnter host, database name, username, and password
3 Admin AccountCreate the initial administrator account (email + password)
4 App SettingsSet app name, timezone, currency, and edition (UAE/Global)
5 InstallationImports database schema and seeds default data
6 CompleteInstallation complete — redirects to login page
Delete the /install/ Directory
❌ Security — Delete After Install
Remove the /install/ directory immediately after completing setup. Leaving it accessible allows anyone to reinstall and wipe your database.
Log In and Configure

Navigate to your domain, log in with your admin credentials, and complete the post-installation configuration steps below.

Directory Structure

clientra-crm/ ├── config/ ← OUTSIDE web root (protected) │ ├── db.php ← Database credentials │ ├── secrets.php ← App key, JWT secret, API keys │ └── sessions/ ← PHP session storage ├── install/ │ └── database.sql ← Full database schema └── public/ ← Document root (web-accessible) ├── index.php ← SPA entry point (HTML shell) ├── api.php ← REST API router (377 endpoints) ├── .htaccess ← Apache rewrite rules ├── assets/ │ ├── css/ ← 3 CSS files only │ │ ├── variables.css ← Theme variables & CSS properties │ │ ├── components.css ← UI component styles │ │ └── main.css ← Page layouts & utilities │ └── js/ │ ├── DataAdapter.js ← PascalCase ↔ snake_case │ ├── api.js ← ApiClient class │ ├── router.js ← Hash-based SPA router │ ├── app.js ← App class & initialization │ ├── components/ ← 17 reusable components │ └── pages/ ← 36 page modules ├── includes/ │ ├── ApiHandler.php ← Legacy API handler │ ├── Services/ ← 25+ service classes │ └── dompdf/ ← PDF generation library ├── addons/ ← Addon modules (dynamic) ├── uploads/ ← Property images, documents ├── migrations/ ← Database migration scripts └── webhooks/ ← Webhook handlers

Apache Configuration

If you're using Apache, the included .htaccess handles URL rewriting. For a dedicated virtual host:

apache
<VirtualHost *:443>
    ServerName     yourdomain.com
    DocumentRoot   /home/user/clientra/public

    <Directory /home/user/clientra/public>
        AllowOverride  All
        Require        all granted
        Options        -Indexes
    </Directory>

    # Protect config directory
    <Directory /home/user/clientra/config>
        Require        all denied
    </Directory>

    SSLEngine      on
    SSLCertificateFile     /path/to/cert.pem
    SSLCertificateKeyFile  /path/to/key.pem
</VirtualHost>

Nginx Configuration

nginx
server {
    listen       443 ssl;
    server_name  yourdomain.com;
    root         /home/user/clientra/public;
    index        index.php;

    # SSL configuration
    ssl_certificate      /path/to/cert.pem;
    ssl_certificate_key  /path/to/key.pem;
    ssl_protocols        TLSv1.2 TLSv1.3;

    # Main SPA routing
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    # PHP processing
    location ~ \.php$ {
        fastcgi_pass    unix:/var/run/php/php8.2-fpm.sock;
        fastcgi_index   index.php;
        include         fastcgi_params;
        fastcgi_param   SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    }

    # Security: block access to hidden files
    location ~ /\. {
        deny all;
    }

    # Cache static assets
    location ~* \.(css|js|png|jpg|gif|ico|svg|woff2)$ {
        expires    30d;
        add_header Cache-Control "public, immutable";
    }
}

cPanel / Shared Hosting

For shared hosting environments using cPanel:

Upload Files via FTP or File Manager

Upload config/ to your home directory (e.g., /home/username/config/) and upload public/ contents to your domain's document root (e.g., public_html/).

Create Database in cPanel

Use MySQL Databases in cPanel to create a new database and user. Assign all privileges to the user on the new database.

For Addon Domains

In cPanel's Addon Domains, point the subdomain's document root to public_html/clientra/public/ if you uploaded the public/ folder to a subdirectory. The config/ must be one level above the document root.

ℹ Shared Hosting Tip
On shared hosting, PHP sessions path in config/secrets.php should be set to an absolute path such as /home/username/clientra/config/sessions/ to ensure sessions work correctly.

First Steps After Installation

After logging in as administrator for the first time, complete these setup tasks:

TaskLocationDescription
Change admin password Profile page Update the default password set during installation
Configure app branding Settings → General Set app name, favicon, and primary color
Set timezone Settings → General Set to your local timezone (default: Asia/Dubai)
Configure currency Settings → General Default is AED (UAE Dirham) — change if needed
Add users and roles Users page Create agent and viewer accounts for your team
Set up departments Departments page Create department structure (Listing, Sales, etc.)
Configure email accounts Settings → Email Add IMAP/SMTP accounts for the Mail module
Set up lookups Lookups page Add developers, locations, and communities
Choose theme Settings → Appearance Select from 7 available themes (default: dark)
✓ Default Login
Login URL: https://yourdomain.com
Email: The admin email you set during installation
Password: The admin password you set during installation