# bilalparray/quick-image-tool architecture

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

- Interactive diagram: https://gitdiagram.com/bilalparray/quick-image-tool
- Repository: https://github.com/bilalparray/quick-image-tool

## Overview

##### Project Type Analysis
This is a client-side web application built with Angular 17, focusing on image manipulation with features for conversion and resizing. It appears to be a Progressive Web App (PWA) due to the presence of sw.js (Service Worker).

##### Main Components

A. Client-Side Architecture (Primary Focus):
- Core Application Layer
- App Component (Root)
- Routing Module
- Configuration Modules (Server & Client)

B. Feature Modules:
- Home Component
- Image Converter Component
- Image Resizer Component

C. Supporting Infrastructure:
- Service Worker
- Static Assets
- Build System

**[User Interface Layer]**
- ↓
**[Feature Components Layer]**
- ↓
**[Core Services Layer]**
- ↓
**[PWA/Service Worker Layer]**

##### Detailed Component Breakdown

Top Level:
**[Browser] ←→ [Service Worker (sw.js)]**
- ↓
**[App Component]**
- ↓
**[Router] → [Feature Components]**

Feature Components:
**[Home Component]**
**[Converter Component]**
**[Resizer Component]**

##### Important Elements to Highlight

- Angular's component tree structure
- Routing configuration
- Service Worker integration
- Static asset handling
- Build and deployment pipeline

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Browser Layer"
        Browser["Web Browser"]
    end

    subgraph "PWA Layer"
        SW["Service Worker"]:::pwa
        click SW "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/sw.js"
    end

    subgraph "Entry Points"
        MainTS["main.ts"]:::entry
        MainServer["main.server.ts"]:::entry
        Server["server.ts"]:::entry
        click MainTS "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/main.ts"
        click MainServer "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/main.server.ts"
        click Server "https://github.com/bilalparray/Quick-Image-Tool/blob/main/server.ts"
    end

    subgraph "Configuration"
        AppConfig["App Config"]:::config
        ServerConfig["Server Config"]:::config
        AngularJSON["angular.json"]:::config
        TSConfig["tsconfig.json"]:::config
        click AppConfig "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/app/app.config.ts"
        click ServerConfig "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/app/app.config.server.ts"
        click AngularJSON "https://github.com/bilalparray/Quick-Image-Tool/blob/main/angular.json"
        click TSConfig "https://github.com/bilalparray/Quick-Image-Tool/blob/main/tsconfig.json"
    end

    subgraph "Core Application"
        AppComponent["App Component"]:::core
        Router["Router"]:::core
        click AppComponent "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/app/app.component.ts"
        click Router "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/app/app.routes.ts"
    end

    subgraph "Feature Components"
        Home["Home Component"]:::feature
        Converter["Image Converter"]:::feature
        Resizer["Image Resizer"]:::feature
        click Home "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/app/home/home.component.ts"
        click Converter "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/app/converter/converter.component.ts"
        click Resizer "https://github.com/bilalparray/Quick-Image-Tool/blob/main/src/app/resizer/resizer.component.ts"
    end

    subgraph "Assets"
        StaticAssets["Static Assets"]:::assets
        click StaticAssets "https://github.com/bilalparray/Quick-Image-Tool/tree/main/src/assets"
    end

    %% Connections
    Browser <--> SW
    Browser --> AppComponent
    SW --> StaticAssets

    MainTS --> AppComponent
    MainServer --> ServerConfig
    ServerConfig --> Server

    AppComponent --> AppConfig
    AppComponent --> Router

    Router -.-> Home
    Router -.-> Converter
    Router -.-> Resizer

    %% Styles
    classDef core fill:#2196F3,color:white
    classDef feature fill:#4CAF50,color:white
    classDef pwa fill:#9C27B0,color:white
    classDef config fill:#757575,color:white
    classDef entry fill:#FF9800,color:white
    classDef assets fill:#607D8B,color:white

    %% Legend
    subgraph Legend
        CoreL["Core Components"]:::core
        FeatureL["Feature Components"]:::feature
        PWAL["PWA Components"]:::pwa
        ConfigL["Configuration"]:::config
        EntryL["Entry Points"]:::entry
        AssetsL["Assets"]:::assets
    end
```
