""" APPDOWNLOAD_HTML = r""" eSmart CRM - Download App
Version 3.0.0

eSmart CRM

Complete CRM & HRM with SIP calling, attendance, lead pipeline — all in your pocket.

📞
SIP Calling
WebRTC calls via Asterisk
🎯
Lead Pipeline
Kanban + proposals
🧾
Invoices
Billing & payment tracking
👥
HRM
Employees, attendance, leave
Download APK (Android)
Android 7.0+ · ~28 MB
Enable "Install unknown apps" in Android Settings
← Open Web CRM
""" FAVICON_SVG = 'eS' NGINX_CONF = f"""server {{ listen 80; server_name crm.myowncloud.tech; return 301 https://$host$request_uri; }} server {{ listen 443 ssl http2; server_name crm.myowncloud.tech; ssl_certificate {CERT_DIR}/fullchain.pem; ssl_certificate_key {CERT_DIR}/privkey.pem; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!MD5; root {PUB}; index index.html; location /app/ {{ root {PUB}; add_header Content-Disposition 'attachment'; }} location = /appdownload {{ try_files /appdownload/index.html =404; }} location /asterisk/ws {{ proxy_pass http://127.0.0.1:8088/ws; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_read_timeout 3600s; }} location ~ ^/api/.*$ {{ root {BASE}/public; fastcgi_pass unix:/tmp/php-cgi-83.sock; fastcgi_index index.php; include fastcgi.conf; fastcgi_param SCRIPT_FILENAME {BASE}/public/index.php; fastcgi_param HTTPS on; }} location /api/ {{ root {BASE}/public; try_files $uri $uri/ @api; }} location @api {{ root {BASE}/public; fastcgi_pass unix:/tmp/php-cgi-83.sock; fastcgi_index index.php; include fastcgi.conf; fastcgi_param SCRIPT_FILENAME {BASE}/public/index.php; fastcgi_param HTTPS on; fastcgi_param REQUEST_URI $request_uri; }} location / {{ try_files $uri $uri/ /index.html; }} location ~ /\\.(?!well-known).* {{ deny all; }} access_log /www/wwwlogs/crm.myowncloud.tech.log; error_log /www/wwwlogs/crm.myowncloud.tech.error.log; }}