1. Architecture
Domain Tool
  • Tổng quan
  • Business | Logic
    • Admin Business Logic
    • Worker & Automation Business
    • Integration & Reliability Business
    • API INTERFACE & TASK MANAGEMENT
    • SYSTEM BUSINESS OVERVIEW
  • Project
    • ADMIN
      • Tổng quan
      • Architecture
        • Database Schema
        • System Architecture
        • Code Structure
      • Deployment
        • Local
        • Staging
        • Product
      • Hướng dẫn sử dụng
        • Tổng quan
        • Đăng nhập
        • Kiểm tra tự động
        • Kiểm tra thủ công
        • Xếp hạng thủ công
        • Xác nhận kiểm tra
        • Xếp hạng tự động
        • Quản lý từ khóa xếp hạng
        • Kiểm tra whitelist
        • Quản lý từ khóa
        • Truy vết tên miền
        • Quản lý volume từ khóa
        • Kiểm tra domain sở hữu
        • Lịch sử check domain
        • Kiểm tra và view source
        • Kiểm tra thương hiệu tên miền
        • Quản lý người dùng
        • Server
    • API
      • Tổng quan
      • Architecture
        • Database Schema
        • System Architecture
        • Code Structure
      • Deployment
        • Staging
        • Product
        • Local
      • API Interface
        • Public API
          • Xác thực
            • login
            • refresh token
          • Thông tin đăng nhập
            • get current user
            • changePasswordUser
          • Quản lý người dùng
            • getUserList
            • createUser
            • getUserItem
            • updateUser
            • deleteUser
            • updateActive
            • Update FCM Token
          • Quản lý từ khóa
            • Get list of Keywords
            • createKeyword
            • getKeywordItem
            • updateKeyword
            • deleteKeyword
            • deleteKeyword
            • totalKeywordBranchGroup
          • Quản lý Proxy
            • Get all Proxies
            • createProxy
            • getProxyItem
            • updateProxy
            • deleteProxy
            • getActiveProxyList
          • Branch
            • getBranchList
            • createBranch
            • getBranchItem
            • updateBranch
            • deleteBranch
          • Check Brand Domain Histories
            • Get list of Check Brand Domain Histories
            • export Check Brand Domain Histories Data
            • checkBrandDomainHistoriesCopy
            • Import data from Excel
            • exportSampleImportFile
          • Check Confirm
            • List Check Confirms
            • Create Check Confirm
            • Bulk create Check Confirms
            • Show Check Confirm
            • Approve or update confirm detail
            • Delete Check Confirm
            • Approve Check Confirm
            • Approve or Reject Check Confirm
            • List approvers
          • Check Owned Domain
            • Check owned domain
          • Check View Source
            • List current user's check view source histories
            • Check view source for domains
            • Delete all histories of current user
          • Tên Miền Công Ty
            • Get a list of company domains
            • Create a new company domain
            • Get a specific company domain
            • Update a specific company domain with tags
            • Delete a specific company domain
            • Import Whitelist Domains from Excel
            • deleteBulkWhitelistDomain
            • Delete company domains by tag ID
          • Xuất dữ liệu excel
            • Export company domains
            • autoCheckDomainRdrExport
            • exportExcelHistoryCheck
            • exportExcelHistoryRecord
            • autoCheckHistoryDomainRecordExport
            • AutoCheckHistoryDomainCheckExport
            • export Keyword Data
            • autoCheckKeywordExport
            • exportKeywordVolumes
            • exportTrackingDomain
            • exportExcelManualRankingKeywordHistory
            • exportExcelManualSessionHistoryCheck
            • exportExcelRankingDomainHistory
            • exportCompareProxies
            • export Ranking Keyword Data
            • autoCheckRankingKeywordExport
            • exportSampleImportFile
            • exportExcelRankingKeywordHistory
            • exportExcelRankingHistory
            • exportExcelDomainRankingHistory
            • exportExcelWhiteListDomainBlock
            • WhitelistBlockExportSampleImportFile
            • exportSampleImportFile
            • ExportWhitelistByTag
          • Copy
            • Copy company domains
            • autoCheckDomainRdrCopy
            • autoCheckHistoryDomainRecordCopy
            • autoCheckHistoryDomainCheckCopy
            • autoCheckKeywordCopy
            • copyKeywordVolumes
            • copyTrackingDomain
            • copyManualRankingKeywordHistory
            • copySessionHistory
            • copySessionHistory
            • manualUploadFileCopy
            • copyRankingDomainHistory
            • autoCheckRankingKeywordCopy
            • copyRankingKeywordHistory
            • copyRankingHistory
            • copyWhiteListDomainBlock
            • copyWhitelistByTag
          • Nhà cung cấp proxy
            • getDataUsageHistory
            • getProxyProviderList
            • createProxyProvider
            • getProxyProviderItem
            • updateProxyProvider
            • deleteProxyProvider
            • updateSortProxyProvider
            • getProviderProxyCombine
            • createProxyProvider
            • detailProviderProxyCombine
            • updateProxyProvider
            • deleteProviderProxyCombine
          • Quản lý Domain
            • getDomainList
            • createDomain
            • getDomainItem
            • updateDomain
            • deleteDomain
          • Chạy thủ công
            • Run Manual Domain
            • Run Manual Check Domain
            • Run Retry Record Domain
            • Run Retry check Domain
            • Run Manual Domain By Type
            • Run Manual Keyword
          • Domain Check Redirect
            • createDomainCheckRDR
            • getDomainCheckRDRItem
            • updateDomainCheckRDR
            • deleteDomainCheckRDR
            • createHistoryDomainCheck
            • updateHistoryDomainCheck
            • deleteHistoryDomainCheck
            • getListWebByKeyword
            • getListAppByKeyword
            • getListAdsByKeyword
            • getDomainCheckRDRList
          • Quản lý summary
            • Get Domain Wiki Statistics
            • Get Domain Wiki Details
            • Export Domain Wiki Data
            • Copy Domain Wiki List
            • Get Domain Wiki Chart Data
            • Get Summaries
            • Get Auto Summaries
            • Get ranking Summaries
          • External API
            • Create external record domain task
          • Flow
            • stop current flow search domain
            • start current flow search domain
            • get metric flow
            • Get domain RDR processing metrics
            • Get keyword processing metrics
            • Get status auto
          • Group
            • getGroupList
            • createGroup
            • getGroupItem
            • updateGroup
            • deleteGroup
          • Lấy lịch sử check domain
            • getHistoryDomainCheckList
            • getHistoryDomainRecordList
            • getHistoryDomainCheckItem
            • getHistoryDomainRecordItem
            • getHistoryDomainChart
            • getHistoryDomainRecordListV2
          • Ranking Keyword
            • setTimeToRunAutoKeyword
            • postRankingDomainHistory
            • compareProxiesDomainHistory
            • compareProxiesDomainHistoryCopy
            • getChartRankingDomainHistory
            • restartRankingDomainHistory
            • Get list of Ranking Keywords
            • createRankingKeyword
            • getRankingKeywordItem
            • updateRankingKeyword
            • deleteRankingKeyword
            • deleteRankingKeyword
            • totalRankingKeywordBranchGroup
            • Get keyword ranking metric
            • retryRankingKeyword
            • Update Order
            • Import data from Excel
            • Update Order by filter
            • deleteAllRankingKeyword
            • getRankingKeywordHistory
            • setTimeToRunAutoRanking
            • getTimeRunAutoRanking
            • Get ranking group list
          • Quản lý Keyword volume
            • 8ceaf215c302596b08d25b1e12e7ab45
            • Get maximum search volume
          • Quản lý Activities
            • getLogs
            • getLogs
            • trackingDomain
          • Manual Ranking Keyword
            • Get manual ranking keyword histories
            • Get manual ranking keyword history metric
            • GetJsonFileRanking
            • Get ranking group list
          • Quản lý Manual
            • Get list of Manual session domain
            • create manual session domain
            • Get Manual session domain
            • Update list manual session history by manual_sessions_id
            • deleteSession
            • Get list session history
            • Update manual session history by id
            • deleteSessionHistory
            • Get process of Process Manual session domain
            • Get session histories
            • Get statistics session history records
            • Get detailed session history records
            • Get Manual upload files
            • Create Manual upload files
            • Delete Manual upload files
            • deleteBulkManualUploadFiles
          • Ranking Branch
            • getRankingBranchList
            • createRankingBranch
            • getRankingBranchItem
            • updateRankingBranch
            • deleteRankingBranch
          • Ranking Group
            • getRankingGroupList
            • createRankingGroup
            • detailRankingGroup
            • updateRankingGroup
            • deleteRankingGroup
          • Reported Domains
            • getReportedDomainList
            • createReportedDomain
            • getReportedDomainItem
            • updateReportedDomain
            • deleteReportedDomain
            • deleteReportedDomain
            • deleteBulkReportedDomain
          • SearchEngine
            • getSearchEngineList
            • createSearchEngine
            • getSearchEngineItem
            • updateSearchEngine
            • deleteSearchEngine
          • Quản lý cụm Server
            • getServerList
            • createServer
            • getServerItem
            • updateServer
            • deleteServer
          • Statistics
            • getStatistics
          • Tag
            • getTagList
            • createTag
            • getTagItem
            • updateTag
            • deleteTag
            • deleteBulkTag
          • Webhook
            • Execute updateAfterRecordDomain action
            • Execute updateAfterRecordDomain action
            • Execute updateAfterRecordDomain action
            • Handle check confirm capture webhook
            • Execute updateAfterRecordDomain action
            • Execute externalRecordDomainSuccess action
            • Execute updateAfterRecordDomain action
            • Execute updateAfterRecordDomain action
            • Execute updateAfterCheckRankingDomain action
            • Execute updateDomainSearchRanking action
            • Execute updateDomainSearchRankingManual action
          • Quản lý whitelist domain block từ hệ thống
            • getWhiteListDomainBlockApiList
            • createWhiteListDomainBlockApi
            • getWhiteListDomainBlockApiItem
            • updateWhiteListDomainBlockApi
            • deleteWhiteListDomainBlockApi
            • deleteBulkWhiteListDomainBlockApi
          • Quản lý whitelist domain
            • getWhitelistDomainList
            • createWhitelistDomain
            • getWhitelistDomainList
            • getWhitelistDomainItem
            • updateWhitelistDomain
            • deleteWhitelistDomain
            • deleteWhitelistDomain
            • Import Whitelist Domains from Excel
            • deleteBulkWhitelistDomain
    • Tool Check
      • Tổng quan
      • Architecture
        • Database Schema
        • System Architecture
        • Code Structure
      • Deployment
        • Local
        • Staging
        • Product
      • API Interface
        • Public API
          • Public API
    • Tool Record
      • Tổng quan
      • Architecture
        • Database Schema
        • System Architecture
        • Code Structure
      • Deployment
        • Local
        • Staging
        • Product
      • API Interface
        • Public API
          • Task System
            • Get All Tasks
            • Create Task (List)
            • Create Task (Single)
            • Update Task
            • Delete Tasks
            • Count Processing Tasks
            • Get System Logs
            • Send single Task to Webhook
            • Send multiple Tasks to Webhooks
          • System Info
            • Root Details
            • Health Check
  1. Architecture

