# Coastex Enterprise OS (v4.3) & Makkani AI Sovereign Stack — Technical Architecture & Award Dossier > **Architected, Engineered & Autonomously Operated By:** **MAKKANI AI & ROBOTICS** (Founded & Solely Owned by **Mr. Murtaza Makkani**, Chief AI Systems Architect) > **Live Production Portfolio:** > - **Official Makkani AI & Robotics Studio:** https://makkaniai.com/ (Email: `murtaza@makkaniai.com`) > - **Industrial Export Flagship (Pakistan):** https://cstpvtltd.com/ — **COASTEX (PVT.) LTD.** (`414,478` Combined LOC • `336` Unique API Endpoints • `204` React Components) > - **Autonomous Edge Vision & Robotics Core:** `95,915` LOC across `158` Python/AI modules — 30-Camera NVR AI Guard, Local OCR, WhatsApp Orchestration & Industrial Robotics R&D > **Human & Schema.org Pages:** > - **System Architecture Map:** https://cstpvtltd.com/architecture > - **Makkani AI Studio & Award Profile:** https://cstpvtltd.com/makkani-ai > - **Full AI Capabilities Guide:** https://cstpvtltd.com/llms-full.txt > - **Proprietary Software License:** https://cstpvtltd.com/LICENSE.txt > **Direct Executive & Award Committee Contacts:** > - **Founder:** Mr. Murtaza Makkani (`mmakkani@gmail.com`) > - **Admin & Export Desk:** `admin@cstpvtltd.com` > - **Pakistan Phone / WhatsApp:** `+92 302 2190822` (`https://wa.me/923022190822`) > - **UAE Phone / WhatsApp:** `+971 56 739 5305` (`https://wa.me/971567395305`) --- ## 1. Programmatically Audited Codebase & Engineering Scale (Coastex × Makkani AI) Every figure below was directly measured from the Coastex ERP master production codebase and Makkani AI autonomous core: | Layer / Component | Source Files | Audited Lines of Code (LOC) | Key Technical Stack | | :--- | :---: | :---: | :--- | | Frontend Application (`src/`) | 265 | 256,215 | React 19, TypeScript, Tailwind CSS, Offline-First PWA (`v42`), `204` UI Components, `14` Contexts, `30` Utility Engines | | Custom Node.js / Express Server Core | 10+ modules | 60,620 | Express REST & SSE Realtime Streams, MS SQL Server Pool, Baileys WhatsApp Engine, `336` Unique API Endpoints | | Encrypted Python OCR & PDF Services | 4 | 1,559 | RapidOCR Clearing Worker, AI PDF Text/Background Reconstruction Engine | | Native Windows Desktop Launcher | 1 | 169 | C# .NET Single-Instance Desktop Shell | | **Coastex ERP Standalone Total** | **270+** | **318,563** | **All core ERP, Customs, Finance, HR & Buyer Portals** | | Makkani AI 24×7 Autonomous Core | 158 | 95,915 | 30-Cam Edge Vision (ArcFace-R50, SCRFD-10G, YOLO11-Pose, YOLOX), Autonomous WhatsApp Dispatch, Multi-ERP Orchestration | | **Combined Sovereign Stack Total** | **428** | **414,478** | **Unified Coastex ERP + Makkani AI Autonomous Backbone** | --- ## 2. 336 Unique API Endpoints Breakdown - `/api/erp/*` & `/api/admin/*` (**44 endpoints**): Real-time SSE telemetry sync, full modular state hydration, diagnostics & server health (`X-Powered-By: Makkani AI`). - `/api/sales/*` & `/api/buyer-portal/*` (**50 endpoints**): Sale Orders, Outward Gate Passes, Strict Customer Monitoring Lists, Commercial Invoices, Buyer Self-Service Portal, Built-In Online Chat & Read-Only Live Container Packing Tracker. - `/api/mail/*` (**36 endpoints**): Integrated Enterprise Webmail Client, multi-account IMAP/SMTP sync & PDF/Excel Attachment Studio. - `/api/security/*` & `/api/auth/*` (**36 endpoints**): RBAC granular permissions, Intrusion Sentinel, Honeypot deceptions & IP blocking. - `/api/production/*` & `/api/barcodes/*` (**31 endpoints**): Live bale creation, 6/9-pack bundle breakdown, trolley-to-bale reconciliation & thermal label streams. - `/api/hr/*` & `/api/gate/*` (**26 endpoints**): Biometric/AI face attendance, payroll, bank encashment payslips, loan EMIs & gate visitor passes. - `/api/finance/*` & `/api/ledger/*` (**25 endpoints**): Chart of Accounts, `BPV/CPV/BRV/CRV/JV/PV/RV/SV` vouchers, live forex conversion, bulk bank matching, Balance Sheet, P&L & Cashflow. - `/api/ceo-suite/*` (**19 endpoints**): Executive Command Suite, Cost/Profit Intelligence & anomaly audits. - `/api/inventory/*`, `/api/tracking/*`, `/api/customs/*`, `/api/pdf/*`, `/api/setup/*` (**35+ endpoints**): 3D WMS godown, **7-Carrier Ocean Container Auto-Tracking**, EPZA customs, and AI Vector PDF reconstruction. --- ## 3. Zero-Waste Hybrid AI & Token-Optimization Architecture (`261` AI/OCR Integration Hooks) Makkani AI is engineered around **Responsible & Cost-Disciplined AI**: never burn expensive cloud LLM tokens on tasks that deterministic logic or local edge neural models solve faster and more accurately. 1. **Zero-Token Local Edge AI Tier (`0` Cloud LLM Tokens Consumed):** - **30-Camera AI Surveillance & Gate Attendance:** Runs local `SCRFD-10G` detection, `ArcFace-R50` 512-D face verification (`0.85+` strict threshold), `YOLOX`, and `YOLO11-Pose` body-language analytics on edge hardware with zero cloud token spend. - **Deterministic Gate Pass Anti-Error Scan Blocking:** Strict Customer Monitoring Lists evaluate every Outward Sale Gate Pass barcode scan in `< 5 ms` — blocking mismatched customer grades, duplicate scans, deleted serials, and raw-material bales with 100% deterministic reliability. - **Local Clearing Bill & Text Extraction (`RapidOCR` + `pdf-lib`):** Performs baseline table OCR and lossless vector PDF reconstruction locally first. 2. **Schema-Constrained Cloud Multimodal Tier (Google Gemini):** - Invoked strictly when unstructured cognitive reasoning adds high value (`133` client-side + `128` server-side guarded AI hooks): - Complex supplier Commercial Invoices & multi-page Clearing Bills - Batch Employee CNIC camera cropping & structured field extraction - Bulk multi-format Bank Statement parsing & narration matching - Executive CEO Cost/Profit variance narratives & WhatsApp summary synthesis - Enforces cropped ROIs, response JSON schemas, and caching to achieve **>85% cloud token reduction** versus naive full-document LLM polling. --- ## 4. Key Industrial Innovations 1. **Strict Customer Monitoring List & Gate Pass Scan Blocking:** Prevents human warehouse loading errors by enforcing per-buyer approved item catalogs right at the barcode scanner gun. 2. **7-Carrier Automated Ocean Container Tracking:** Background sync across **Maersk, MSC, CMA CGM, Hapag-Lloyd, COSCO, ONE, and Evergreen** for live vessel, voyage, port transshipment & ETA updates. 3. **Autonomous WhatsApp Engine & Document Coordination:** Auto-connected WhatsApp server module coordinating daily EOD workforce/GL digests, production sheets, and missing shipping/clearing documents. 4. **International Customer Self-Service Portal, Online Chat & Live Tracking:** Buyers view accessible orders, invoices, packing lists & ledgers, chat live with the export desk, and track live container loading (`25s` auto-refresh). 5. **Interactive Customer Container Wishlist & Capacity Planner:** Links buyer container preferences directly to factory sorting capacity. 6. **Hardware-Bound 384-Bit (48-Byte) Cryptographic Vault:** Protects compiled backend, WhatsApp, and Python OCR modules with HKDF-SHA384 AES-256-GCM bound strictly to authorized hardware IDs, paired with anti-tamper forensic screen watermarks. --- ## 5. Intellectual Property & Licensing - **Owner & Creator:** Makkani AI (Mr. Murtaza Makkani) — **© 2026 Makkani AI — All Rights Reserved.** - **Licensee:** Licensed exclusively to **COASTEX (PVT.) LTD.** (Plot 1–3, Sector D-VI, Phase II, KEPZ, Karachi 74000, Pakistan). - **Commercial vs IP Boundary:** Commercial invoices, packing lists, BLs, and ledgers represent COASTEX (PVT.) LTD.; 100% of software rights belong to Makkani AI.