Task: Add batch photo processing feature

Add batch photo processing feature

I have a huge number of my own photos with geo-data (I specifically enabled camera GPS access).

We need to work out the following scenario:

Drop a large batch of photos (100-200+) into a separate interface all at once.

Directly in the browser, without uploading to the server, we need to filter the photos with geo-data, sort them by distance from each other, and display everything as cards with previews. At the same time, the existing list of already uploaded files needs to be loaded to the frontend so we don't process the same ones again. Basically, the uploaded list also needs to be filtered by the "Already uploaded" attribute.

Next, we select any photo and create a new concept based on it (using geo-data, a lot can be easily googled via AI, and it will also prepare a description; all that remains is to double-check and confirm or adjust it).

All of this will be a very good starting asset for natural and other attractions.

Ворклоги

Ha, asked ChatGPT to throw together a logic diagram based on a task description, and it turned out a bit bigger than I expected )))

flowchart TD
    A[User opens a separate interface] --> B[Frontend loads the list of already uploaded files]
    B --> B1[List contains: fingerprint/hash, name, size, date, geo, status, concept_id]

    A --> C[User adds a batch of 100-200+ photos]
    C --> D[Files are processed locally in the browser]

    D --> E[Read EXIF / GPS without uploading to the server]
    E --> F{Has geo data?}

    F -- No --> F1[Mark as: no geo]
    F1 --> Z1[Can be hidden or shown as a separate group]

    F -- Yes --> G[Create local photo fingerprint]
    G --> H{Photo already in the uploaded list?}

    H -- Yes --> H1[Mark as: already uploaded]
    H1 --> I[Add to the general local list of cards]

    H -- No --> H2[Mark as: new]
    H2 --> I

    I --> J[Group / sort photos by geo points]
    J --> K[Calculate distances between photos]
    K --> L[Sort by route / proximity / clusters]
    L --> M[Display cards with previews]

    M --> N[User filters]
    N --> N1[New only]
    N --> N2[Already uploaded]
    N --> N3[With geo]
    N --> N4[Without geo]
    N --> N5[By distance / area / clusters]

    M --> O[User selects photo]
    O --> P[Frontend takes photo coordinates]
    P --> Q[Request to AI / backend: determine place by coordinates]
    Q --> R[AI searches for context: natural object, landmark, region, description]
    R --> S[AI generates concept draft]

    S --> T[User checks]
    T --> U{Confirm?}

    U -- No --> U1[User edits description, title, category]
    U1 --> T

    U -- Yes --> V[Create concept]
    V --> W[Upload selected photos / link to concept]
    W --> X[Save to database: concept, geo, files, metadata]
    X --> Y[Photos end up in the list of already uploaded ones]