System Architecture

System Architecture (Kiến Trúc Hệ Thống)#

Dự án áp dụng mô hình Decoupled Architecture (Kiến trúc phân tách) kết hợp với API-First Approach. Mô hình này phân chia rạch ròi giữa phân hệ giao diện người dùng (Presentation Layer - FE) và phân hệ xử lý nghiệp vụ (Business Logic Layer - BE), giúp hệ thống dễ dàng mở rộng, bảo trì và tích hợp đa nền tảng trong tương lai.

Workflow & Data Flow (Luồng Xử Lý Dữ Liệu Tổng Quan)#

Dưới đây là vòng đời tiêu chuẩn của một luồng request đi qua hệ thống, từ lúc người dùng thao tác đến khi dữ liệu được trả về hoặc xử lý ngầm:

1. Frontend Request (Presentation Layer)#

Công nghệ: Vue 3 SPA (Single Page Application).
Luồng xử lý: Khi người dùng tương tác trên giao diện trình duyệt, thư viện Axios sẽ tự động đệm JWT Token (lấy từ bộ nhớ cục bộ) vào HTTP Header và gửi một HTTP Request chuẩn RESTful tới Server API.

2. Backend Authentication (Security Layer)#

Công nghệ: Laravel Middleware kết hợp tymon/jwt-auth và spatie/laravel-permission.
Luồng xử lý: API Gateway tiếp nhận Request. Middleware lập tức giải mã Token để xác thực danh tính (Authentication) và kiểm tra phân quyền (Authorization). Nếu hợp lệ, Request mới được đi tiếp vào lõi hệ thống; nếu không, trả về ngay lỗi 401 Unauthorized hoặc 403 Forbidden.

