# chimoochi/quickdrop architecture

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

- Interactive diagram: https://gitdiagram.com/chimoochi/quickdrop
- Repository: https://github.com/chimoochi/quickdrop

## Overview

##### Project type and purpose
- From the README and file tree, this is a small full-stack web application built in Python (likely using Flask) that runs on a local network to let users upload, share, and download files (photos/videos) between devices on the same Wi-Fi.
- Key purpose: Quick peer-to-peer file sharing over LAN via a simple web UI.

##### File structure
- Top‐level files:
- README.md – project description and instructions
- app.py – main server application
- install-requirements.bat – Windows helper to install Python dependencies
- templates/index.html – the sole frontend view (Jinja2 template)
- (Implicit) an uploads/ folder where files are stored on disk
- No separate “frontend” or “backend” directories—this is a monolithic Python web service that serves HTML and handles file I/O.

##### README for additional insights
- The app generates a local URL (and QR code) for clients to connect.
- All communication happens over HTTP on the local network.
- File persistence is via the host machine’s filesystem in an uploads folder.
- No external databases or third-party storage—everything is self-contained.

##### Detail
- Every route implemented in app.py (index render, file list API, upload endpoint, download endpoint)
- QR code generation step as part of the startup sequence

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Client Devices on LAN"
        Desktop["Desktop Browser"]:::frontend
        Mobile["Mobile Browser"]:::frontend
        QRScanner["QR Code Scanner"]:::frontend
    end

    subgraph "Server (Monolithic Flask App)"
        HTTPServer["HTTP Server (Flask Application)"]:::backend
        TemplateEngine["Template Engine (Jinja2)"]:::backend
        QRGenerator["QR Code Generator Module"]:::backend
        FileStorage["File Storage Subsystem (uploads/)"]:::storage
    end

    subgraph "Deployment & Documentation"
        InstallScript["install-requirements.bat"]:::config
        README["README.md"]:::config
    end

    Desktop -->|"GET /"| HTTPServer
    Mobile -->|"GET /"| HTTPServer
    QRScanner -->|"Scan URL"| HTTPServer

    Desktop -->|"POST /upload"| HTTPServer
    Desktop -->|"GET /uploads/<file>"| HTTPServer
    Mobile -->|"POST /upload"| HTTPServer
    Mobile -->|"GET /uploads/<file>"| HTTPServer

    HTTPServer -->|"Render index.html"| TemplateEngine
    TemplateEngine -->|"HTML/CSS/JS"| Desktop
    TemplateEngine -->|"HTML/CSS/JS"| Mobile

    HTTPServer -->|"Generate QR Code"| QRGenerator

    HTTPServer -->|"Write file"| FileStorage
    HTTPServer -->|"Read file listing"| FileStorage
    HTTPServer -->|"Serve file"| FileStorage

    InstallScript -.-> HTTPServer
    README -.-> InstallScript

    click HTTPServer "https://github.com/chimoochi/quickdrop/blob/main/app.py"
    click TemplateEngine "https://github.com/chimoochi/quickdrop/blob/main/templates/index.html"
    click QRGenerator "https://github.com/chimoochi/quickdrop/blob/main/app.py"
    click FileStorage "https://github.com/chimoochi/quickdrop/tree/main/uploads/"
    click InstallScript "https://github.com/chimoochi/quickdrop/blob/main/install-requirements.bat"
    click README "https://github.com/chimoochi/quickdrop/blob/main/README.md"

    classDef frontend fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef backend fill:#90EE90,stroke:#333,stroke-width:1px
    classDef storage fill:#FFA500,stroke:#333,stroke-width:1px
    classDef config fill:#D3D3D3,stroke:#333,stroke-width:1px
```
