# cristiancutizaca/frontend-goleman architecture

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

- Interactive diagram: https://gitdiagram.com/cristiancutizaca/frontend-goleman
- Repository: https://github.com/cristiancutizaca/frontend-goleman

## Overview

##### Project type and purpose
- This is a Next.js front-end application (React-based) serving as an informational/marketing site (likely for an educational institution: admissions, courses, diplomados, contact, social showcase, etc.).
- No explicit “backend” folder or API routes—this is primarily a static/SSR site with forms, social widgets, and possibly serverless functions (authentication utilities are present in components/utils).

##### File structure
- Top level:
- app/ – Next.js “app router” pages and layouts
- components/ – reusable UI components organized by domain (admision, cursos, diplomas, home, share, etc.)
- hooks/, interface/ – custom React hooks and TypeScript types/interfaces
- public/ – static assets (images, fonts, 3D models, JSON animations)
- style/ – global CSS modules and Tailwind config
- next.config.js, tailwind.config.js, postcss.config.js, tsconfig.json – configuration files
- Patterns:
- Each page under app/ imports high-level components (e.g., AdmissionForm, SocialShowcase).
- A ThemeProvider wraps the entire app (dark/light mode).
- Utility modules handle auth, token config, password hashing—these hint at a possible serverless auth layer or integration with an external auth API.
- No dedicated “api/” folder—if there are serverless functions they might be under app/api (not shown), or else the project calls out to external services (e.g., WhatsApp widget, form submission endpoint).

##### README
- Standard Next.js boilerplate—no custom architecture notes.
- Deployment recommended on Vercel (serverless/edge functions are available).