3. Control Flow (Business Logic Layer)#

Công nghệ: PHP / Laravel 10 (Repository Pattern) & MySQL.
Luồng xử lý: Request vượt qua Auth sẽ đi đến Controllers. Tại đây, Controller gọi các Repositories để truy vấn dữ liệu qua ORM (Eloquent) từ MySQL.
Phản hồi tức thời: Đối với các hành động mang tính chất đồng bộ (Synchronous) như Lấy danh sách, Cập nhật thông tin cơ bản, hệ thống sẽ trả về JSON Response ngay lập tức cho Frontend.

4. Queue Worker & Schedule (Asynchronous / Background Tasks)#

Công nghệ: Redis MQ & Laravel Horizon Worker.
Luồng xử lý: * Các tác vụ tiêu tốn nhiều tài nguyên hoặc thời gian chờ dài (ví dụ: Load Volume search, Send Email báo cáo, Crawl/Tracking Keywords Rank) sẽ không được xử lý đồng bộ để tránh chặn (block) Timeout của HTTP Request.
Thay vào đó, Controller đóng gói dữ liệu thành các Job và đẩy vào hàng đợi Redis MQ.
Các Worker (quản lý bởi Horizon) sẽ chạy độc lập dưới nền (Background) để lấy Job ra xử lý lần lượt.

5. Third-Party Integrations (Tích hợp Dịch vụ Bên ngoài)#

Hệ thống giao tiếp với các nền tảng bên thứ ba để mở rộng tính năng:
Firebase: Quản lý Push Notification và tracking luồng xác thực (Auth tracking).
Telebot: Bắn cảnh báo lỗi hệ thống (Alerts) và gửi các báo cáo Wiki tự động qua Telegram.
External APIs: Sử dụng Guzzle HTTP Client để bắn truy vấn đến các Engine check ngoài (Google Search API, Bing, v.v.) để lấy dữ liệu Ranking.

6. Logging & Analytics (Lưu vết & Phân tích)#

Công nghệ: Elasticsearch.
Luồng xử lý: Thay vì ghi đè liên tục các log vào DB quan hệ gây chậm hệ thống, hệ thống sử dụng Elasticsearch như một kho lưu trữ Session Log tốc độ cực cao. Dữ liệu này sau đó được Frontend gọi API để render ra các biểu đồ đồ thị (Dashboard) phục vụ việc phân tích thời gian thực.
Modified at 2026-03-27 08:44:06
Previous
Database Schema
Next
Code Structure
Built with