# doginuwu/freecharts architecture

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

- Interactive diagram: https://gitdiagram.com/doginuwu/freecharts
- Repository: https://github.com/doginuwu/freecharts

## Overview

##### Main Components

A. Electron Process Architecture:
- Main Process (represented by src/main.ts)
- Renderer Process (represented by src/renderer.ts)
- Preload Scripts (represented by src/preload.ts)

B. Frontend Architecture:
- Vue.js Application Layer
- Component Structure
- Routing System
- Data Visualization (Charts)

**┌─────────────────────────────────────────────┐**
- Electron Runtime               │
- ┬───────────────┬──────────┤
- Main Process  │    Preload    │ Renderer │
- ┴───────────────┴──────────┘
- ▲                ▲          ▲

- ┴──────────┘

**┌─────────────────────────────────────────────┐**
- Vue.js Application             │
- ┬─────────────────┬────────────┤
- Pages    │   Components    │   Routes   │
- ┴─────────────────┴────────────┘

##### Component Relationships

- Rounded rectangles for Vue components
- Hexagons for pages

##### Specific Implementation Details

A. Main Process Layer (Blue):
- To system resources
- IPC communication channels

B. Preload Layer (Yellow):
- Security bridge
- Exposed APIs to renderer

C. Renderer Layer (Green):
- Vue.js application structure
- Component hierarchy
- Routing system

D. Component Structure (Purple):
- Charts module
- UI components (Sidebar, Input, etc.)
- Data management components

##### Key Elements to Highlight

- IPC Communication flows
- Component relationships
- Data flow between pages
- Chart data processing pipeline
- Navigation structure

##### Technical Stack Indicators

Technology badges or labels for:
- Electron
- Vue.js
- TypeScript
- Tailwind CSS
- Vite

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Electron
        MainProcess["Main Process"]
        PreloadScripts["Preload Scripts"]
        RendererProcess["Renderer Process"]
        
        MainProcess --> PreloadScripts
        PreloadScripts --> RendererProcess
    end

    subgraph VueApplication
        App["Vue App"]
        Router["Router"]
        
        subgraph Components
            UI["UI Components"]
            Charts["Charts Components"]
            
            subgraph UIComponents
                Sidebar["Sidebar"]
                Input["Input"]
                Checkbox["Checkbox Group"]
                Collapsable["Collapsable Data"]
            end
            
            subgraph ChartComponents
                ChartReader["Chart Reader"]
            end
        end
        
        subgraph Pages
            ChartPage["Charts Page"]
            FlightPlan["Flight Plan"]
            Index["Index Page"]
        end
        
        subgraph Styling
            CSS["Global CSS"]
            Tailwind["Tailwind Config"]
        end
        
        subgraph Build
            ViteMain["Vite Main Config"]
            VitePreload["Vite Preload Config"]
            ViteRenderer["Vite Renderer Config"]
            ForgeConfig["Forge Config"]
        end
    end
    
    RendererProcess --> App
    App --> Router
    Router --> Pages
    App --> Components
    
    UI --> UIComponents
    Charts --> ChartComponents
    ChartComponents --> ChartPage
    
    %% Component Mappings
    click MainProcess "https://github.com/DoginUwU/freecharts/blob/main/src/main.ts"
    click PreloadScripts "https://github.com/DoginUwU/freecharts/blob/main/src/preload.ts"
    click RendererProcess "https://github.com/DoginUwU/freecharts/blob/main/src/renderer.ts"
    click App "https://github.com/DoginUwU/freecharts/blob/main/src/App.vue"
    click Router "https://github.com/DoginUwU/freecharts/blob/main/src/routes/routes.ts"
    click Charts "https://github.com/DoginUwU/freecharts/tree/main/src/components/Charts/"
    click ChartReader "https://github.com/DoginUwU/freecharts/blob/main/src/components/Charts/ChartReader.vue"
    click ChartPage "https://github.com/DoginUwU/freecharts/blob/main/src/pages/Charts.vue"
    click Sidebar "https://github.com/DoginUwU/freecharts/blob/main/src/components/Sidebar.vue"
    click Input "https://github.com/DoginUwU/freecharts/blob/main/src/components/Input.vue"
    click Checkbox "https://github.com/DoginUwU/freecharts/blob/main/src/components/CheckboxGroup.vue"
    click Collapsable "https://github.com/DoginUwU/freecharts/blob/main/src/components/CollapsableData.vue"
    click FlightPlan "https://github.com/DoginUwU/freecharts/blob/main/src/pages/FlightPlan.vue"
    click Index "https://github.com/DoginUwU/freecharts/blob/main/src/pages/index.vue"
    click ViteMain "https://github.com/DoginUwU/freecharts/blob/main/vite.main.config.mjs"
    click VitePreload "https://github.com/DoginUwU/freecharts/blob/main/vite.preload.config.mjs"
    click ViteRenderer "https://github.com/DoginUwU/freecharts/blob/main/vite.renderer.config.mjs"
    click ForgeConfig "https://github.com/DoginUwU/freecharts/blob/main/forge.config.js"
    click CSS "https://github.com/DoginUwU/freecharts/blob/main/src/styles/index.css"
    click Tailwind "https://github.com/DoginUwU/freecharts/blob/main/tailwind.config.js"
    
    classDef electron fill:#3498db,stroke:#2980b9,color:white
    classDef vue fill:#42b883,stroke:#2c3e50,color:white
    classDef component fill:#9b59b6,stroke:#8e44ad,color:white
    classDef page fill:#e74c3c,stroke:#c0392b,color:white
    classDef config fill:#f1c40f,stroke:#f39c12,color:white
    
    class MainProcess,PreloadScripts,RendererProcess electron
    class App,Router vue
    class UI,Charts,UIComponents,ChartComponents,Sidebar,Input,Checkbox,Collapsable,ChartReader component
    class ChartPage,FlightPlan,Index page
    class ViteMain,VitePreload,ViteRenderer,ForgeConfig,CSS,Tailwind config
```
