MCPcopy Index your code
hub / github.com/babyvibe/deplao-builder

github.com/babyvibe/deplao-builder @v26.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v26.7.0 ↗ · + Follow
4,146 symbols 12,351 edges 337 files 816 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Deplao

Website giới thiệu: https://deplaoapp.com/

🌐 Language:  🇻🇳 Tiếng Việt  |  🇬🇧 English


Phần mềm desktop quản lý Zalo & Facebook cá nhân Đa tài khoản tích hợp CRM, ERP, POS, Workflow và AI Assistant giúp đội nhóm bán hàng, chăm sóc khách hàng và marketing trên Zalo và Facebook vận hành tập trung trong một ứng dụng duy nhất.

Version Platform Electron React TypeScript SQLite Vite Node.js License Support

📥 Tải xuống  |  🛠️ Công nghệ  |  📦 Cài đặt  |  ✨ Tính năng  |  🔒 Bảo mật  |  📝 MIT  |  📞 Liên hệ


⬇️ Tải xuống

Download Windows Deplao-Setup-26.7.0.exe Download macOS Apple Silicon Deplao-26.7.0-arm64.dmg
Download Ubuntu Deplao-26.7.0.AppImage chạy mọi distro - chmod +x là dùng được Download macOS Intel Deplao-26.7.0.dmg

👉 Xem tất cả phiên bản

⚠️ Lưu ý khi mở file cài đặt (bị chặn bởi Windows / macOS / Linux)

Do Deplao chưa được ký chứng chỉ (code signing) - nói thẳng ra là nghèo, nên hệ điều hành có thể hiển thị cảnh báo khi mở file. Bạn có thể làm theo hướng dẫn dưới đây:


🪟 Windows (.exe)

Khi mở file .exe, Windows có thể hiển thị cảnh báo "Windows protected your PC":

👉 Cách xử lý: 1. Nhấn More info 2. Chọn Run anyway


🍎 macOS (.dmg)

Khi mở file .dmg, macOS có thể báo "cannot be opened because it is from an unidentified developer"

👉 Cách xử lý:

Cách 1: - Chuột phải vào file → chọn Open - Nhấn Open lần nữa

Cách 2 (nếu vẫn bị chặn): 1. Vào System Settings → Privacy & Security 2. Kéo xuống phần Security 3. Nhấn Open Anyway


🐧 Ubuntu Linux (.AppImage)

Sau khi tải file .AppImage:

chmod +x Deplao-*.AppImage
./Deplao-*.AppImage

Nếu gặp lỗi "FUSE: fuse2 not available", cài libfuse2: bash sudo apt install libfuse2

Hoặc cài bản .deb:

sudo dpkg -i Deplao_*_amd64.deb

Sơ đồ trực quan mô tả Deplao là workspace desktop tập trung cho bán hàng và chăm sóc khách hàng trên Zalo

🛠️ Công nghệ & ngôn ngữ sử dụng

Deplao hiện được xây dựng trên các công nghệ chính sau:

  • Thư viện chính: zca-js & fbchat-v2
  • AI Gateway: 9router
  • Ngôn ngữ: TypeScript, JavaScript, SQL, HTML, CSS
  • Ứng dụng desktop: Electron, React, Vite
  • Giao diện: Tailwind CSS, PostCSS, React Router
  • Lưu trữ dữ liệu cục bộ: SQLite qua better-sqlite3
  • State & UI chuyên biệt: Zustand, React Flow, Recharts, Quill
  • Backend dịch vụ: Node.js + Express
  • Tích hợp & automation: Axios, Google APIs / Google Sheets, node-cron, Discord.js, Telegram Bot API, OpenAI API, v.v.

Cài đặt

🛠️ Tự build từ source

Yêu cầu

  • Windows 10/11, macOS (Apple Silicon), hoặc Ubuntu 20.04+
  • Node.js 18+ khuyến nghị
  • npm 9+

Cài đặt

npm install --legacy-peer-deps

Chạy development

npm run dev

Build app

