# almas-ali/fronty architecture

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

- Interactive diagram: https://gitdiagram.com/almas-ali/fronty
- Repository: https://github.com/almas-ali/fronty

## Overview

##### Main Components Identification

a) Core Framework Components:
- HTML Module (/fronty/html/)
- CSS Module (/fronty/css/)
- JavaScript Module (/fronty/js/)
- Widgets Module (/fronty/widgets/)
- Middlewares Module (/fronty/middlewares/)

b) Integration Layer:
- Backend Server Interface (Flask/Django compatibility)
- CLI Component (/fronty/cli.py)

**┌─────────────────────────────────────────────┐**
- Client Browser                 │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- Backend Server (Flask/Django)     │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- Fronty Framework             │
- ┬─────────────┬────────────────┤
- HTML Layer │  CSS Layer  │   JS Layer     │
- ┴─────────────┴────────────────┤
- Widgets System                 │

- Middleware Layer               │
- ┘

##### Component Relationships

Key interactions:
- How Python code gets transformed into HTML/CSS/JS
- Widget composition flow
- Middleware integration points
- Backend server communication

##### Detailed Component Breakdown

For each major component, show:
- Input/Output relationships
- Component responsibilities
- Extension points
- Configuration options

##### Notes for Implementation

Annotations for:
- Required backend server
- Custom CSS integration points
- Bootstrap integration options
- Widget extension mechanisms

Key Aspects to Emphasize:
- Python-to-Frontend transformation process
- Component reusability
- Backend server independence
- Customization capabilities
- Widget system architecture

Remember to maintain a balance between showing the high-level architecture while including enough detail to understand the framework's unique features and integration points.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]:::client
    end

    subgraph Server
        Backend["Backend Server<br/>(Flask/Django)"]:::server
    end

    subgraph FrontyFramework["Fronty Framework"]
        CLI["CLI Interface"]:::core
        click CLI "https://github.com/Almas-Ali/fronty/blob/master/fronty/cli.py"

        subgraph CoreModules["Core Modules"]
            HTML["HTML Module"]:::core
            click HTML "https://github.com/Almas-Ali/fronty/tree/master/fronty/html/"
            CSS["CSS Module"]:::core
            click CSS "https://github.com/Almas-Ali/fronty/tree/master/fronty/css/"
            JS["JavaScript Module"]:::core
            click JS "https://github.com/Almas-Ali/fronty/tree/master/fronty/js/"
        end

        subgraph WidgetSystem["Widget System"]
            Widgets["Core Widgets"]:::widget
            click Widgets "https://github.com/Almas-Ali/fronty/tree/master/fronty/widgets/"
            Forms["Form Components"]:::widget
            click Forms "https://github.com/Almas-Ali/fronty/blob/master/fronty/widgets/forms.py"
            Navigation["Navigation Components"]:::widget
            click Navigation "https://github.com/Almas-Ali/fronty/blob/master/fronty/widgets/navs.py"
        end

        subgraph MiddlewareLayer["Middleware Layer"]
            Middleware["Core Middleware"]:::middleware
            click Middleware "https://github.com/Almas-Ali/fronty/tree/master/fronty/middlewares/"
        end

        subgraph Examples["Integration Examples"]
            Bootstrap["Bootstrap Integration"]:::example
            click Bootstrap "https://github.com/Almas-Ali/fronty/tree/master/examples/Bootstrap integration/"
            CustomCSS["Custom CSS Project"]:::example
            click CustomCSS "https://github.com/Almas-Ali/fronty/tree/master/examples/Custom CSS Project/"
            StarterProject["Starter Project"]:::example
            click StarterProject "https://github.com/Almas-Ali/fronty/tree/master/examples/starter project/"
            WidgetExamples["Widget Examples"]:::example
            click WidgetExamples "https://github.com/Almas-Ali/fronty/tree/master/examples/widgets twicks/"
        end
    end

    %% Relationships
    Browser <--> Backend
    Backend <--> FrontyFramework
    CLI --> CoreModules
    HTML --> Widgets
    CSS --> Widgets
    JS --> Widgets
    Widgets --> Forms
    Widgets --> Navigation
    CoreModules --> Middleware
    Middleware --> Backend

    %% Styling
    classDef client fill:#FFE5CC,stroke:#FF9933
    classDef server fill:#CCE5FF,stroke:#3399FF
    classDef core fill:#E5F2E5,stroke:#66B266
    classDef widget fill:#FFE5E5,stroke:#FF6666
    classDef middleware fill:#E5E5FF,stroke:#6666FF
    classDef example fill:#F2F2F2,stroke:#999999

    %% Legend
    subgraph Legend
        Client_["Client Layer"]:::client
        Server_["Server Layer"]:::server
        Core_["Core Components"]:::core
        Widget_["Widget Components"]:::widget
        Middleware_["Middleware Components"]:::middleware
        Example_["Examples"]:::example
    end
```
