workspace "Foxit PDF Cloud API" "This is the C4 model of the Foxit PDF Cloud API system." { model { user = person "User" "A user of the PDF Cloud API who interacts with its services." "User" group "Foxit PDF Cloud API" { pdfCloudAPI = softwaresystem "PDF Cloud API" "Provides PDF-related functionalities via APIs, embedding, and management tools." { pdfEmbedAPI = container "PDF Embed API" "Embeds a PDF viewer in web pages." "JavaScript Library" "Web Browser" pdfServicesAPI = container "PDF Services API" "Provides PDF-related services such as conversion, splitting, and merging." "HTTP API" developerConsole = container "Developer Console" "Manages API keys and monitors usage." "React + Ant Design SPA" "Web Application" pdfApiWebsite = container "PDF API Website" "Showcases features and provides documentation." "Next.js" "Web Application" phpBackend = container "PHP Backend" "Core backend for handling APIs and services." "PHP + Yii Framework" { authentication = component "Authentication" "API key-based authentication for Embed and Services APIs." "PHP Component" pdfServicesEndpoints = component "PDF Services Endpoints" "Endpoints for PDF processing using WebTools." "PHP Component" userAccountManagement = component "User & Account Management" "Handles user accounts and integrates with Foxit CAS." "PHP Component" embedApiEndpoint = component "Embed API Endpoint" "Validates CLIENT_ID and serves assets for the Embed Viewer." "PHP Component" developerConsoleEndpoint = component "Developer Console Endpoint" "Supports Developer Console functionalities." "PHP Component" usageTracking = component "Usage Tracking" "Tracks API usage and writes data to MySQL." "PHP Component" orderBillingManagement = component "Order & Billing Management" "Syncs orders, enforces quotas, and handles billing." "PHP Component" notificationService = component "Notification Service" "Sends emails using SMTP with predefined templates." "PHP Component" } mysqlDatabase = container "MySQL Database" "Stores user, usage, and billing data." "MySQL Database" "Database" cronService = container "Cron Service" "Syncs order data with the Foxit App Store." "PHP Cron Job" } } // External Systems webTools = softwaresystem "WebTools" "Provides PDF processing capabilities for the Services API." "External System" foxitCAS = softwaresystem "Foxit CAS" "Handles user authentication and account management." "External System" foxitAppStore = softwaresystem "Foxit App Store" "Manages user orders and subscriptions." "External System" smtpServer = softwaresystem "SMTP Server" "Used for sending email notifications." "External System" // Relationships user -> pdfEmbedAPI "Views and interacts with embedded PDFs using" user -> pdfServicesAPI "Uses API endpoints for PDF operations" user -> developerConsole "Manages API keys and monitors usage via" user -> pdfApiWebsite "Accesses documentation and product features via" pdfServicesAPI -> webTools "Processes PDF files using" pdfEmbedAPI -> phpBackend "Validates CLIENT_ID via" developerConsole -> phpBackend "Uses backend services via" phpBackend -> mysqlDatabase "Stores and retrieves user, usage, and billing data" phpBackend -> foxitCAS "Authenticates users and manages accounts via" phpBackend -> foxitAppStore "Syncs order data using" phpBackend -> smtpServer "Sends email notifications using" // Relationships to components pdfServicesAPI -> pdfServicesEndpoints "Makes API calls to" pdfEmbedAPI -> embedApiEndpoint "Validates CLIENT_ID via" developerConsole -> developerConsoleEndpoint "Interacts with" usageTracking -> mysqlDatabase "Writes usage data to" orderBillingManagement -> foxitAppStore "Syncs order data with" notificationService -> smtpServer "Sends email notifications using" } views { systemcontext pdfCloudAPI "SystemContext" { include * title "System Context: Foxit PDF Cloud API" description "Contextual view of the Foxit PDF Cloud API system and its relationships." autoLayout } container pdfCloudAPI "Containers" { include * title "Container View: PDF Cloud API" description "Detailed breakdown of the containers in the PDF Cloud API system." autoLayout } component phpBackend "PHPBackendComponents" { include * title "Component View: PHP Backend" description "A detailed view of the components within the PHP Backend container." autoLayout } styles { element "Person" { background #08427b color #ffffff fontSize 22 shape Person } element "Container" { background #438dd5 color #ffffff } element "Software System" { background #1168bd color #ffffff } element "Database" { shape Cylinder } element "External System" { background #999999 color #ffffff } element "Component" { background #85bbf0 color #000000 } } } }