##### Elements
- Client (Browser)
- Next.js Server / Edge Functions
- React App (App Router, Pages, Components)
- Theme & State (Context Provider)
- Static Assets CDN
- External Services (Email API, WhatsApp, Social Media)
- HTTP requests (Browser → Next.js SSR/SSG)
- Data fetch or POST actions (Forms → Serverless/API)
- Context value flow (ThemeProvider → Components)
- Asset fetching (Components → CDN)
- Blue for frontend components
- Green for serverless/backend utilities
- Orange for external services
- Gray for static assets

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Presentation Layer
    subgraph "Presentation Layer" 
        direction TB
        Browser["Client Browser"]:::external
        NextServer["Next.js Server (SSR/SSG)"]:::frontend
    end

    %% Next.js App Router
    subgraph "App Router (app/)" 
        direction TB
        Layout["app/layout.tsx"]:::frontend
        PageHome["app/page.tsx"]:::frontend
        ClientLayout["app/clientLayout.tsx"]:::frontend
        ThemeProviderApp["app/theme-provider.tsx"]:::frontend
        AdmisionPage["app/admision/page.tsx"]:::frontend
        ProcesoAdmisionPage["app/admision/ProcesoAdmision.tsx"]:::frontend
        ContactPage["app/ContactForm/page.tsx"]:::frontend
        SocialShowcasePage["app/SocialShowcase/page.tsx"]:::frontend
        CursosPage["app/curs/page.tsx"]:::frontend
        DiplomadosPage["app/diplomados/page.tsx"]:::frontend
    end

    %% UI Components Library
    subgraph "UI Components (components/)" 
        direction TB
        AdmissionForm["AdmissionForm.tsx"]:::frontend
        ProcesoComp["Proceso.tsx"]:::frontend
        CursosIndex["components/cursos/index.ts"]:::frontend
        GraduateIngBridge["GraduateIngBridge.tsx"]:::frontend
        DiplomasAccordion["diplomadosAccordion.jsx"]:::frontend
        HomePrincipal["PrincipalHome.jsx"]:::frontend
        HomeContactForm["ContactForm.tsx"]:::frontend
        ModalComp["Modal.tsx"]:::frontend
        FooterComp["Footer.tsx"]:::frontend
        WhatsAppWidget["Index.jsx"]:::frontend
        SocialEmbeds["NuestrasRedes.jsx"]:::frontend
    end

    %% Theme & State Management
    subgraph "Theme & State" 
        direction TB
        ThemeProviderComp["components/ThemeProvider.tsx"]:::frontend
        ThemeSwitcher["components/ThemeSwitcher.tsx"]:::frontend
        Hooks["hooks/hooks.ts"]:::frontend
    end

    %% Data & Utilities
    subgraph "Utilities (components/utils & interface)" 
        direction TB
        AuthServer["auth.server.ts"]:::backend
        PasswordHash["passwordHash.tsx"]:::backend
        TokenConfig["tokenConfig.ts"]:::backend
        Validator["validator.server.ts"]:::backend
        CoursesUtils["courses.ts"]:::backend
        AuthContext["authContext.tsx"]:::backend
        InterfaceTypes["interface.ts"]:::backend
    end

    %% Static Assets & CDN
    subgraph "Static Assets (public/)" 
        direction TB
        Images["public/image/"]:::assets
        GLBModel["public/glb/earth_cartoon.glb"]:::assets
        Animations["public/json/animacion.json"]:::assets
        SVGIcons["public/svg/"]:::assets
        Robots["public/robots.txt"]:::assets
    end

    %% External Services
    subgraph "External Services" 
        direction TB
        EmailAPI["Email/Form API"]:::external
        WhatsAppService["WhatsApp Widget API"]:::external
        SocialMedia["Social Media Embeds"]:::external
    end

    %% Build & Deployment
    subgraph "Build & Deployment" 
        direction TB
        NextConfig["next.config.js"]:::backend
        TailwindConfig["tailwind.config.js"]:::backend
        PostCSS["postcss.config.js"]:::backend
        TSConfig["tsconfig.json"]:::backend
        PackageJSON["package.json"]:::backend
    end

    %% Connections
    Browser -->|"GET page"| NextServer
    NextServer -->|renders| Layout
    Layout --> PageHome
    Layout --> AdmisionPage
    Layout --> CursosPage
    Layout --> DiplomadosPage
    Layout --> ContactPage
    Layout --> SocialShowcasePage
    PageHome --> HomePrincipal
    HomePrincipal --> HomeContactForm
    HomePrincipal --> SocialEmbeds
    HomeContactForm -->|POST form| EmailAPI
    AdmisionPage --> AdmissionForm
    AdmissionForm --> ProcesoComp
    AdmissionForm -->|POST admision| EmailAPI
    CursosPage --> CursosIndex
    CursosIndex --> GraduateIngBridge
    DiplomadosPage --> DiplomasAccordion
    ContactPage --> HomeContactForm
    SocialShowcasePage --> SocialEmbeds
    SocialEmbeds --> SocialMedia
    WhatsAppWidget --> WhatsAppService
    Layout --> ThemeProviderApp
    ThemeProviderApp --> ThemeProviderComp
    ThemeProviderComp --> ThemeSwitcher
    ThemeProviderComp --> Hooks
    AdmissionForm --> AuthServer
    AuthServer --> PasswordHash
    AuthServer --> TokenConfig
    AuthServer --> Validator
    AuthServer --> AuthContext
    CursosIndex --> CoursesUtils
    InterfaceTypes --> CoursesUtils
    ComponentsAssets["UI Components"] -.-> Images
    ComponentsAssets --> Animations
    ComponentsAssets --> GLBModel
    ComponentsAssets --> SVGIcons
    ComponentsAssets --> Robots
    NextServer --> StaticHost["CDN/Static Hosting"] 
    StaticHost --> Images
    StaticHost --> GLBModel
    StaticHost --> Animations
    StaticHost --> SVGIcons
    StaticHost --> Robots
    PackageJSON -->|build/deploy| NextConfig
    NextConfig -->|deploy to| Vercel["Vercel"]:::external

    %% Click Events
    click Layout "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/layout.tsx"
    click PageHome "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/page.tsx"
    click ClientLayout "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/clientLayout.tsx"
    click ThemeProviderApp "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/theme-provider.tsx"
    click AdmisionPage "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/admision/page.tsx"
    click ProcesoAdmisionPage "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/admision/ProcesoAdmision.tsx"
    click ContactPage "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/ContactForm/page.tsx"
    click SocialShowcasePage "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/SocialShowcase/page.tsx"
    click CursosPage "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/curs/page.tsx"
    click DiplomadosPage "https://github.com/cristiancutizaca/frontend-goleman/blob/main/app/diplomados/page.tsx"
    click AdmissionForm "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/admision/AdmissionForm.tsx"
    click ProcesoComp "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/admision/Proceso.tsx"
    click CursosIndex "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/cursos/index.ts"
    click GraduateIngBridge "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/cursos/IngCivil/GraduateIngBridge.tsx"
    click DiplomasAccordion "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/diplomadosComponents/diplomadosAccordion.jsx"
    click HomePrincipal "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/home/PrincipalHome.jsx"
    click HomeContactForm "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/home/ContactForm.tsx"
    click ModalComp "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/share/Modal.tsx"
    click FooterComp "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/footer/Footer.tsx"
    click WhatsAppWidget "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/whatsapp/Index.jsx"
    click ThemeProviderComp "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/ThemeProvider.tsx"
    click ThemeSwitcher "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/ThemeSwitcher.tsx"
    click Hooks "https://github.com/cristiancutizaca/frontend-goleman/blob/main/hooks/hooks.ts"
    click AuthServer "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/utils/auth.server.ts"
    click PasswordHash "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/utils/format/passwordHash.tsx"
    click TokenConfig "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/utils/format/tokenConfig.ts"
    click Validator "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/utils/validator.server.ts"
    click CoursesUtils "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/utils/courses.ts"
    click AuthContext "https://github.com/cristiancutizaca/frontend-goleman/blob/main/components/utils/format/authContext.tsx"
    click InterfaceTypes "https://github.com/cristiancutizaca/frontend-goleman/blob/main/interface/interface.ts"
    click Images "https://github.com/cristiancutizaca/frontend-goleman/tree/main/public/image/"
    click GLBModel "https://github.com/cristiancutizaca/frontend-goleman/blob/main/public/glb/earth_cartoon.glb"
    click Animations "https://github.com/cristiancutizaca/frontend-goleman/blob/main/public/json/animacion.json"
    click SVGIcons "https://github.com/cristiancutizaca/frontend-goleman/tree/main/public/svg/"
    click Robots "https://github.com/cristiancutizaca/frontend-goleman/blob/main/public/robots.txt"
    click NextConfig "https://github.com/cristiancutizaca/frontend-goleman/blob/main/next.config.js"
    click TailwindConfig "https://github.com/cristiancutizaca/frontend-goleman/blob/main/tailwind.config.js"
    click PostCSS "https://github.com/cristiancutizaca/frontend-goleman/blob/main/postcss.config.js"
    click TSConfig "https://github.com/cristiancutizaca/frontend-goleman/blob/main/tsconfig.json"
    click PackageJSON "https://github.com/cristiancutizaca/frontend-goleman/blob/main/package.json"

    %% Styles
    classDef frontend fill:#E0F7FA,stroke:#00BCD4,color:#000
    classDef backend fill:#E8F5E9,stroke:#43A047,color:#000
    classDef external fill:#FFF3E0,stroke:#FB8C00,color:#000
    classDef assets fill:#ECEFF1,stroke:#607D8B,color:#000
```
