CLIENT CONTACT
MANAGEMENT SYSTEM
Enterprise CRM for a hierarchical sales organization, combining territory-scoped access, approval-driven sales pipelines, revenue-target allocation, and quote-to-email workflows.

Operational Friction
A multi-level sales organization (Rep → Manager → Director → VP → President → CFO → CEO) relied on spreadsheets for client tracking, lacked reliable territory-scoped access to client records, routed leads manually, and had no enforced mechanism for allocating revenue targets through the reporting hierarchy without risk of over-allocation.
Engineered Solution
Engineered a Laravel + React CRM around a recursive reporting hierarchy that drives authorization, territory propagation, and pipeline visibility. Built approval-gated sales workflows, a target-allocation engine with double-spend protection, and a quote → approval → numbered PDF → email lifecycle.
Architecture & Backend Implementation
Led backend architecture across authorization, territory management, target allocation, integrations, and document workflows.
Designed the relational schema across 117 migrations and structured service boundaries for territory propagation, target allocation, hierarchy, and notifications.
Implemented policy-driven authorization and query-scope isolation around the organizational hierarchy.
Integrated AuthCenter SSO with HMAC-signed user synchronization and queued retries with backoff.
Engineered the 20K+ row bulk-import path with chunking, pre-fetch caches, normalization, and duplicate resolution.
Key System Modules
Territory-Scoped Access
Granular company/state/city grants that aggregate up the reporting hierarchy and revoke from the entire subtree inside one transaction.
Target Allocation Engine
Cascade revenue-target allocation (global → regions → users) with double-spend prevention, downline protection, and consumed-target deletion guards.
Quote → PDF → Email
Two-stage approval, race-free sequential quote numbering under a cache lock, branded Dompdf generation, and ZIP-batched emailing.
Hierarchy-Driven Authorization
Cycle-safe, depth-capped recursive org tree powering query scopes, policies, and per-role pipeline visibility — reorganizations take effect instantly.
SSO & User Synchronization
Token-exchange SSO plus bidirectional HMAC-SHA256 user provisioning with AuthCenter, retried via queued jobs with backoff.
High-Volume Bulk Import
Chunked bulk inserts with pre-fetch caches, phone normalization, US state inference, and a follow-up duplicate-resolution flow.
Operational Interfaces


System Topology & Data Flow
React SPA Client
MUI · DataGrid · Axios/SWR · Laravel Echo
Laravel API & Authorization Layer
Sanctum Tokens · Rate Limiting · Policy Gates · Form Requests
Territory Service
Cascade grant propagation & subtree revocation
Target Engine
Double-spend validation & budget tree math
Notification Workers
Queued alerts & email dispatch pipelines
Database & Queue Infrastructure
- •MySQL Relational Schema (117 Migrations)
- •Database Cache & Redis Queue Store
- •Optimized Composite & Foreign Key Indexes
External Integrations
- •AuthCenter SSO (HMAC-SHA256 Signed Sync)
- •Pusher Real-Time WebSockets
- •Microsoft Graph API (Teams Meetings)
- •SMTP & Dompdf Document Generation
Technical Deep-Dive & Decisions
Money Flows Down the Chain Without Double-Spending
A global revenue target is carved into regional buckets and assigned CEO → CFO → President → VP → …, and every rung must not over-allocate. Naive sums double-count cascading redistributions and let budgets shrink below what has already been distributed onward.
Systematic Resolution
Bucket-level validation (global ≥ sum of regions), "direct assignments only" sums keyed on the bucket creator, downline checks on updates, consumed-target deletion guards, and bottom-up cascade deletes — all executed within atomic database transactions.
Intentional Design Choice
Recorded budget chains as explicit relational data (who gave whom money from which bucket) so cascade math and consumed-target detection are computable instead of inferred from transient state.
Prioritization Rationale
Prioritized strict financial invariants and transactional consistency over update speed because corrupted allocation data would propagate into downstream reporting.
Expanded Application Views




Business & Operational Value
Replaced spreadsheet-driven sales operations with a centralized CRM enforcing territory-scoped access, hierarchical approvals, target allocation rules, and quote workflows across the organization.
The system brought client management, pipeline operations, organizational visibility, target planning, and quoting into a single operational platform.
Categorized Stack
LET'S BUILD
YOUR NEXT SYSTEM
Whether you are looking to architect a secure SaaS platform, integrate complex payment gateways, or automate operational workflows, I am ready to help.