# apriltilde/neoblogtool architecture

> Architecture diagram of the GitHub repository apriltilde/neoblogtool, 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/neoblogtool
- Repository: https://github.com/apriltilde/neoblogtool

## Overview

##### Main Components

a) Client-Side Components:
- Frontend Interface (HTML/CSS)
- WYSIWYG Editor
- JavaScript Controller
- Token Management
- File Upload Handler

b) External Services:
- GitHub API
- GitHub Repository (Content Storage)

**[Client Browser]**

- [Frontend Layer]
- Index Page (index.html)
- Add Post Page (add.html)
- Styles (styles.css)
- Client Logic (script.js)

- [Core Features]
- WYSIWYG Editor
- Tag Management
- File Upload Handler

- [External Integration]
- [GitHub API]
- [Content Repository]

##### Key Elements to Highlight

a) Data Flow:
- Authentication flow with GitHub tokens
- Rate limiting (60 requests/hour) for Neocities hosting

- Use blue for client-side components
- Use green for GitHub-related components
- Use yellow for authentication elements
- Use red for rate-limited components

##### Important Interactions

- Token Authentication Flow
- Content Creation/Upload Process
- Content Retrieval Process
- Tag Management System
- Image Handling (Base64 conversion)

##### Additional Notes

- A note about hosting variants (Lexiqqq, Neocities, Dynamic hosting)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
        
        subgraph "Frontend Layer"
            Index["Index Page"]:::frontend
            AddPost["Add Post Page"]:::frontend
            Styles["Styles"]:::frontend
            ClientLogic["Client Logic"]:::frontend
        end
        
        subgraph "Core Features"
            Editor["WYSIWYG Editor"]:::core
            TagMgmt["Tag Management"]:::core
            FileUpload["File Upload Handler"]:::core
        end
        
        subgraph "External Integration"
            GitHubAPI["GitHub API"]:::github
            ContentRepo["Content Repository"]:::github
        end
    end
    
    %% Relationships
    Browser --> Index
    Browser --> AddPost
    
    Index --> ClientLogic
    AddPost --> ClientLogic
    
    ClientLogic --> Editor
    ClientLogic --> TagMgmt
    ClientLogic --> FileUpload
    
    Editor --> GitHubAPI
    TagMgmt --> GitHubAPI
    FileUpload --> GitHubAPI
    
    GitHubAPI --> ContentRepo
    
    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#f1c40f,stroke:#f39c12,color:black
    classDef github fill:#2ecc71,stroke:#27ae60,color:white
    
    %% Click Events
    click Index "https://github.com/apriltilde/neoblogtool/blob/main/index.html"
    click AddPost "https://github.com/apriltilde/neoblogtool/blob/main/add.html"
    click Styles "https://github.com/apriltilde/neoblogtool/blob/main/styles.css"
    click ClientLogic "https://github.com/apriltilde/neoblogtool/blob/main/script.js"
    
    %% Notes
    note["Note: Neocities hosting limited to 60 requests/hour"]:::note
    classDef note fill:#e74c3c,stroke:#c0392b,color:white
    
    %% Legend
    subgraph Legend
        Frontend["Frontend Components"]:::frontend
        CoreComp["Core Components"]:::core
        GitComp["GitHub Components"]:::github
    end
```
