# claudiodevv/proyectonoseguidores architecture

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

- Interactive diagram: https://gitdiagram.com/claudiodevv/proyectonoseguidores
- Repository: https://github.com/claudiodevv/proyectonoseguidores

## Overview

##### Project Type and Purpose
- This is a full-stack web application.
- Purpose: Allow Instagram users to upload their “followers” and “following” JSON files and get a list of accounts they follow who do not follow them back.
- Tech stack:
- Frontend: Static HTML/CSS/JavaScript
- Backend: Python (likely Flask or similar)
- Heavy computation module: C++ binary using nlohmann/json
- Data files: JSON uploaded by user, stored in local/data directory

##### File Structure Analysis
- Top level:
- frontend/ → all static web assets (HTML, CSS, JS, images)
- backend/ → code to serve API endpoints + C++ subfolder
- data/ → sample JSON input files
- backend/
- api.py → Python entrypoint, defines HTTP routes (upload, process, result)
- requirements.txt, Procfile, render.yaml → deployment configuration (Heroku/Render)
- cplusplus/ → C++ source (main.cpp, Info.cpp) and nlohmann headers for JSON parsing
- frontend/
- index.html, privacy, cookie policy → user pages
- css/styles.css, js/main.js, js/cookies.js → UI behavior and cookie management
- No traditional database; uses file‐based JSON ingestion and in-memory results

##### Key Insights from README
- Workflow: user downloads JSON from Instagram → uploads via frontend → backend orchestrates C++ program to compute “non‐followers” → frontend displays results
- Future improvements hint at UX, mobile‐responsive, SSL, analytics, etc., which may influence deployment architecture

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        direction TB
        Browser["Client Browser"]:::frontend
        StaticHosting["Static Frontend Hosting"]:::frontend
        Index["index.html"]:::frontend
        Styles["styles.css"]:::frontend
        MainJS["main.js"]:::frontend
        CookiesJS["cookies.js"]:::frontend
    end

    %% Backend Layer
    subgraph "Backend Layer"
        direction TB
        PythonAPI["Python API (Flask)"]:::compute
        subgraph "Deployment Configs"
            Procfile["Procfile"]:::compute
            RenderYML["render.yaml"]:::compute
            ReqTXT["requirements.txt"]:::compute
        end
        subgraph "C++ Module"
            direction TB
            MainCPP["main.cpp"]:::compute
            InfoCPP["Info.cpp"]:::compute
            Nlohmann["nlohmann headers"]:::compute
            Binary["noseguidores (binary)"]:::compute
        end
    end

    %% Storage
    FileStorage["File Storage (data/)"]:::storage

    %% Data Flow
    Browser -- HTTP GET --> StaticHosting
    StaticHosting -- serves --> Index
    StaticHosting -- serves --> Styles
    StaticHosting -- serves --> MainJS
    StaticHosting -- serves --> CookiesJS

    Browser -- "Upload JSON via POST" --> PythonAPI
    PythonAPI -- "save files (JSON)" --> FileStorage
    PythonAPI -- "subprocess call" --> Binary
    Binary -- "reads JSON" --> FileStorage
    Binary -- "output JSON/stdout" --> PythonAPI
    PythonAPI -- "return result JSON" --> Browser

    %% Deployment Config linkage
    PythonAPI --- Procfile
    PythonAPI --- RenderYML
    PythonAPI --- ReqTXT

    %% Click Events
    click StaticHosting "https://github.com/claudiodevv/proyectonoseguidores/tree/main/frontend/"
    click Index "https://github.com/claudiodevv/proyectonoseguidores/blob/main/frontend/index.html"
    click Styles "https://github.com/claudiodevv/proyectonoseguidores/blob/main/frontend/css/styles.css"
    click MainJS "https://github.com/claudiodevv/proyectonoseguidores/blob/main/frontend/js/main.js"
    click CookiesJS "https://github.com/claudiodevv/proyectonoseguidores/blob/main/frontend/js/cookies.js"
    click PythonAPI "https://github.com/claudiodevv/proyectonoseguidores/blob/main/backend/api.py"
    click Procfile "https://github.com/claudiodevv/proyectonoseguidores/tree/main/backend/Procfile"
    click RenderYML "https://github.com/claudiodevv/proyectonoseguidores/blob/main/backend/render.yaml"
    click ReqTXT "https://github.com/claudiodevv/proyectonoseguidores/blob/main/backend/requirements.txt"
    click MainCPP "https://github.com/claudiodevv/proyectonoseguidores/blob/main/backend/cplusplus/main.cpp"
    click InfoCPP "https://github.com/claudiodevv/proyectonoseguidores/blob/main/backend/cplusplus/src/Info.cpp"
    click Nlohmann "https://github.com/claudiodevv/proyectonoseguidores/tree/main/backend/cplusplus/include/nlohmann/"
    click Binary "https://github.com/claudiodevv/proyectonoseguidores/tree/main/backend/cplusplus/noseguidores"
    click FileStorage "https://github.com/claudiodevv/proyectonoseguidores/tree/main/data/"

    %% Styles
    classDef frontend fill:#B3D4FC,stroke:#0366D6,color:#000;
    classDef compute fill:#C2F0C2,stroke:#028A02,color:#000;
    classDef storage fill:#E0E0E0,stroke:#666666,color:#000;
```
