# t3dotgg/quickpic architecture

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

- Interactive diagram: https://gitdiagram.com/t3dotgg/quickpic
- Repository: https://github.com/t3dotgg/quickpic

## Overview

##### Project Type Analysis
This is a Next.js-based frontend application with multiple image processing tools, running entirely on the client side. The project follows a modern React application structure with app router architecture.

##### Main Components

A. Client Application Layer
- Next.js Runtime Environment
- App Router Structure
- Tool Pages
- Shared Components
- Utility Functions

B. Core Tools (Feature Modules)
- SVG to PNG Converter
- Square Image Tool
- Rounded Border Tool

C. Common Services Layer
- File Handling System
- Local Storage Service
- Clipboard Service

**[Client Browser]**

- ▼
**[Next.js Application]**

- [Tool Pages Layer]
- SVG to PNG Tool
- Square Image Tool
- Rounded Border Tool

- [Shared Components Layer]
- File Dropzone
- Option Selector

- [Services Layer]
- File Utils
- Local Storage
- Clipboard Handler

##### Data Flow Representation

- User input flow (file uploads, configuration settings)
- Image processing flow
- Storage interactions
- Component interactions

##### Important Details

- Client-side processing indication
- File handling capabilities
- Local storage integration
- Clipboard functionality
- Image processing features for each tool

##### Technical Stack Indicators

- Next.js
- React
- TypeScript
- Tailwind CSS
- File processing utilities

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser[Client Browser]
    end

    subgraph NextApp[Next.js Application]
        subgraph Tools[Tool Pages]
            SVGTool["SVG to PNG Tool"]
            SquareTool["Square Image Tool"]
            RoundedTool["Rounded Border Tool"]
        end

        subgraph Shared[Shared Components]
            FileDropzone["File Dropzone"]
            OptionSelector["Option Selector"]
            UploadBox["Upload Box"]
            BorderSelector["Border Radius Selector"]
            ScaleSelector["SVG Scale Selector"]
        end

        subgraph Services[Services Layer]
            FileUtils["File Handling System"]
            LocalStorage["Local Storage Service"]
            Clipboard["Clipboard Service"]
        end
    end

    %% Connections
    Browser --> NextApp
    
    %% Tool Connections
    FileDropzone --> SVGTool
    FileDropzone --> SquareTool
    FileDropzone --> RoundedTool
    
    UploadBox --> SVGTool
    UploadBox --> SquareTool
    UploadBox --> RoundedTool
    
    BorderSelector --> RoundedTool
    ScaleSelector --> SVGTool
    
    %% Service Connections
    FileUtils --> Tools
    LocalStorage --> Tools
    Clipboard --> Tools

    %% Click Events
    click SVGTool "https://github.com/t3dotgg/quickpic/blob/main/src/app/(tools)/svg-to-png/svg-tool.tsx"
    click SquareTool "https://github.com/t3dotgg/quickpic/blob/main/src/app/(tools)/square-image/square-tool.tsx"
    click RoundedTool "https://github.com/t3dotgg/quickpic/blob/main/src/app/(tools)/rounded-border/rounded-tool.tsx"
    click FileDropzone "https://github.com/t3dotgg/quickpic/blob/main/src/components/shared/file-dropzone.tsx"
    click OptionSelector "https://github.com/t3dotgg/quickpic/blob/main/src/components/shared/option-selector.tsx"
    click UploadBox "https://github.com/t3dotgg/quickpic/blob/main/src/components/shared/upload-box.tsx"
    click FileUtils "https://github.com/t3dotgg/quickpic/blob/main/src/lib/file-utils.ts"
    click LocalStorage "https://github.com/t3dotgg/quickpic/blob/main/src/hooks/use-local-storage.ts"
    click Clipboard "https://github.com/t3dotgg/quickpic/blob/main/src/hooks/use-clipboard-paste.ts"
    click Tools "https://github.com/t3dotgg/quickpic/tree/main/src/app/(tools)/"
    click Shared "https://github.com/t3dotgg/quickpic/tree/main/src/components/shared/"
    click BorderSelector "https://github.com/t3dotgg/quickpic/blob/main/src/components/border-radius-selector.tsx"
    click ScaleSelector "https://github.com/t3dotgg/quickpic/blob/main/src/components/svg-scale-selector.tsx"

    %% Styling
    classDef browser fill:#f9f,stroke:#333,stroke-width:2px
    classDef tool fill:#90EE90,stroke:#333,stroke-width:2px
    classDef shared fill:#FFB347,stroke:#333,stroke-width:2px
    classDef service fill:#ADD8E6,stroke:#333,stroke-width:2px
    classDef container fill:#fff,stroke:#333,stroke-width:2px

    class Browser browser
    class SVGTool,SquareTool,RoundedTool tool
    class FileDropzone,OptionSelector,UploadBox,BorderSelector,ScaleSelector shared
    class FileUtils,LocalStorage,Clipboard service
    class NextApp,Tools,Shared,Services container
```
