# clawfire/effective-invention architecture

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

- Interactive diagram: https://gitdiagram.com/clawfire/effective-invention
- Repository: https://github.com/clawfire/effective-invention

## Overview

##### Main Components Identification

a) Client-Side Layer:
- Public directory containing frontend assets (index.html, skillRendering.js)
- Browser-based user interface

b) Server-Side Layer:
- Node.js server (src/server.js)
- Core business logic modules:
- ESCO integration (src/esco.js)
- Skills management (src/skills.js)
- Occupations management (src/occupations.js)

c) Data Layer:
- JSON data stores (data/occupations.json, data/skills.json)
- Data import scripts (scripts/import-occupations.mjs, scripts/import-skills.mjs)

##### Interactions and Flows

- HTTP requests between client and server
- Internal service communications
- Data flow between services and JSON stores
- Import script interactions with data stores

##### Additional Elements

Include:
- Port number (3000) for the server
- Environment configuration notation
- Import scripts as auxiliary components
- Clear labels for all components and interactions

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef client fill:#a8d1f0,stroke:#000
    classDef server fill:#90EE90,stroke:#000
    classDef data fill:#FFE5B4,stroke:#000
    classDef import fill:#D3D3D3,stroke:#000

    %% Client Layer
    subgraph Client
        WC["Web Client Interface"]
        SR["Skill Rendering Module"]
    end
    class WC,SR client

    %% Server Layer
    subgraph Server
        MS["Main Server\n(Port 3000)"]
        ESCO["ESCO Integration\nService"]
        SMS["Skills Management\nService"]
        OMS["Occupations Management\nService"]
    end
    class MS,ESCO,SMS,OMS server

    %% Data Layer
    subgraph Data
        SDS[(Skills Data Store)]
        ODS[(Occupations Data Store)]
    end
    class SDS,ODS data

    %% Import Tools
    subgraph "Import Tools"
        SIT["Skills Import Tool"]
        OIT["Occupations Import Tool"]
    end
    class SIT,OIT import

    %% Relationships
    WC --> |HTTP Requests| MS
    SR --> |API Calls| MS
    MS --> ESCO
    MS --> SMS
    MS --> OMS
    SMS --> SDS
    OMS --> ODS
    ESCO --> SMS
    ESCO --> OMS
    SIT --> SDS
    OIT --> ODS

    %% Click Events
    click WC "https://github.com/clawfire/effective-invention/blob/main/public/index.html"
    click SR "https://github.com/clawfire/effective-invention/blob/main/public/skillRendering.js"
    click MS "https://github.com/clawfire/effective-invention/blob/main/src/server.js"
    click ESCO "https://github.com/clawfire/effective-invention/blob/main/src/esco.js"
    click SMS "https://github.com/clawfire/effective-invention/blob/main/src/skills.js"
    click OMS "https://github.com/clawfire/effective-invention/blob/main/src/occupations.js"
    click SDS "https://github.com/clawfire/effective-invention/blob/main/data/skills.json"
    click ODS "https://github.com/clawfire/effective-invention/blob/main/data/occupations.json"
    click SIT "https://github.com/clawfire/effective-invention/blob/main/scripts/import-skills.mjs"
    click OIT "https://github.com/clawfire/effective-invention/blob/main/scripts/import-occupations.mjs"

    %% Legend
    subgraph Legend
        C1["Client Components"]:::client
        S1["Server Components"]:::server
        D1["Data Stores"]:::data
        I1["Import Tools"]:::import
    end
```
