TradeScope AI Scope & Statusהיקף וסטטוס
Forex-Broker CRM · Engineering Status
CRM לברוקר פורקס · סטטוס הנדסי

Roles, Permissions & CRM Performance

תפקידים, הרשאות וביצועי ה־CRM

The live state of the TradeScope operator platform — the 18-role access model, the new three-state permission matrix, CRM feature performance, and the full data model.

המצב החי של פלטפורמת המפעילים של TradeScope — מודל ההרשאות ב־18 תפקידים, מטריצת ההרשאות התלת־מצבית החדשה, ביצועי מודולי ה־CRM, ומודל הנתונים המלא.

Last updated · 13 Jul 2026 · backend 1628d1a · frontend d353923 · migration 050 עודכן לאחרונה · 13 ביולי 2026 · בקאנד 1628d1a · פרונטאנד d353923 · מיגרציה 050
18
Professional rolesתפקידים מקצועיים
37
Permission slugsהרשאות
4
Access levels / cellרמות גישה לכל תא
61
Database tablesטבלאות במסד הנתונים
01

Access model — 18 roles

מודל ההרשאות — 18 תפקידים

The platform grew from 7 flat roles to the full forex-broker org taxonomy, with a reporting hierarchy and an org-chart view. Every endpoint gates on a permission slug, never on a role name — so a new role adapts navigation, routes, and the matrix editor automatically.

הפלטפורמה גדלה מ־7 תפקידים שטוחים למבנה הארגוני המלא של ברוקר פורקס, עם היררכיית דיווח ותצוגת עץ ארגוני. כל נקודת קצה נשלטת לפי הרשאה, לעולם לא לפי שם תפקיד — כך שתפקיד חדש מתאים אוטומטית את הניווט, המסלולים ועורך המטריצה.

Departmentמחלקה Rolesתפקידים
Administrationניהול־עלsuper_administrator · crm_administrator
Sales chainשרשרת מכירותcountry_director · sales_director · sales_manager · team_leader · senior_sales_agent · sales_agent
Retentionשימורretention_manager · account_manager
Growthצמיחהaffiliate_manager · marketing_manager
Risk & controlסיכון ובקרהcompliance_officer · finance_officer · risk_manager · qa_monitoring
Support & auditתמיכה וביקורתcustomer_support · viewer_auditor

The 5 legacy role strings (owner, admin, conversion_manager, agent, it_manager) are retained as working aliases — no live operator ever lost access. Global data scope is granted only to Super Administrator + CRM Administrator; everyone else sees their own manager_id subtree.

5 שמות התפקידים הישנים (owner, admin, conversion_manager, agent, it_manager) נשמרו ככינויים פעילים — אף מפעיל חי לא איבד גישה. גישה כלל־ארגונית לנתונים ניתנת רק ל־Super Administrator ול־CRM Administrator; כל השאר רואים את תת־העץ שלהם לפי manager_id.

02

Three-state permission matrix

מטריצת הרשאות תלת־מצבית

Each cell in the owner-editable matrix is no longer on/off. It is one value on an ordered scope ladder, so a role can read a feed without being able to change it, or write only inside its own team.

כל תא במטריצה הניתנת לעריכה על ידי הבעלים כבר אינו כן/לא. הוא ערך אחד על סולם גישה מדורג, כך שתפקיד יכול לקרוא מסך בלי יכולת לשנות אותו, או לכתוב רק בתוך הצוות שלו.

None
No access — request is refused (403).
אין גישה — הבקשה נדחית (403).
View
Read-only. May see the feed, may not write.
קריאה בלבד. רואה את המסך, לא כותב.
Team
May write — but only inside the operator's own subtree.
רשאי לכתוב — אך רק בתוך תת־העץ של המפעיל.
Full
Full access, organisation-wide.
גישה מלאה, כלל־ארגונית.

Sample of the seeded defaults (owner-editable in /admin/roles):

דוגמה מברירות המחדל שהוזרעו (ניתנות לעריכה על ידי הבעלים ב־/admin/roles):

Roleתפקיד clients:viewclients:createtransactions:viewkyc:view
crm_administratorFullFullFullFull
sales_managerFullTeamNoneNone
sales_agentFullTeamNoneNone
compliance_officerViewNoneViewView
viewer_auditorViewNoneViewView