npm run production

Dữ liệu cục bộ

  • Dữ liệu app dùng SQLite cục bộ
  • Có thể đổi thư mục lưu trữ trong phần Cài đặt

🗺️ Sơ đồ kiến trúc & luồng hoạt động


1️⃣ Luồng Build

flowchart LR
    subgraph SRC["📁 Source Code"]
        E("⚡ electron/\n*.ts")
        S("🔧 services/\n*.ts")
        R("🎨 src/ui/\n*.tsx")
    end

    subgraph COMPILE["🔨 Compile"]
        TSC("tsc\ntsconfig.electron")
        VITE("vite build\n+ Tailwind CSS")
    end

    subgraph OUT["📦 Output"]
        DE("dist-electron/\nmain · services · ipc")
        D("dist/\nindex.html · assets")
    end

    subgraph PKG["🚀 Đóng gói"]
        EB(("electron\nbuilder"))
        WIN("🪟 Windows\n.exe / dir")
        MAC("🍎 macOS\n.dmg arm64")
        LIN("🐧 Linux\n.AppImage · .deb")
    end

    E & S --> TSC --> DE
    R --> VITE --> D
    DE & D --> EB --> WIN & MAC & LIN

2️⃣ Kiến trúc Runtime

mindmap
  root((🖥️ Deplao))
    ⚙️ Main Process
      📡 IPC Handlers
        login · zalo · crm
        workflow · erp · sync
        facebook · relay · file
      🔧 Services
        DatabaseService
        WorkspaceManager
        WorkflowEngine
        CRMQueueService
        HttpConnectionManager
        FileStorageService
        AIAssistantService
    🎨 Renderer
      ⚛️ React Pages
        Dashboard
        Chat & Inbox
        CRM & Campaign
        Workflow Editor
        POS & Tích hợp
        ERP · Settings
      🗃️ Zustand State
        accountStore
        chatStore
        workspaceStore
        employeeStore
    📱 Giao thức Zalo
      zca-js
        QR Login
        Cookie Session
        WebSocket realtime
    🌐 External APIs
      OpenAI · Google Sheets
      Telegram · Discord
      KiotViet · Haravan · Sapo
      GHN · GHTK

3️⃣ Mô hình Boss ↔ Nhân viên (REST API)

flowchart TB
    subgraph BOSS["🖥️ Máy BOSS - Local Workspace"]
        BZ("📱 Zalo / FB\nAccounts")
        BSV("🔧 Services\nCRM · ERP · AI · Workflow · Library")
        BSD[("🗄️ SQLite DB\n+ Media Files")]
        BRL("🔁 Relay Server\nHTTP REST + Socket.IO :9900")
        BRS("📡 REST API Handlers\n/api/query | /api/command\n/api/library | /api/media")
    end

    subgraph NET["🌐 Kết nối"]
        LAN("🏠 LAN\n192.168.x.x:9900")
        WAN("🌍 Tunnel / VPN\ntruy cập từ xa")
    end

    subgraph EMP["💻 Nhân Viên - Remote Workspace"]
        EA("📲 Deplao App\nEmployee Mode")
        DA("🔀 DataAccessor\ntự động routing")
        RQ("🌐 RestQueryService\nHTTP REST client")
        EP("🔐 Permission Filter\nerp · crm · workflow · ...")
        EU("👁️ UI\nchỉ thấy TK được gán")
        MC("📦 Media Cache\nworkspace → Boss → CDN")
        EC("⚡ Employee Cache\nconversations · messages · labels")
    end

    BZ --> BSV
    BSV <--> BSD
    BSV --> BRL
    BRL --> BRS
    BRL <-->|HTTP REST + Socket.IO| LAN & WAN
    LAN <-->|HTTP fetch| RQ
    WAN <-->|HTTP fetch| RQ
    RQ -->|/api/query · /api/command| BRS
    RQ -->|/api/media| MC
    RQ -->|/api/library| BSV
    EA --> DA -->|boss mode → IPC| EU
    DA -->|employee → REST| RQ
    EA --> EP --> EU
    EA --> EC
    EA --> MC

