# webcon-bps/develop-docs architecture

> Architecture diagram of the GitHub repository webcon-bps/develop-docs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/webcon-bps/develop-docs
- Repository: https://github.com/webcon-bps/develop-docs

## Overview

##### Project Type and Purpose
- This repository is a collection of example SDK extensions for WebCon, divided into three separate solution projects: QuickStart (basic examples), Examples (intermediate examples), and AdvancedExamples (integration scenarios).
- The project demonstrates different extension capabilities, such as custom actions, custom authentications, and form field extensions (including both back-end C# logic and front-end JavaScript components for the PhoneNumber example).

##### Analyzing the File Structure
- Top-level directories include a hidden .github folder (with workflow definitions for CI/CD) and a major directory named “WebCon.BpsExt.Examples” that contains all the sample projects.
- WebCon.BpsExt.QuickStart
- WebCon.BpsExt.Examples
- WebCon.BpsExt.AdvancedExamples
- Each of these projects has subdirectories for “CustomActions”, “CustomAuthentications”, “FormFieldExtensions”, as well as properties and configuration files.
- The AdvancedExamples include examples that integrate with front-end (e.g., PhoneNumberJS) along with back-end extension logic, indicating a mix of technologies (C# for server-side and JavaScript for client-side).

##### Extracting Architectural Details from README
- The README clarifies that these packages provide examples of SDK extensions, categorizing them by complexity level. This categorization is important for describing the modular structure and potential integration points with WebCon’s main system.
- There is a clear separation of concerns among the three projects, each serving a specific audience from beginners to advanced integrators.

- Container the Solution Projects:
- CustomActions: Module(s) handling custom business processes triggered by events (include components for each type, such as CopyAttachment, SetItemList, StartNewDocument).
- CustomAuthentications: Module(s) demonstrating authentication extensions (e.g., DatabaseAuthentication, RestAuthentication).
- FormFieldExtensions: Module(s) focused on extending form fields. For example, the PhoneNumber extension shows both the back-end logic (C# classes like PhoneNumberLogic and configuration) and the front-end implementation (PhoneNumberJS with React or similar structure components like PhoneNumber.js, CSS, etc.).
- Additional Components:
- CI/CD Pipeline: From the .github/workflows folder, indicate the existence of automated build/deployment pipelines.
- Shared Components and Configurations: Represent properties files (AssemblyInfo.cs) and common configuration files (e.g., temporary_key.snk, project JSON files) that are reused by different modules.

##### Relationships and Interactions
- For each example extension, show how the configuration (e.g., *Config.cs files) and logic (e.g., *.cs files) integrate with the underlying WebCon platform.
- For the PhoneNumber extension, show the interaction between the JavaScript front-end component (client-side UI validation, custom control logic) and its server-side counterpart (C# logic).
- Demonstrate dependencies:
- That all examples rely on the underlying WebCon.BpsExt SDK (implied as a common integration point, even if not explicitly in the repository).
- That CI/CD (via GitHub Actions) integrates with the build and deployment process for all solution projects.

##### Architectural Patterns and Design Principles
- Modularization: Clearly show that the project is divided into distinct extension types, each isolated in its own folder/module.
- Separation of Concerns: Emphasize that UI components (front-end) are separated from core business logic (back-end C# code).
- Extensibility: Indicate the plug-in nature of SDK extensions, making it easy to add further custom modules as needed.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top Level CI/CD Pipeline
    ci_pipeline["CI/CD Pipeline"]:::cicd

    %% QuickStart Container
    subgraph "QuickStart"
        QS["Solution: QuickStart"]:::container
        QS --> qs_cds["CustomActions: CustomDataSourceExample"]:::cs
        QS --> qs_sff["FormFieldExtensions: SetFormField"]:::cs
    end

    %% Examples Container
    subgraph "Examples"
        EX["Solution: Examples"]:::container
        EX --> ex_ca_copy["CustomActions: CopyAttachment"]:::cs
        EX --> ex_ca_set["CustomActions: SetItemList"]:::cs
        EX --> ex_ca_start["CustomActions: StartNewDocument"]:::cs
        EX --> ex_auth_db["CustomAuthentications: DatabaseAuthentication"]:::cs
        EX --> ex_auth_rest["CustomAuthentications: RestAuthentication"]:::cs
        EX --> ex_ff_phone["FormFieldExtensions: PhoneNumber"]:::cs
    end

    %% AdvancedExamples Container
    subgraph "AdvancedExamples"
        ADV["Solution: AdvancedExamples"]:::container
        ADV --> adv_ca_update["CustomActions: UpdateMultipleDocumentsOnCycle"]:::cs
        ADV --> adv_ff_backend["FormFieldExtensions: PhoneNumber (Back-end)"]:::cs
        ADV --> adv_ff_frontend["FormFieldExtensions: PhoneNumberJS (Front-end)"]:::js
        adv_ff_backend -->|"triggers"| adv_ff_frontend
    end

    %% Connections from CI/CD Pipeline to each solution container
    ci_pipeline --> QS
    ci_pipeline --> EX
    ci_pipeline --> ADV

    %% Styles
    classDef cs fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef js fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef cicd fill:#FFC0CB,stroke:#333,stroke-width:2px;
    classDef container fill:#D3D3D3,stroke:#333,stroke-width:2px;

    %% Click Events
    click ci_pipeline "https://github.com/webcon-bps/develop-docs/blob/main/.github/workflows/buildPackage.yml"
    click QS "https://github.com/webcon-bps/develop-docs/blob/main/WebCon.BpsExt.Examples/WebCon.BpsExt.QuickStart"
    click EX "https://github.com/webcon-bps/develop-docs/blob/main/WebCon.BpsExt.Examples/WebCon.BpsExt.Examples"
    click ADV "https://github.com/webcon-bps/develop-docs/blob/main/WebCon.BpsExt.Examples/WebCon.BpsExt.AdvancedExamples"
    click qs_cds "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.QuickStart/CustomDataSourceExample"
    click qs_sff "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.QuickStart/SetFormField"
    click ex_ca_copy "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.Examples/CustomActions/CopyAttachment"
    click ex_ca_set "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.Examples/CustomActions/SetItemList"
    click ex_ca_start "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.Examples/CustomActions/StartNewDocument"
    click ex_auth_db "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.Examples/CustomAuthentications/DatabaseAuthentication"
    click ex_auth_rest "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.Examples/CustomAuthentications/RestAuthentication"
    click ex_ff_phone "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.Examples/FormFieldExtensions/PhoneNumber"
    click adv_ca_update "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.AdvancedExamples/CustomActions/UpdateMultipleDocumentsOnCycle"
    click adv_ff_backend "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.AdvancedExamples/FormFieldExtensions/PhoneNumber"
    click adv_ff_frontend "https://github.com/webcon-bps/develop-docs/tree/main/WebCon.BpsExt.Examples/WebCon.BpsExt.AdvancedExamples/FormFieldExtensions/PhoneNumber/PhoneNumberJS"
```
