# sebastiangranobles/el-gran-gremio architecture

> Architecture diagram of the GitHub repository sebastiangranobles/el-gran-gremio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sebastiangranobles/el-gran-gremio
- Repository: https://github.com/sebastiangranobles/el-gran-gremio

## Overview

##### Project type and purpose
- This is a full-stack web application (“El-Gran-Gremio”) combining:
- A static front-end (index.html, script.js, style.css) using Tailwind CSS, vanilla JS
- A Java Spring Boot backend (under gremioproyect/gremioproyect) exposing REST controllers
- Integration with external services/APIs: Instagram, WhatsApp, Google Maps
- A relational database accessed via Spring Data JPA repositories

##### File structure
- Top-level:
- index.html, script.js, style.css → front-end assets
- fotos/ → static images served to the client
- gremioproyect/gremioproyect/ → Maven-based Spring Boot application
- Backend layout (MVC pattern):
- controller/ (AdminController, MascotaController, UsuarioController)
- model/ (Admin, Mascota, Usuario entity classes)
- repository/ (AdminRepository, MascotaRepository, UsuarioRepository)
- application.properties → DB connection, server port, other configs
- Build & test: mvnw, pom.xml, src/test/…, target/

##### README for additional insights
- The front-end is a dog/cat shelter blog with pastel design, search/filter, and button animations
- Uses client-side calls to external APIs for social widgets and maps
- ~1,455 lines of HTML/CSS/JS code

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Front-end
    subgraph "Browser / Front-end"
        BF_INDEX["index.html"]:::frontend
        BF_SCRIPT["script.js"]:::frontend
        BF_STYLE["style.css"]:::frontend
        BF_FOTOS["fotos/"]:::frontend
    end

    %% Backend
    subgraph "Spring Boot Server" 
        SB_APP["GremioproyectApplication"]:::backend
        subgraph "Controllers"
            CTRL_ADMIN["AdminController"]:::backend
            CTRL_MASCOTA["MascotaController"]:::backend
            CTRL_USUARIO["UsuarioController"]:::backend
        end
        subgraph "Models"
            MODEL_ADMIN["Admin"]:::backend
            MODEL_MASCOTA["Mascota"]:::backend
            MODEL_USUARIO["Usuario"]:::backend
        end
        subgraph "Repositories"
            REP_ADMIN["AdminRepository"]:::backend
            REP_MASCOTA["MascotaRepository"]:::backend
            REP_USUARIO["UsuarioRepository"]:::backend
        end
        SB_CONFIG["application.properties"]:::backend
        SB_BUILD["pom.xml / mvnw"]:::backend
        SB_TESTS["GremioproyectApplicationTests"]:::backend
    end

    %% Database
    DB["Database"]:::db

    %% External Services
    IG["Instagram API"]:::external
    WA["WhatsApp API"]:::external
    GM["Google Maps API"]:::external

    %% Flows
    BF_INDEX -->|"HTTP/JSON"| CTRL_ADMIN
    BF_INDEX -->|"HTTP/JSON"| CTRL_MASCOTA
    BF_INDEX -->|"HTTP/JSON"| CTRL_USUARIO
    CTRL_ADMIN -->|"uses"| REP_ADMIN
    CTRL_MASCOTA -->|"uses"| REP_MASCOTA
    CTRL_USUARIO -->|"uses"| REP_USUARIO
    REP_ADMIN -->|"CRUD"| DB
    REP_MASCOTA -->|"CRUD"| DB
    REP_USUARIO -->|"CRUD"| DB

    BF_SCRIPT --> IG
    BF_SCRIPT --> WA
    BF_SCRIPT --> GM

    SB_APP --> CTRL_ADMIN
    SB_APP --> CTRL_MASCOTA
    SB_APP --> CTRL_USUARIO
    SB_APP --> SB_CONFIG
    SB_APP --> SB_BUILD
    SB_APP --> SB_TESTS

    %% Click events
    click BF_INDEX "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/index.html"
    click BF_SCRIPT "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/script.js"
    click BF_STYLE "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/style.css"
    click BF_FOTOS "https://github.com/sebastiangranobles/el-gran-gremio/tree/main/fotos/"
    click SB_APP "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/GremioproyectApplication.java"
    click CTRL_ADMIN "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/controller/AdminController.java"
    click CTRL_MASCOTA "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/controller/MascotaController.java"
    click CTRL_USUARIO "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/controller/UsuarioController.java"
    click MODEL_ADMIN "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/model/Admin.java"
    click MODEL_MASCOTA "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/model/Mascota.java"
    click MODEL_USUARIO "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/model/Usuario.java"
    click REP_ADMIN "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/repository/AdminRepository.java"
    click REP_MASCOTA "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/repository/MascotaRepository.java"
    click REP_USUARIO "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/java/com/elgrangremio/gremioproyect/repository/UsuarioRepository.java"
    click SB_CONFIG "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/main/resources/application.properties"
    click SB_BUILD "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/pom.xml"
    click SB_BUILD "https://github.com/sebastiangranobles/el-gran-gremio/tree/main/gremioproyect/gremioproyect/mvnw"
    click SB_TESTS "https://github.com/sebastiangranobles/el-gran-gremio/blob/main/gremioproyect/gremioproyect/src/test/java/com/elgrangremio/gremioproyect/GremioproyectApplicationTests.java"

    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px;
    classDef backend fill:#d4edda,stroke:#333,stroke-width:1px;
    classDef db fill:#ffe5b4,stroke:#333,stroke-width:1px;
    classDef external fill:#e2e3e5,stroke:#333,stroke-width:1px;
```