Safety — enforcement ships dark flag off

בטיחות — האכיפה עולה חשוכה דגל כבוי

The four new read-gates (Clients / Transactions / KYC / Recordings) are wired behind ENFORCE_VIEW_SLUGS, which ships off. With the flag off, live behaviour is byte-identical to before — no operator loses a feed. Turning it on is an explicit owner decision, after reviewing the matrix.

ארבעת שערי־הקריאה החדשים (לקוחות / עסקאות / KYC / הקלטות) מחווטים מאחורי ENFORCE_VIEW_SLUGS, שעולה כבוי. כשהדגל כבוי, ההתנהגות החיה זהה לחלוטין לקודם — אף מפעיל לא מאבד מסך. הדלקתו היא החלטה מפורשת של הבעלים, לאחר סקירת המטריצה.

03

CRM performance & modules

ביצועי ה־CRM והמודולים

The broker back-office is live across client management, money, calling, compliance, and trading. Status of the major modules:

מערך ה־Back-office של הברוקר פעיל לאורך ניהול לקוחות, כספים, חיוג, ציות ומסחר. סטטוס המודולים המרכזיים:

Client card & CRM core live

כרטיס לקוח וליבת CRM חי

Full client records, phones directory, device/IP/VPN intelligence, stated-vs-verified identity checks, priority tiers, and a per-client risk cockpit (equity / margin / free / level with hedge-aware net exposure).

