Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

العربية | English

M.A.R.K.E.T Enterprise Platform (v4.0.5)

Modular Automated Response & Knowledge Engine for Trade
Google Maps Competitor Intelligence, AI Strategic Gap Synthesis, RBAC Multi-Role Orchestration, Asynchronous Session Queue & Standalone Local LLM Stack

GitHub Stars GitHub Forks Python 3.12+ FastAPI SQLite WAL Qwen 2.5 Coder Docker Release v4.0.5


Visual Cards Studio & Workflow Canvas

M.A.R.K.E.T v4.0.5 Visual Cards Studio

Multi-Card Connected Workflow Pipeline

M.A.R.K.E.T v4.0.5 is an enterprise-grade, self-hosted commerce automation platform that combines multi-channel customer communication, Google Maps competitor intelligence, role-based access control (RBAC), customer relationship management (CRM) composite identity persistence, automated request queue scheduling, and local/cloud large language model orchestration into a unified, zero-dependency Python service.


Key Highlights (v4.0.5 Enterprise)

  • Google Maps Competitor Intelligence: Autonomous Puppeteer Stealth background scraper extracting business profiles, star ratings, review counts, auto-scrolled customer reviews, and local image persistence.
  • AI Strategic Opportunity & Gap Synthesis: Unifies market intelligence with our store catalog to generate actionable vulnerability matrices, counter-marketing ad hooks, pricing arbitrage, and inventory gap opportunities.
  • Delta Growth Indicators: Automated month-over-month trend tracking comparing ratings and review velocity changes across scheduled scraping cycles.
  • Reader-Mode Content Sanitizer: Anti-hallucination web reader stripping noise and HTML boilerplate to feed pure factual context to local Qwen or Cloud LLMs.
  • Role-Based Access Control (RBAC): Secure multi-tier authentication engine featuring PBKDF2 password hashing (100,000 iterations), session token lifecycle management, and discrete functional permission enforcement across Executive Admin, Customer Support, IT Systems, Sales, and Operations.
  • Customer Support Handover Center: Centralized ticket handover management allowing human support agents to exclusively claim active customer conversations, suspend automated AI replies, deliver live WhatsApp responses, and reinstate automated routines upon ticket resolution.
  • Composite UID & CRM Profile Engine: Persistent customer identification format [PLATFORM]_[PHONE]_[INITIAL_CONTACT_TIMESTAMP] with immutable database registration and automated tier classification (VIP, Returning, Lead, New).
  • Time & Delay Task Scheduler: Autonomous background daemon executing long-term scheduled actions (e.g., 90-day promotional voucher dispatch, follow-up notifications) with persistent SQLite WAL state preservation across system restarts.
  • Meta Integration Gateway: Dual-channel Meta integration featuring Meta Graph API v19.0 for post publishing and secure Webhook endpoints for real-time comment and interaction ingestion.
  • Infinite 2D Visual Cards Canvas: Card-based flow designer with magnetic pin snapping, live cubic bezier signal rendering, and real-time step latency profiling.
  • Autonomous Code Synthesis (Qwen 2.5 Coder): Dynamic synthesizer transforming custom business requirements into interactive visual cards and executable Python backend modules.
  • Asynchronous Request Queue & Session Sandbox Isolation: Memory-level per-session locking mechanism preventing conversation crosstalk and race conditions, paired with multi-worker request queues and upstream gatekeeper input validation.
  • Zero-NPM Standalone Deployment: Production-ready static web application bundled directly into the FastAPI backend, serving the entire interface, API, and background workers on a single unified port (8000) without Node.js runtime dependencies.

Feature Comparison Matrix

Feature M.A.R.K.E.T v4.0.5 Generic Flow Builders Cloud Bot Platforms
Self-Hosted & Privacy First Yes (100% On-Premise) Partial No (Vendor Lock-in)
Google Maps Competitor Intelligence Yes (Puppeteer Stealth + Delta) No Paid Add-on
AI Strategic Gap Analysis Yes (Grounded Synthesis Engine) No Paid Consultation
Role-Based Access Control (RBAC) Yes (Fine-Grained Matrix) No Paid Enterprise Tier
Customer Support Handover Pool Yes (Exclusive Claiming) No Paid Add-on
CRM Composite UID Engine Yes (Immutable ID Format) No Basic Cookie / IP
Time & Delay Task Scheduler Yes (SQLite WAL Persistent) No Paid Cloud Tasks
Meta Graph API & Webhooks Yes (Built-in Gateway) External Bridge Paid Connector
Visual Cards & Flow Canvas Infinite 2D Bezier Canvas Node-Graph Linear Step Trees
Autonomous Code Synthesis Yes (Qwen 2.5 Coder) No No
Local LLM Execution Yes (llama-server / Ollama) Partial No (Cloud API Only)
Direct WhatsApp Gateway Yes (Native OpenWA / QR) External Bridge Paid Add-on
ACID Inventory Grounding SQLite WAL + Excel Sync External DB Needed Proprietary Store
Zero Per-Message Fees Yes Yes No

Architecture & Component Topology