Kiến trúc mới từ v26.7.0: Employee gọi dữ liệu qua REST API (HTTP fetch → Boss) thay vì sync toàn bộ DB như trước. DataAccessor tự động routing: standalone/boss → IPC trực tiếp, employee → RestQueryService → Boss. Socket.IO thay SSE cho realtime event ổn định hơn. Media được cache local với cascade workspace → Boss → CDN. Employee vẫn có workspace riêng, nhưng không cần sync hàng GB khi vào app.


4️⃣ Đa tài khoản & Lưu trữ

flowchart LR
    subgraph ACCS["👤 Tài khoản"]
        Z1("Zalo #1\nzca-js")
        Z2("Zalo #2\nzca-js")
        ZN("Zalo #N\nzca-js")
        FB("Facebook\nGraph API")
    end

    subgraph STORE["💾 Lưu trữ cục bộ"]
        DB[("🗄️ SQLite\ndeplao-tool.db\nmessages · contacts\ncrm · workflow · erp")]
        MED("📁 FileStorage\n~/media/\nảnh · video · file")
        ES("🔑 electron-store\ncookies · tokens\nsettings")
    end

    subgraph WS["🗂️ Workspace Manager"]
        WA("🏠 Local WS\nDefault")
        WB("🌐 Remote WS\nBoss")
        WC("⚙️ Custom WS\npath tuỳ chỉnh")
    end

    Z1 & Z2 & ZN & FB -->|"tin nhắn · danh bạ"| DB
    Z1 & Z2 & ZN & FB -->|"ảnh · video · file"| MED
    ES -->|"cookie session"| Z1 & Z2 & ZN
    DB & ES <-->|"path resolve\nswitch workspace"| WS
    WA & WB & WC -.-|"mỗi WS = DB riêng"| DB

Mỗi Workspace có DB + media folder độc lập - đổi hoặc di chuyển sang ổ đĩa khác không mất dữ liệu.


🚀 Deplao là gì?

Nếu nhìn nhanh, có thể hiểu Deplao là:

  • trung tâm vận hành Zalo: nhiều tài khoản, inbox tập trung, trả lời nhanh
  • lớp quản lý khách hàng: CRM, nhãn, lịch sử tương tác, campaign
  • lớp tự động hóa: workflow, AI, trigger và action chạy nền
  • lớp kết nối kinh doanh: POS, vận chuyển, API và công cụ ngoài
  • lớp quản trị nội bộ: báo cáo, ERP, phân quyền, workspace nhân viên

✨ Điểm nổi bật

  • 👤 Đa tài khoản Zalo - đăng nhập không giới hạn tài khoản, chuyển đổi qua lại nhanh
  • 💬 Hộp thư tập trung - chế độ gộp tài khoản giúp gom và xử lý hội thoại từ nhiều tài khoản trong một giao diện duy nhất
  • 👥 CRM & Campaign - quản lý liên hệ, nhãn, ghi chú nội bộ, chăm sóc khách cũ. Quét thành viên nhóm ẩn, nhóm chưa tham gia để tìm khách mới.
  • ⚙️ Workflow tự động hóa - kéo-thả Trigger → Node → Action hoặc dùng AI tạo quy trình, chạy nền 24/7 không cần code
  • 🤖 AI Assistant - hỗ trợ gợi ý câu trả lời, chat trực tiếp trong hội thoại. Còn giúp phân loại tin nhắn, trả lời khách hàng 24/7.
  • 🔗 Tích hợp ngoài - POS, vận chuyển, thanh toán, Google Sheets, Telegram, Discord, Email, HTTP Request... Kết hợp sử dụng khi chat hoặc workflow
  • 📈 Báo cáo & phân tích - theo dõi tin nhắn, liên hệ, nhãn, nhân viên, chiến dịch, workflow, AI.
  • 🗂️ ERP nội bộ - task, lịch làm việc, notes và phối hợp vận hành nội bộ ngay trong cùng hệ thống
  • 🧑‍💼 Workspace boss ↔ nhân viên - kết nối qua LAN hoặc WAN (Cloudflare Tunnel), phân quyền chi tiết và theo dõi hiệu suất từng nhân viên
  • 🔒 Proxy per-account - gán Proxy riêng cho từng tài khoản Zalo trước khi đăng nhập
  • 🔐 Dữ liệu lưu cục bộ - ưu tiên quyền kiểm soát dữ liệu và bảo mật trên máy người dùng

