Persian RTL CRM customer portal backed by HubSpot — no Laravel, no Docker, no Composer required.
Runs on any shared PHP 8.2+ host with mod_rewrite (or nginx equivalent).
- PHP 8.2+ with
curlandjsonextensions - Writable
storage/cacheandstorage/logsdirectories - Apache
mod_rewrite(document root =public/)
Option A (recommended): Point document root to the public/ folder.
Option B (subdirectory): If your URL is https://example.com/public/, set in .env:
APP_URL=https://example.com/public
APP_BASE_PATH=public
- Upload the project to your host.
- Copy
.env.exampleto.env(one level abovepublic/) and set your API keys. - Ensure
storage/is writable by PHP.
your-site/
config/
public/ ← document root
src/
storage/
.env
| Variable | Purpose |
|---|---|
HUBSPOT_TOKEN |
HubSpot private app token |
ZOHAL_TOKEN |
Zohal API bearer token |
IPPANEL_API_KEY |
IPPanel API key |
IPPANEL_FROM_NUMBER |
Sender line in E.164 |
IPPANEL_PATTERN_OTP |
Pattern code for OTP |
ADMIN_PASSWORD_* |
Admin login passwords |
This app uses these HubSpot custom/contact fields:
| App field | HubSpot property |
|---|---|
| National code | ncode |
| Birth date (Persian) | date_of_birth |
| Father name | father_name |
Legacy aliases (natcode, dateofbirth) are still read for backward compatibility when loading contacts.
Detailed JSON logs are written to storage/logs/hubspot.log:
- Every API request (method, endpoint, duration, status)
- Contact operations (search, create, update, login, register)
- Property mappings with masked PII
- Failed requests with response body preview and exception details
Set APP_DEBUG=true in .env to enable debug-level property mapping logs.
Document root = public/:
cd public
php -S localhost:8000 router.phpApp in a subdirectory (URL like /public/):
php -S localhost:8000 router.phpOpen http://localhost:8000 (or http://localhost:8000/public/ for subdirectory mode)
| Route | Description |
|---|---|
/ |
Redirect by session |
/auth/login |
User login (national code → HubSpot ncode) |
/auth/register |
Multi-step registration |
/user/panel |
User dashboard |
/Deal/Search |
Deal search |
/admin/login |
Admin login |
/admin/owner-select |
HubSpot owner picker |
/admin/dashboard |
Admin dashboard |
/admin/contacts |
Contact list |
/admin/contacts/create |
Create contact (multi-step with Zohal identity verification) |
/admin/deals |
Deal list |
/admin/kanban |
Kanban board view of deals |
/admin/tickets |
Support tickets |
/admin/analytics |
Analytics & stats |
/admin/settings |
System settings & integrations status |
Ported from PicoPlus Laravel / Blazor (.NET 9).