How friggframework/frigg works
Main Components
• Core Framework Layer: Represent the “core” package, which includes utilities such as assertions, integration routing, error handling, logging, encryption, database connectors, and lambda functionality. This is the backbone of the framework.
• Module Plugin & Integration Layer: Include the “module-plugin” folders in the “packages/core” area that allow developers to load, manage, and interact with integrations. These provide abstractions for different external APIs.
• API Modules: Show the separate API modules and module lists (both under “docs/api-modules” and “api-module-library”) that define configurations and supported methods for various third-party integrations (e.g., Hubspot, Salesforce, ConnectWise, etc.).
• Dev Tools & CLI: Represent the “devtools” package and its CLI (frigg-cli) that streamline creation, testing, and deployment of integrations.
• User Interface: Represent the “ui” package that contains front-end components (React components, integration UI components, etc.) which facilitate configuration and interactive aspects.
• Documentation & Community Support: Although not directly part of the runtime architecture, include a note regarding the comprehensive docs (in “docs”) which support and explain the design, module configuration rules, and integration concepts.
• External Services & Serverless Infrastructure: Highlight the framework’s design for serverless deployment (via lambda functions and infrastructure-as-code approaches) and mention that this layer interacts with external APIs provided by partner services.
Out the Interactions and Relationships
• How the Core Layer is the central hub that ties together lower-level integrations (via the integration router, module factory, and sync components).
• Flow of data from incoming requests, through authentication and error handling (using the errors and assertions components), to database operations and logging.
• Optionally, demonstrate how lambda functions encapsulate business logic and scale via a serverless model.
• Integration-specific flows where each integration (for example, hubspot, salesforce, etc.) is implemented as a plugin that gets registered with a routing/system integration manager from the core.
Architectural Patterns and Design Principles
• Modular / Plugin Architecture: Stress that different integrations are built as discrete modules that register with the core system.
• Separation of Concerns: Clearly separate the integration logic (API modules), core functionality (database, logging, error handling, lambda execution), and user-facing interactions (CLI and UI).
• Reusability: Show that core functionalities like encryption, assertions, and error handling are abstracted and leveraged by all integration modules.
• Extensibility: Note that the design allows for adding new third-party integrations with minimal friction due to a shared interface and consistent configuration patterns.