# eliascoca85/tegrity architecture

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

- Interactive diagram: https://gitdiagram.com/eliascoca85/tegrity
- Repository: https://github.com/eliascoca85/tegrity

## Overview

##### Project type and purpose
- This is a Next.js–based frontend application (a static/SSR “portfolio” or marketing site).
- It was bootstrapped with create-next-app and consists of a single monolithic codebase serving React pages and components.

##### File structure
- Top level:
- Configuration files (package.json, next.config.mjs, ESLint, PostCSS, jsconfig.json)
- public/ (static assets: images, favicon, etc.)
- src/app/: Next.js “app” directory containing layout.js, page.js, globals.css
- src/app/components/: reusable UI modules (Particles, header, footer, herosection, servicios, proyectos, tecnologias, contactos) each with its JS and CSS
- No separate “api” or “backend” directory—app logic is purely presentation, with optional Next.js SSG/SSR.

##### Key insights from README
- Uses Next.js App Router and next/font for optimized font loading (Geist).
- Deployed on Vercel (CDN + Edge Functions).
- Development via npm/yarn/pnpm/bun dev.

##### Main components
a. Client (Browser)
b. CDN/Edge layer (Vercel)
c. Next.js Server (SSR/SSG pipeline)
d. React Component Tree (layout → header, herosection, servicios, proyectos, tecnologias, contactos, footer, Particles)
e. Static Assets (public folder, optimized fonts)
f. CI/CD pipeline (GitHub/Vercel integration)

##### Relationships & interactions
- Browser → (HTTP request) → CDN/Edge
- CDN/Edge → Next.js Server or serve cached static HTML
- Next.js Server → renders React component tree (SSG at build time or SSR at request time)
- Next.js → fetches static assets from public/ and optimized fonts via next/font
- Build pipeline (Git push → Vercel CI → SSG/SSR build → deploy to Edge CDN)

##### Architectural patterns & design principles
- Component-based UI (each folder under src/app/components)
- SSR/SSG hybrid (App Router)
- Separation of concerns: global CSS vs per-component CSS modules
- CDN caching for static content

##### Technologies & frameworks
- Next.js (App Router, SSR/SSG, next/font)
- React
- Vercel (hosting + CDN)
- PostCSS, ESLint, JavaScript/JSX

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% CI/CD Layer
    subgraph "CI/CD Pipeline"
        direction TB
        GitRepo["GitHub Repo (README.md)"]:::cicd
        VercelCI["Vercel CI/CD"]:::cicd
        GitRepo -->|"push code"| VercelCI
    end

    %% Edge Layer
    subgraph "Edge CDN & Hosting"
        direction TB
        EdgeCDN("Vercel Edge CDN"):::edge
    end

    %% Server Layer
    subgraph "Server & Rendering"
        direction TB
        NextServer["Next.js Server (SSR/SSG)"]:::server
        AppRouter["Next.js App Router"]:::server
        NextServer -->|"routes via"| AppRouter
    end

    %% Assets Layer
    subgraph "Static Assets"
        direction TB
        PublicAssets["public/ (images, favicon, etc.)"]:::assets
    end

    %% React Component Tree
    subgraph "React Component Tree" 
        direction TB
        LayoutJS["layout.js"]:::frontend
        PageJS["page.js"]:::frontend
        GlobalsCSS["globals.css"]:::frontend
        Particles["Particles Component"]:::frontend
        HeaderJS["Header Component"]:::frontend
        HeaderCSS["Header Styles"]:::frontend
        HeroJS["HeroSection Component"]:::frontend
        HeroCSS["HeroSection Styles"]:::frontend
        ServiciosJS["Servicios Component"]:::frontend
        ServiciosCSS["Servicios Styles"]:::frontend
        ProyectosJS["Proyectos Component"]:::frontend
        ProyectosCSS["Proyectos Styles"]:::frontend
        TecnologiasJS["Tecnologias Component"]:::frontend
        TecnologiasCSS["Tecnologias Styles"]:::frontend
        ContactosJS["Contactos Component"]:::frontend
        ContactosCSS["Contactos Styles"]:::frontend
        FooterJS["Footer Component"]:::frontend
        FooterCSS["Footer Styles"]:::frontend

        LayoutJS -->|uses| HeaderJS
        LayoutJS -->|uses| HeroJS
        LayoutJS -->|uses| ServiciosJS
        LayoutJS -->|uses| ProyectosJS
        LayoutJS -->|uses| TecnologiasJS
        LayoutJS -->|uses| ContactosJS
        LayoutJS -->|uses| FooterJS
        LayoutJS -->|uses| Particles
    end

    %% Connections
    VercelCI -->|"deploy"| EdgeCDN
    EdgeCDN -->|"HTTP request"| NextServer
    EdgeCDN -->|"cache hit"| Browser
    Browser["Browser"]:::client
    Browser -->|"requests"| EdgeCDN
    NextServer -->|"renders"| LayoutJS
    NextServer -->|"serves assets"| PublicAssets
    NextServer -->|"serves fonts"| AppRouter
    LayoutJS -->|"renders page"| Browser

    %% Click Events
    click AppRouter "https://github.com/eliascoca85/tegrity/blob/main/next.config.mjs"
    click LayoutJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/layout.js"
    click PageJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/page.js"
    click GlobalsCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/globals.css"
    click Particles "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/Particles.js"
    click HeaderJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/header/header.js"
    click HeaderCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/header/styles.css"
    click HeroJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/herosection/herosection.js"
    click HeroCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/herosection/styles.css"
    click ServiciosJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/servicios/servicios.js"
    click ServiciosCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/servicios/styles.css"
    click ProyectosJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/proyectos/proyectos.js"
    click ProyectosCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/proyectos/style.css"
    click TecnologiasJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/tecnologias/tecnologias.js"
    click TecnologiasCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/tecnologias/style.css"
    click ContactosJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/contactos/contactos.js"
    click ContactosCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/contactos/style.css"
    click FooterJS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/footer/footer.js"
    click FooterCSS "https://github.com/eliascoca85/tegrity/blob/main/src/app/components/footer/styles.css"
    click PublicAssets "https://github.com/eliascoca85/tegrity/tree/main/public/"

    %% Styles
    classDef client fill:#cce5ff,stroke:#6699cc,stroke-width:1px
    classDef edge fill:#d4edda,stroke:#66aa66,stroke-width:1px
    classDef server fill:#d4edda,stroke:#66aa66,stroke-width:1px
    classDef assets fill:#f0f0f0,stroke:#999999,stroke-width:1px
    classDef cicd fill:#ffe5cc,stroke:#cc9966,stroke-width:1px
    classDef frontend fill:#e6e6ff,stroke:#6666cc,stroke-width:1px
```
