# edificeio/infra-front architecture

> Architecture diagram of the GitHub repository edificeio/infra-front, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/edificeio/infra-front
- Repository: https://github.com/edificeio/infra-front

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Core Framework Layer:
- Angular.js Integration (src/ts/libs/angular)
- Core Services (HTTP, Authentication, Rights Management)
- Theme Engine (src/ts/skin.ts, src/ts/theme.ts)
- Widget System (src/ts/widget.ts)
- Sniplet System (src/ts/sniplets.ts)

b) UI Components Layer:
- Basic UI Components (src/ts/directives)
- Advanced Media Components:
- Rich Text Editor (src/ts/editor)
- Image Editor (src/ts/image-editor)
- Sound Recorder (src/ts/recorder.ts)
- Media Library (src/ts/directives/mediaLibrary.ts)
- Video Components (src/ts/video)

c) Integration Layer:
- Workspace Integration (src/ts/workspace)
- Template System (src/template)
- Tracking System (src/ts/tracking)

**┌─────────────────────────────────────────┐**
- Integration Layer            │
- ┤
- UI Components Layer           │
- ┤
- Core Framework Layer         │
- ┘

##### Component Relationships

a) Core Dependencies:
- Angular.js → Core Framework Layer
- Core Framework Layer → UI Components Layer
- UI Components Layer → Integration Layer

b) Cross-cutting Concerns:
- Theme Engine → All Layers
- Rights Management → All Components
- Tracking System → All Interactive Components

**┌─────────── Multimedia Components ───────────┐**
- ┌─────────┐ ┌──────────┐ ┌──────────────┐  │
- Editor │ │  Image   │ │    Media     │  │
- Editor  │ │   Library    │  │
- ┘ └──────────┘ └──────────────┘  │
- ┘

##### External Integration Points

Integration with:
- ENT Core Backend
- Springboard
- Audio Recorder Service (Port 6502)

##### Implementation Details

Use these symbols:
- Double lines: Data flow
- Diamonds: Component containers
- Circles: Services
- Rectangles: Modules

##### Additional Notes

- Component types
- Relationship types
- Version information
- Build/deployment considerations

This architecture should emphasize the framework's modular nature and how it supports building and running ODE applications through its various components and services.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef core fill:#dae8fc,stroke:#6c8ebf
    classDef ui fill:#d5e8d4,stroke:#82b366
    classDef integration fill:#ffe6cc,stroke:#d79b00
    classDef external fill:#f5f5f5,stroke:#666666
    classDef multimedia fill:#e1d5e7,stroke:#9673a6

    %% External Dependencies
    ExtDep1["ENT Core Backend"]:::external
    ExtDep2["Springboard"]:::external
    ExtDep3["Audio Recorder Service<br/>(Port 6502)"]:::external

    %% Core Framework Layer
    subgraph CoreLayer["Core Framework Layer"]
        Angular["Angular.js Integration"]:::core
        CoreServices["Core Services"]:::core
        ThemeEngine["Theme Engine"]:::core
        WidgetSystem["Widget System"]:::core
        SnipletSystem["Sniplet System"]:::core

        subgraph CoreServicesDetail["Core Services Detail"]
            HTTP["HTTP Service"]:::core
            Rights["Rights Management"]:::core
        end
    end

    %% UI Components Layer
    subgraph UILayer["UI Components Layer"]
        BasicUI["Basic UI Components"]:::ui

        subgraph Multimedia["Multimedia Components"]
            Editor["Rich Text Editor"]:::multimedia
            ImageEditor["Image Editor"]:::multimedia
            SoundRec["Sound Recorder"]:::multimedia
            MediaLib["Media Library"]:::multimedia
            Video["Video Components"]:::multimedia
        end
    end

    %% Integration Layer
    subgraph IntegrationLayer["Integration Layer"]
        Workspace["Workspace Integration"]:::integration
        Template["Template System"]:::integration
        Tracking["Tracking System"]:::integration
    end

    %% Relationships
    ExtDep1 --> HTTP
    ExtDep2 --> Workspace
    ExtDep3 --> SoundRec

    Angular --> CoreServices
    CoreServices --> BasicUI
    ThemeEngine --> BasicUI
    ThemeEngine --> Multimedia
    WidgetSystem --> BasicUI
    SnipletSystem --> BasicUI

    BasicUI --> Workspace
    Multimedia --> Template
    Template --> BasicUI
    Tracking --> BasicUI
    Tracking --> Multimedia

    %% Click Events
    click Angular "https://github.com/edificeio/infra-front/tree/dev/src/ts/libs/angular"
    click HTTP "https://github.com/edificeio/infra-front/blob/dev/src/ts/http.ts"
    click Rights "https://github.com/edificeio/infra-front/blob/dev/src/ts/rights.ts"
    click ThemeEngine "https://github.com/edificeio/infra-front/blob/dev/src/ts/theme.ts"
    click WidgetSystem "https://github.com/edificeio/infra-front/blob/dev/src/ts/widget.ts"
    click SnipletSystem "https://github.com/edificeio/infra-front/blob/dev/src/ts/sniplets.ts"
    click BasicUI "https://github.com/edificeio/infra-front/tree/dev/src/ts/directives"
    click Editor "https://github.com/edificeio/infra-front/tree/dev/src/ts/editor"
    click ImageEditor "https://github.com/edificeio/infra-front/tree/dev/src/ts/image-editor"
    click SoundRec "https://github.com/edificeio/infra-front/blob/dev/src/ts/recorder.ts"
    click MediaLib "https://github.com/edificeio/infra-front/blob/dev/src/ts/directives/mediaLibrary.ts"
    click Video "https://github.com/edificeio/infra-front/tree/dev/src/ts/video"
    click Workspace "https://github.com/edificeio/infra-front/tree/dev/src/ts/workspace"
    click Template "https://github.com/edificeio/infra-front/tree/dev/src/template"
    click Tracking "https://github.com/edificeio/infra-front/tree/dev/src/ts/tracking"

    %% Legend
    subgraph Legend
        L1["Core Component"]:::core
        L2["UI Component"]:::ui
        L3["Integration Component"]:::integration
        L4["External System"]:::external
        L5["Multimedia Component"]:::multimedia
    end
```