Xem nhanh giao diện Deplao

Các màn hình dưới đây được sắp theo luồng sử dụng thực tế: từ dashboard → chat → CRM → workflow → POS / báo cáo / ERP.

Dashboard quản lý đa tài khoản Zalo trong Deplao Dashboard đa tài khoản Giao diện chat tập trung trong Deplao Chat tập trung tích hợp AI gợi ý trả lời Màn hình CRM và quản lý liên hệ trong Deplao CRM & liên hệ
Quét thành viên nhóm Zalo trong Deplao Quét thành viên nhóm Chiến dịch gửi tin hàng loạt trong Deplao Chiến dịch gửi tin hàng loạt Trình thiết kế workflow kéo thả trong Deplao Workflow editor
Chi tiết cấu hình workflow trong Deplao Chi tiết workflow Workflow kết hợp AI trong Deplao Ra lệnh tạo Workflow bằng AI Tích hợp POS và bán hàng trong Deplao Tích hợp POS, VC, Thanh toán

Extension points exported contracts — how you extend this code

ContactCardSuggestion (Interface)
Contact card suggestion state - dùng khi detect SĐT 0xx trong input
src/ui/components/chat/MessageInput.tsx
ErpHandlerResult (Interface)
(no doc)
electron/ipc/erpIpcMiddleware.ts
ChannelCapability (Interface)
(no doc)
src/configs/channelConfig.ts
AIStructuredSegment (Interface)
(no doc)
src/utils/aiUtils.ts
ConversationsCache (Interface)
(no doc)
src/services/cache/EmployeeCache.ts
AIAssistant (Interface)
(no doc)
src/models/ai.ts
DownloadDropdownProps (Interface)
(no doc)
landing/src/components/DownloadDropdown.tsx
DateInputVNProps (Interface)
* DateInputVN - wrapper cho input[type="date"] và input[type="datetime-local"]. * - Thêm lang="vi-VN" để Chromium hiển
src/ui/components/common/DateInputVN.tsx

Core symbols most depended-on inside this repo

log
called by 650
src/utils/Logger.ts
push
called by 509
src/services/socket/EventBuffer.ts
getInstance
called by 417
src/utils/Logger.ts
warn
called by 409
src/utils/Logger.ts
error
called by 381
src/utils/Logger.ts
run
called by 302
src/services/database/DatabaseService.ts
query
called by 241
src/services/database/DatabaseService.ts
set
called by 216
src/ui/components/settings/ProxySettings.tsx

Shape

Function 2,046
Method 1,505
Interface 426
Class 111
Struct 55
TypeAlias 2
Enum 1

Languages

TypeScript95%
Go5%

Modules by API surface

src/services/database/DatabaseService.ts257 symbols
src/ui/lib/data/DataAccessor.ts138 symbols
src/ui/components/chat/ChatWindow.tsx133 symbols
src/services/zalo/ZaloService.ts109 symbols
src/services/facebook/FacebookService.ts98 symbols
src/services/http/handlers/RestApiHandlers.ts79 symbols
src/ui/components/chat/MessageInput.tsx62 symbols
src/bridge-e2ee/bridge/store.go61 symbols
src/services/facebook/FacebookScanService.ts55 symbols
src/bridge-e2ee/bridge/media.go53 symbols
src/ui/components/chat/MessageBubbles.tsx52 symbols
src/bridge-e2ee/bridge/events.go48 symbols

For agents

$ claude mcp add deplao-builder \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page