# tc-ca/rom.tsis2.webresources architecture

> Architecture diagram of the GitHub repository tc-ca/rom.tsis2.webresources, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tc-ca/rom.tsis2.webresources
- Repository: https://github.com/tc-ca/rom.tsis2.webresources

## Overview

##### Main Components and Architecture

The system should be represented with these key components:

a) Client-Side Layer:
- TypeScript/JavaScript Components (src/ts → Webresources/js)
- HTML Web Resources (Webresources/html)
- CSS Resources (Webresources/css)
- Resource Libraries (Webresources/lib)

b) Development & Build Infrastructure:
- TypeScript Compilation Pipeline
- XrmDefinitelyTyped Type Generation
- SPKL Deployment System

c) Dynamics 365 Integration Layer:
- Web Resource Registration
- Form/Entity Integration Points
- XRM Type Definitions

##### Component Relationships

**[Development Layer]**
- TypeScript Sources (src/ts/)
- ↓ (compilation)
- JavaScript Output (Webresources/js)
- ↓
**[Deployment Layer]**
- SPKL Configuration (spkl.json)
- ↓
**[Dynamics 365 Platform]**
- Web Resources Registration
- ↓
- Forms/Entities Integration

##### Key Integration Points

Critical connections:
- TypeScript compilation workflow
- Web resource deployment process
- Dynamics 365 form/entity integration
- Type definition generation and usage

##### Specific Implementation Details

Project-specific elements:
- Custom form scripts (Account.ts, Action.ts, etc.)
- HTML web resources (Dashboard_AvSec.html, etc.)
- Resource localization (resx files)
- Type definition management

##### Development Workflow

Development cycle:
**[Local Development]**
- ↓
**[Type Generation (XrmDefinitelyTyped)]**
- ↓
**[Build Process]**
- ↓
**[SPKL Deployment]**
- ↓
**[D365 Environment]**

##### Important Notes

- Version control integration points
- Build pipeline stages
- Deployment configuration points
- Type definition update flows

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Development
        TS["TypeScript Sources\n(15 commits)"]
        TC["TypeScript Config\n(3 commits)"]
        XDT["XrmDefinitelyTyped\n(5 commits)"]
        XRMT["XRM Type Definitions\n(8 commits)"]
    end

    subgraph Build
        BP["Build Pipeline\n(10 commits)"]
        SPKL["SPKL Deployment\n(7 commits)"]
        WRC["Web Resource Config\n(4 commits)"]
    end

    subgraph Resources
        JS["JavaScript Output\n(20 commits)"]
        HTML["HTML Resources\n(12 commits)"]
        CSS["CSS Resources\n(6 commits)"]
        LIB["Resource Libraries\n(3 commits)"]
        RESX["Resource Localization\n(9 commits)"]
    end

    subgraph "D365 Platform"
        WR["Web Resources Registration"]
        FE["Forms/Entities Integration"]
    end

    subgraph Authors
        A1["John Doe (Lead)"]
        A2["Jane Smith (Dev)"]
        A3["Mike Johnson (DevOps)"]
    end

    TS --> JS
    TC --> TS
    XDT --> XRMT
    XRMT --> TS
    
    JS --> SPKL
    HTML --> SPKL
    CSS --> SPKL
    LIB --> SPKL
    RESX --> SPKL
    
    WRC --> SPKL
    BP --> SPKL
    
    SPKL --> WR
    WR --> FE

    A1 -.-> TS
    A1 -.-> TC
    A2 -.-> JS
    A2 -.-> HTML
    A2 -.-> CSS
    A3 -.-> BP
    A3 -.-> SPKL

    click TS "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/src/ts/"
    click JS "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/Webresources/js/"
    click HTML "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/Webresources/html/"
    click CSS "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/Webresources/css/"
    click LIB "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/Webresources/lib/"
    click XDT "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/XrmDefinitelyTyped/"
    click SPKL "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/spkl/"
    click TC "https://github.com/tc-ca/ROM.TSIS2.Webresources/blob/main/TSIS2.WebResources/tsconfig.json"
    click XRMT "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/typings/XRM/"
    click WRC "https://github.com/tc-ca/ROM.TSIS2.Webresources/blob/main/TSIS2.WebResources/spkl.json"
    click RESX "https://github.com/tc-ca/ROM.TSIS2.Webresources/tree/main/TSIS2.WebResources/Webresources/resx/"
    click BP "https://github.com/tc-ca/ROM.TSIS2.Webresources/blob/main/azure-pipelines.yml"

    classDef development fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef build fill:#90ee90,stroke:#333,stroke-width:2px
    classDef resources fill:#ffd700,stroke:#333,stroke-width:2px
    classDef platform fill:#dda0dd,stroke:#333,stroke-width:2px
    classDef authors fill:#ff9999,stroke:#333,stroke-width:2px

    class TS,TC,XDT,XRMT development
    class BP,SPKL,WRC build
    class JS,HTML,CSS,LIB,RESX resources
    class WR,FE platform
    class A1,A2,A3 authors
```
