πŸ€–

CRM AI Consultant

Version 5.0 β€’ Documentation

A production-ready, self-hosted AI chat platform with Grok, OpenAI, Telegram, WhatsApp and Viber. Includes read-only demo account, CSRF protection, responsive design and full SEO microdata. Landing translated 100% in 8 languages.

Changelog Β· ДокумСнтація (UA)

1. Introduction

CRM AI Consultant is a universal two-way AI chat system that allows you to connect an intelligent widget to any website (WordPress, Tilda, pure HTML, Laravel, etc.).

Each website has completely individual settings: chat design, communication channel, AI model, API keys, and its own conversation history.

Supported channels: Telegram, OpenAI (GPT), Grok (xAI), WhatsApp, Viber

NEW What's New in Version 5.0

  • πŸ” Production security β€” CSRF tokens, login rate limiting, security headers, .htaccess hardening
  • πŸ‘ Demo account β€” demo / demo read-only access for clients
  • πŸ“± Responsive UI β€” fullscreen chat on mobile, tablet/desktop breakpoints
  • 🌍 100% i18n β€” landing in UA, EN, RU, NO, LT, SV, PL, DE; admin in UA, EN, RU, NO
  • πŸ” SEO β€” Open Graph, JSON-LD (SoftwareApplication, FAQ, Organization, WebSite)
  • πŸ› Bug fixes β€” cache bug in functions.php, unified version 5.0

See full details in changelog-en.html

Demo account (read-only)

Use demo / demo at admin/login.php to show the admin panel to clients without allowing edits, deletions or password changes.

2. Project Structure

crm-ai-consultant/
β”œβ”€β”€ index.php                 ← Main widget file (serves JS config + handles all AJAX)
β”œβ”€β”€ config.php                ← Main system configuration (database, constants)
β”œβ”€β”€ version.php               ← Current version
β”œβ”€β”€ documentation.html        ← Full documentation (this file)
β”œβ”€β”€ changelog.html            ← Version history
β”œβ”€β”€ crm-ai-error.log          ← Error log (auto-created)
β”‚
β”œβ”€β”€ admin/
β”‚   β”œβ”€β”€ index.php             ← Main admin dashboard (list of all sites)
β”‚   β”œβ”€β”€ sites.php             ← Edit site settings
β”‚   β”œβ”€β”€ conversations.php     ← View all chat history
β”‚   β”œβ”€β”€ login.php             ← Admin login
β”‚   β”œβ”€β”€ navigation.php        ← Admin header
β”‚   β”œβ”€β”€ footer.php            ← Admin footer
β”‚   β”œβ”€β”€ icon.php              ← Bot icon picker modal
β”‚   └── settings_*.php        ← Channel settings (telegram, grok, openai, etc.)
β”‚
β”œβ”€β”€ sites/                    ← Individual site settings + prompt files
β”‚   └── cache/                ← Cached site settings (for speed)
β”‚
β”œβ”€β”€ conversations/            ← All chat histories stored in MySQL
β”‚
β”œβ”€β”€ channels/
β”‚   β”œβ”€β”€ telegram.php          ← Telegram handler
β”‚   β”œβ”€β”€ grok.php              ← Grok (xAI) handler
β”‚   β”œβ”€β”€ openai.php            ← OpenAI GPT handler
β”‚   β”œβ”€β”€ whatsapp.php          ← WhatsApp handler
β”‚   └── viber.php             ← Viber handler
β”‚
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ chat.js               ← Main chat widget script
β”‚   └── style.css             ← Chat widget styles
β”‚
└── includes/
    β”œβ”€β”€ functions.php         ← Core functions (save messages, routing, caching)
    β”œβ”€β”€ get-messages.php      ← AJAX: get conversation messages
    └── get-conversation.php  ← AJAX: full conversation view (for admin)
                

3. Installation

  1. Upload all files to the /ai/crm/ folder on your server
  2. Create folders sites/ and sites/cache/
  3. Set write permissions: 755 for folders, 644 for files
  4. Go to admin panel: https://bilohash.com/ai/crm/admin/
  5. Login as admin and change the default password immediately. Demo: demo / demo

4. How to Use

1. Add a new website in the admin panel

2. Fill in the settings (especially the system prompt!)

3. Copy the generated code

4. Paste it on your website before the </body> tag

5. Click the "Check" button in the admin panel

5. Managing Websites

Each website has its own unique site_id, generated automatically from the domain.
Example: mapsme_no, bilohash_com

<script src="https://bilohash.com/ai/crm/index.php?site=YOUR_SITE_ID"></script>

6. Communication Channels

Telegram

The fastest and most stable channel. Messages arrive in your Telegram.

OpenAI / Grok

Automatic replies powered by artificial intelligence.

WhatsApp

Business API support (in development).

Viber

Business API support (in development).

7. Chat Design

Each website can have a fully custom design: colors, bot icon, title, subtitle, widget position (left/right), greeting text, and auto-open settings.

8. API Keys

  • Telegram β€” Bot Token + Chat ID
  • OpenAI β€” API Key (get here)
  • Grok (xAI) β€” API Key (get here)

9. Troubleshooting

White screen

Check the file crm-ai-error.log in the /ai/ folder

Chat doesn't appear

Make sure the script is placed before </body> and the site_id is correct.

"Connection error"

Check that the channel is configured correctly and the API keys are valid.

CRM AI Consultant Β© 2026 Ruslan Bilohash
GitHub β€’ bilohash.com