רשומות לקוח מלאות, ספריית טלפונים, מודיעין מכשיר/IP/VPN, בדיקות זהות מוצהרת מול מאומתת, דרגות עדיפות, ותא בקרת סיכון per-לקוח (הון / מרג'ין / פנוי / רמה עם חשיפה נטו מודעת־גידור).

Conversion & retention live

המרה ושימור חי

Live visitor-presence board, follow-up watchlist for visitors who left before contact, conversion-manager Team view, and a native predictive dialer with daily number-health checks and a safety governor.

לוח נוכחות מבקרים חי, רשימת מעקב אחר מבקרים שעזבו לפני יצירת קשר, תצוגת Team למנהל המרות, וחייגן חיזוי מובנה עם בדיקות תקינות מספרים יומיות ומושל בטיחות.

Money, KYC & compliance live

כספים, KYC וציות חי

Deposits/withdrawals ledger with approval gate, KYC document review with risk tiering, and sanctions/PEP screening seams. Compliance enforcement flags (ENFORCE_KYC_TIER, ENFORCE_CLIENT_AUTH) are staged dark, pending legal sign-off.

ספר הפקדות/משיכות עם שער אישור, סקירת מסמכי KYC עם דירוג סיכון, ותפרי סינון סנקציות/PEP. דגלי אכיפת הציות (ENFORCE_KYC_TIER, ENFORCE_CLIENT_AUTH) מוכנים חשוכים, ממתינים לאישור משפטי.

Trading & AI live · paper

מסחר ו־AI חי · נייר

The AI opens and closes real book positions with honest quote-engine P&L, an event log, and a stop-all control. Real-broker execution (MT4/MT5/cTrader bridge) and a trading licence are the remaining gates before live money.

ה־AI פותח וסוגר פוזיציות אמיתיות בספר עם רווח/הפסד ממנוע ציטוט אמיתי, יומן אירועים, ובקרת עצירה מלאה. ביצוע מול ברוקר אמיתי (גשר MT4/MT5/cTrader) ורישיון מסחר הם השערים שנותרו לפני כסף אמיתי.

Risk intelligence & smart alerts live

מודיעין סיכון והתראות חכמות חי

A detector engine watches every client for margin calls, stop-outs, equity drops, concentration, big deposits, unusual withdrawals, stale transactions, and inactivity — raising deduplicated alerts that auto-create prioritised rep tasks and bridge critical cases to escalations. Each client carries a composite risk score, an A–E rating, a churn likelihood, and behaviour flags, recomputed by a nightly job.

מנוע גלאים עוקב אחר כל לקוח למרג'ין קול, סטופ־אאוט, ירידות הון, ריכוזיות, הפקדות גדולות, משיכות חריגות, עסקאות תקועות וחוסר פעילות — ומעלה התראות ללא כפילות שיוצרות אוטומטית משימות נציג מתועדפות ומגשרות מקרים קריטיים לאסקלציות. כל לקוח נושא ציון סיכון מורכב, דירוג A–E, סבירות נטישה, ודגלי התנהגות, המחושבים מחדש במשימת לילה.

Fraud detection, war-room & timeline live

זיהוי הונאות, חדר מלחמה וציר זמן חי

Fraud detectors flag multi-country logins, failed-login bursts, novel payment methods, and anonymous-network access. A real-time management dashboard rolls the whole book into live KPIs (deposits, volume, exposure, open alerts, rep performance, 14-day trends), all hierarchy-scoped. Every client has a unified timeline merging messages, calls, tasks, transactions, alerts, escalations, AI trades, and logins.

גלאי הונאה מסמנים כניסות ממדינות מרובות, מקבצי כניסות כושלות, אמצעי תשלום חדשים, וגישה מרשת אנונימית. לוח ניהול בזמן אמת מגלגל את כל הספר ל־KPI חיים (הפקדות, ווליום, חשיפה, התראות פתוחות, ביצועי נציגים, מגמות 14 יום), הכול בהיקף היררכי. לכל לקוח ציר זמן מאוחד המשלב הודעות, שיחות, משימות, עסקאות, התראות, אסקלציות, עסקאות AI, וכניסות.

AI assistant & autonomous agent live · dark seam

עוזר AI וסוכן אוטונומי חי · תפר חשוך

A natural-language assistant answers rep questions with read-only tools scoped to the operator's own book, and an autonomous agent drafts messages, tasks, reminders, and CRM updates. Nothing customer-facing sends without a human approval click — the executor is reachable only from the approve endpoint. The provider is dual-seam: Gemini today, auto-preferring Claude the moment its key lands, with no code change.

עוזר בשפה טבעית עונה על שאלות נציגים עם כלי קריאה בלבד המוגבלים לספר של המפעיל, וסוכן אוטונומי מנסח הודעות, משימות, תזכורות, ועדכוני CRM. שום דבר מול הלקוח לא נשלח בלי קליק אישור אנושי — המבצע נגיש רק מנקודת האישור. הספק דו־תפרי: Gemini היום, ומעדיף אוטומטית את Claude ברגע שהמפתח שלו מגיע, ללא שינוי קוד.

Email delivery built · awaiting IT

משלוח אימייל בנוי · ממתין ל־IT

Real Gmail-SMTP sending is built. Client sees the handling agent's name as the sender; replies route to the agent; the send address stays noreply@ai-activation.live. Blocked only on IT delivering the mailbox App Password.

שליחת Gmail-SMTP אמיתית בנויה. הלקוח רואה את שם הסוכן המטפל כשולח; תשובות מנותבות לסוכן; כתובת השליחה נשארת noreply@ai-activation.live. חסום רק עד ש־IT ימסור את סיסמת האפליקציה של התיבה.

04

Data model — full CRM ERD

מודל נתונים — ERD מלא של ה־CRM

The live Supabase schema (61 tables). Relationships are application-level joins by id, client_id, or the shared identity / phone / email keys. Below are the core entities and how they connect, including the intelligence layer added in migrations 051–060.

סכמת ה־Supabase החיה (61 טבלאות). הקשרים הם joins ברמת האפליקציה לפי id, client_id, או מפתחות identity / טלפון / אימייל המשותפים. להלן הישויות המרכזיות וכיצד הן מתחברות, כולל שכבת האינטליגנציה שנוספה במיגרציות 051–060.

Access / RBACגישה / RBAC Client hubמרכז הלקוח Intelligence layerשכבת אינטליגנציה Satellite entityישות לוויין PK FK / join key
operators 1
  • id · username
  • role · email
  • manager_id ↺ self
  • team_id
role_permissions 745
  • role, permission
  • scope · allowed
  • updated_by
operator_tokens 24
  • token
  • operator_id
  • expires_at
operator_audit_log
  • id · actor
  • action · target
crm_clients 12
  • id · identity
  • phone · email
  • assigned_agent_id
crm_client_profiles
  • id = client
  • 28 profile cols
crm_client_phones 6
  • id
  • client_id
  • phone · primary
crm_transactions 26
  • id
  • client_id
  • type · status · amount
kyc_documents
  • id
  • client_id
  • status
client_risk_tier
  • client_id
  • tier · limits
client_screening
  • client_id
  • sanctions · pep
crm_messages 2
  • id
  • client_id
  • direction
crm_tasks
  • id
  • client_id
  • due · status
call_logs 20
  • id
  • client_id · identity
  • assigned_agent_id
trading_accounts 24
  • id = client
  • balance
ai_trading_sessions 9
  • id
  • client_id
  • status
visitor_presence 4
  • visitor_key
  • identity
  • online · last_seen
visitor_followups 3
  • id · visitor_key
  • identity · client_id
client_users 2
  • id
  • identity · email
crm_audit_log 120
  • id
  • client_id
  • field · changed_by
client_alerts
  • id · dedup_key
  • identity · client_id
  • family · severity · status
client_scores
  • identity
  • client_id
  • risk · rating · churn
client_score_history
  • identity, day
  • snapshot (7/30d trend)
client_login_events
  • id
  • identity
  • event · ip · country
client_metric_snapshots
  • identity, day
  • equity · margin_level
agent_actions
  • id · dedup_key
  • identity · client_id
  • kind · status (proposed→…)
ai_artifacts
  • id
  • identity · client_id
  • kind · content

Key relationships

קשרים מרכזיים

operators ─◀ role → role_permissions · scope resolved per (role, permission)
operators manager_id → self · the reporting hierarchy / team subtree
operators ─◀ id → operator_tokens.operator_id · one session per token
crm_clients ─◀ assigned_agent_id → operators.id · client ownership
crm_clients ─● id → profiles · phones · transactions · kyc · tasks · messages · risk_tier · screening
crm_clients ─● identity → visitor_presence · visitor_followups · call_logs · client_users
crm_clients ─● id → trading_accounts · ai_trading_sessions · manual_trading_orders
crm_clients ─● identity / id → client_alerts · client_scores · client_login_events · client_metric_snapshots · agent_actions · ai_artifacts
agent_actions ─▶ approve → the ONLY send path · proposed → approved → executed | failed (human click required)
client_alerts ─▶ critical → escalations (kind=risk, source=auto) · the escalation bridge
operators ─◀ role → role_permissions · scope נקבע לפי (role, permission)
operators manager_id → עצמי · היררכיית הדיווח / תת־עץ הצוות
operators ─◀ id → operator_tokens.operator_id · session אחד לכל token
crm_clients ─◀ assigned_agent_id → operators.id · בעלות על לקוח
crm_clients ─● id → profiles · phones · transactions · kyc · tasks · messages · risk_tier · screening
crm_clients ─● identity → visitor_presence · visitor_followups · call_logs · client_users
crm_clients ─● id → trading_accounts · ai_trading_sessions · manual_trading_orders
crm_clients ─● identity / id → client_alerts · client_scores · client_login_events · client_metric_snapshots · agent_actions · ai_artifacts
agent_actions ─▶ אישור → נתיב השליחה היחיד · proposed → approved → executed | failed (חובה קליק אנושי)
client_alerts ─▶ קריטי → escalations (kind=risk, source=auto) · גשר האסקלציה

Relationships stay logical joins by shared keys — a deliberate choice for a fast-moving schema. The intelligence layer (migrations 051–060) keys on both identity (money / trading paths) and client_id (the CRM UUID), resolved in Python at write time, never SQL-joined. Critical client_alerts bridge to the existing escalations table without a schema change; agent_actions can only leave proposed through a human approval click.

הקשרים נשארים joins לוגיים לפי מפתחות משותפים — בחירה מכוונת לסכמה מתפתחת. שכבת האינטליגנציה (מיגרציות 051–060) ממופתחת גם ל־identity (נתיבי כספים / מסחר) וגם ל־client_id (ה־UUID של ה־CRM), שנפתרים ב־Python בזמן הכתיבה, לעולם לא ב־SQL join. התראות client_alerts קריטיות מתגשרות לטבלת escalations הקיימת ללא שינוי סכמה; agent_actions יכול לעזוב את מצב proposed רק דרך קליק אישור אנושי.

05

What's owed to the owner

מה ממתין לבעלים

Decisions and hand-offs that need Ben before further enforcement. Nothing here blocks current live operation.

החלטות ומסירות הממתינות לבן לפני אכיפה נוספת. שום דבר כאן אינו חוסם את הפעילות החיה הנוכחית.