+----------------------------------------------------------------------------------+
|                    M.A.R.K.E.T v4.0.2 Enterprise Core Topology                   |
+--------------------------+-------------------------------------------------------+
| User Interface Layer     | Pre-compiled Single Page App served by FastAPI (:8000)|
| Authentication & RBAC    | PBKDF2-HMAC-SHA256 Token Auth with Fine-Grained Perms |
| Concurrency & Isolation  | Per-Session Memory Locking + Async Multi-Worker Queue |
| Customer Support Center  | Exclusive Ticket Claiming + Live Channel Dispatch     |
| CRM Identity Engine      | Immutable Composite UID + Dynamic Account Tiering     |
| Time & Delay Engine      | SQLite WAL Scheduled Trigger Daemon (Periodic Poll)   |
| Meta & Social Gateway    | Meta Graph API v19.0 Publishing + Webhook Ingest      |
| Visual Cards Studio      | Flow Canvas + Qwen 2.5 Coder Synthesizer              |
| Local LLM Core           | llama-server C++ (:8081) / Ollama / Groq / Gemini     |
| Grounding & Storage      | ACID SQLite 3.45+ (WAL Mode) + Excel Synchronizer     |
+--------------------------+-------------------------------------------------------+

Quick Start

1. Prerequisites

  • Python 3.10+ (Python 3.12 recommended)
  • SQLite 3.35+
  • (Optional) Docker & Docker Compose for containerized environments

2. Standalone Launch

# Clone the repository
git clone https://github.com/ielfeqi-rgb/M.A.R.K.E.T.git
cd M.A.R.K.E.T

# Install dependencies
pip install -r requirements.txt

# Start the unified enterprise platform
python3 main.py

3. Access Mission Control


Default Administrative Accounts

Role Username Default Password Target Scope
Executive Admin admin admin123 Full system access, users, settings, and telemetry
Customer Support cs1 cs123 Support Center, chat dispatch, order assistance
IT Systems it_admin it123 Meta hub, scheduler, LLM engines, and diagnostics
Sales Representative sales1 sales123 Catalog management, order tracking, and lead CRM

Unified Platform Modules

Module Functional Scope Route
Operational Telemetry CPU/RAM hardware utilization, LLM health, system event logging / -> Dashboard
Support Center Ticket queue, exclusive handover, canned corporate responses / -> Support Center
User & RBAC Manager Account provisioning, role assignments, functional permissions / -> Users & RBAC
Flow Studio Visual DAG canvas, Qwen 2.5 Coder card compilation / -> Flow Studio
Diagnostic Suite Trace inspection, SQL console, token latency metrics / -> DevTools
Inventory Engine SQLite WAL stock catalog, bidirectional Excel synchronization / -> Inventory
System Settings Meta Graph API/Webhook setup, time scheduler, LLM providers / -> Settings
Operational Guides Standard operating procedures and interactive support assistant / -> Operational Guide

Containerized Production Deployment

Deploy the full stack using Docker Compose:

# Start all services in daemon mode
docker-compose up -d --build

# View real-time container logs
docker-compose logs -f

Repository Structure

M.A.R.K.E.T/
|-- main.py                 # FastAPI core application, routers & standalone static server
|-- database.py             # SQLite WAL storage engine with RBAC, CRM, & Scheduler schemas
|-- auth.py                 # Authentication, PBKDF2 password hashing & RBAC permission matrix
|-- time_scheduler.py       # Asynchronous delay execution daemon & trigger worker
|-- meta_integration.py     # Meta Graph API v19.0 client & Webhook event processor
|-- request_queue.py        # Asynchronous multi-worker request queue with latency profiling
|-- request_validator.py    # Gatekeeper validation filter for inbound payload sanitization
|-- scratch_engine.py       # Visual card-to-code compiler & Python synthesizer
|-- bot_logic.py            # Dialogue management & zero-hallucination SQL grounding
|-- ai_provider.py          # LLM provider manager (Local llama-server, Gemini, Groq)
|-- hardware_detector.py    # Hardware profiling & model tier compatibility detector
|-- llamacpp_manager.py     # Local llama-server lifecycle manager
|-- excel_helper.py         # In-memory spreadsheet parser
|-- plugin_manager.py       # Modular plugin lifecycle & route registry
|-- config.json             # Runtime configuration file
|-- products.xlsx           # Catalog spreadsheet dataset
|-- market_edge.db          # ACID SQLite Write-Ahead Log database
|-- plugins/                # Modular channel adapters & synthesized extensions
|-- docs/                   # Documentation & high-resolution media
|   `-- images/             # Architecture screenshots & workflow diagrams
|-- static/                 # Pre-compiled standalone single-page application assets
|-- Dockerfile              # Production container definition
`-- docker-compose.yml      # Multi-service stack orchestration definition

Community and Star Support

If you find M.A.R.K.E.T valuable for your business or development workflow, please star this repository on GitHub. Star support directly helps maintain continuous development and expands community contributions.

To star the repository:

  1. Navigate to https://github.com/ielfeqi-rgb/M.A.R.K.E.T
  2. Click the Star button in the top right corner.

Open Source Acknowledgments

We gratefully acknowledge the core open-source technologies powering M.A.R.K.E.T v4.0.2:

  • FastAPI by Sebastian Ramirez (@tiangolo) -- High-performance async web framework.
  • Uvicorn by Encode OSS -- Lightning-fast ASGI web server.
  • Qwen Models by Alibaba Cloud / Qwen Team -- Foundation models for code synthesis and natural reasoning.
  • llama.cpp by Georgi Gerganov -- High-efficiency local inference in C/C++.
  • OpenWA / WPPConnect -- Headless WhatsApp Web automation gateway.
  • SQLite by D. Richard Hipp -- ACID Write-Ahead Logging database engine.
  • Lucide -- UI iconography.
  • Tailwind CSS by Tailwind Labs -- Utility-first styling framework.

License

This project is released under the PolyForm NonCommercial License 1.0.0 (CC BY-NC-SA 4.0).
Free for personal, educational, and open-source non-commercial use.

About

Visual Card-Based Workflow & Autonomous AI Agent Studio for E-Commerce. Powered by Local LLMs (Qwen 2.5 / Ollama), FastAPI & WhatsApp Automation.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages