# apriltilde/bloggable architecture

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

- Interactive diagram: https://gitdiagram.com/apriltilde/bloggable
- Repository: https://github.com/apriltilde/bloggable

## Overview

##### Main Components Identification

A. Frontend Layer
- Main Application Interface
- Embedded Post System
- Dashboard Interface
- Settings Interface

B. Backend Layer
- PHP Handlers (for bugs and uploads)

##### Component Organization

A. Client-Side Components (Top Level):
- Main Interface (index.html)
- Dashboard (dash.html)
- Settings Panel (settings.html)
- Updates Section (updates.html)

- Post Management
- Post Listing
- Post Viewer

B. Style Components (Middle Level):
- Core Styles (styles.css)
- Form Styles (forms.css)
- Table Styles (table.css)
- Window Styles (win.css)
- Quill Editor Styles (quill.css)

C. JavaScript Modules (Middle Level):
- Core Script (script.js)
- Dashboard Controller (getdash.js)
- Post Handler (post.js)
- Settings Manager (saveset.js)

D. Backend Services (Bottom Level):
- Upload Handler (upload.php)
- Bug Reporter (bug.php)

##### Additional Details

Annotations for:
- File types and their purposes
- Key interaction points between components
- Entry points for the application
- Data flow between the frontend and backend services

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef frontend fill:#a8d1f0
    classDef backend fill:#f5d6a8
    classDef static fill:#d3d3d3
    classDef js fill:#a8f0b8

    %% Main Containers
    subgraph Frontend
        %% Main Pages
        MainPages["Main Interface Pages"]
        click MainPages "https://github.com/apriltilde/bloggable/blob/main/index.html"
        Index["Index Page"]
        click Index "https://github.com/apriltilde/bloggable/blob/main/index.html"
        Dashboard["Dashboard"]
        click Dashboard "https://github.com/apriltilde/bloggable/blob/main/dash.html"
        Settings["Settings"]
        click Settings "https://github.com/apriltilde/bloggable/blob/main/settings.html"
        Updates["Updates"]
        click Updates "https://github.com/apriltilde/bloggable/blob/main/updates.html"

        %% Embedded Components
        EmbedInterface["Embedded Interface"]
        click EmbedInterface "https://github.com/apriltilde/bloggable/blob/main/embed/index.html"
        PostManagement["Post Management"]
        click PostManagement "https://github.com/apriltilde/bloggable/blob/main/embed/post/post.html"
        PostList["Post List"]
        click PostList "https://github.com/apriltilde/bloggable/blob/main/embed/post/postlist.html"
    end

    subgraph Stylesheets
        %% Core Styles
        CoreStyles["Core Styles"]
        click CoreStyles "https://github.com/apriltilde/bloggable/blob/main/styles.css"
        FormStyles["Form Styles"]
        click FormStyles "https://github.com/apriltilde/bloggable/blob/main/forms.css"
        TableStyles["Table Styles"]
        click TableStyles "https://github.com/apriltilde/bloggable/blob/main/table.css"
        EditorStyles["Editor Styles"]
        click EditorStyles "https://github.com/apriltilde/bloggable/blob/main/quill.css"

        %% Embedded Styles
        EmbedStyles["Embedded Styles"]
        click EmbedStyles "https://github.com/apriltilde/bloggable/blob/main/embed/styles.css"
        WinStyles["Window Styles"]
        click WinStyles "https://github.com/apriltilde/bloggable/blob/main/embed/win.css"
        PostStyles["Post Styles"]
        click PostStyles "https://github.com/apriltilde/bloggable/blob/main/embed/post/styles.css"
        PostTableStyles["Post Table Styles"]
        click PostTableStyles "https://github.com/apriltilde/bloggable/blob/main/embed/post/table.css"
        PostWinStyles["Post Window Styles"]
        click PostWinStyles "https://github.com/apriltilde/bloggable/blob/main/embed/post/win.css"
    end

    subgraph ClientLogic
        %% JavaScript Modules
        CoreJS["Core Script"]
        click CoreJS "https://github.com/apriltilde/bloggable/blob/main/script.js"
        DashboardJS["Dashboard Handler"]
        click DashboardJS "https://github.com/apriltilde/bloggable/blob/main/getdash.js"
        PostJS["Post Handler"]
        click PostJS "https://github.com/apriltilde/bloggable/blob/main/post.js"
        EmbedPostJS["Embedded Post Script"]
        click EmbedPostJS "https://github.com/apriltilde/bloggable/blob/main/embed/post/script.js"
        PostListJS["Post List Handler"]
        click PostListJS "https://github.com/apriltilde/bloggable/blob/main/embed/post/postlist.js"
        SettingsJS["Settings Handler"]
        click SettingsJS "https://github.com/apriltilde/bloggable/blob/main/saveset.js"
    end

    subgraph Backend
        %% PHP Endpoints
        UploadHandler["Upload Handler"]
        click UploadHandler "https://github.com/apriltilde/bloggable/blob/main/upload.php"
        BugReporter["Bug Reporter"]
        click BugReporter "https://github.com/apriltilde/bloggable/blob/main/bug.php"
    end

    %% Relationships
    MainPages --> CoreJS
    Dashboard --> DashboardJS
    Settings --> SettingsJS
    PostManagement --> PostJS
    PostList --> PostListJS
    EmbedInterface --> EmbedPostJS

    CoreJS --> UploadHandler
    DashboardJS --> UploadHandler
    PostJS --> UploadHandler
    SettingsJS --> BugReporter

    %% Style Applications
    class MainPages,Index,Dashboard,Settings,Updates,EmbedInterface,PostManagement,PostList frontend
    class CoreStyles,FormStyles,TableStyles,EditorStyles,EmbedStyles,WinStyles,PostStyles,PostTableStyles,PostWinStyles static
    class CoreJS,DashboardJS,PostJS,EmbedPostJS,PostListJS,SettingsJS js
    class UploadHandler,BugReporter backend
```
