# gramaphenia/sitio-oficial-hexagono architecture

> Architecture diagram of the GitHub repository gramaphenia/sitio-oficial-hexagono, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gramaphenia/sitio-oficial-hexagono
- Repository: https://github.com/gramaphenia/sitio-oficial-hexagono

## Overview

##### Main Architectural Components
- Client/Browser: End users interact with the site via a browser.
- Next.js Application Server: This handles server-side rendering (SSR), static generation, and client-side interactions.
- App Routing Layer: Found in the src/app directory, it organizes pages by routes such as “desarrollo-a-medida”, “diseno-web”, “dominio”, “hosting”, “precios”, “seo”, and “sobre-nosotros”. Each route has its own layout and page file.
- API Endpoints: Located within src/app/api (for instance, the sitemap API at src/app/api/sitemap/route.ts) which provide dynamic data (e.g., sitemap generation).
- UI Components and Custom Modules: Directories like src/components/custom and src/components/ui house reusable components and custom elements—these represent the building blocks of the site (headers, footers, cards, menus, etc.).
- Data Layer: The src/data folder includes static data (for design, pricing, testimonials, etc.) that drives content on various pages.
- Utilities & Hooks: The src/hooks, src/lib, and src/utils directories include business logic, form handling (via React Hook Form), and validation (using Zod) that support interactive features in the user interface.

##### Relationships and Interactions
- The browser sends requests that the Next.js server routes to the appropriate page under src/app/(routes). Each route uses a layout component to provide a consistent structure.
- Within pages, UI components (located in the custom and ui directories) are composed together. They consume data provided from static files (in src/data) and possibly dynamic API responses.
- API endpoints (like the sitemap route) are called from within the application or via scheduled processes, showing the connection between client-facing components and backend logic.
- Global CSS files (src/app/globals.css) and Tailwind CSS configuration (tailwind.config.ts) ensure a consistent look across components.

##### Important Architectural Patterns and Design Principles
- Modular & Component-Based Architecture: With well-organized modules for pages, components, and data, this structure reinforces the idea of reusability and separation of concerns.
- Routing and Layout: The Next.js app folder structure promotes a clear mapping of URL routes to UI components, with dedicated layouts for each section.
- API Integration: Even though the application is primarily a frontend project, the inclusion of API endpoints shows an integration layer for dynamic content (e.g., sitemap generation).
- Responsive & Accessible Design: With focus on using Radix UI and Tailwind CSS, design accessibility and responsiveness are likely top priorities.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Client/Browser"]:::browser
    B["Next.js Application Server"]:::backend
    B1["layout.tsx"]:::backend
    B2["page.tsx"]:::backend
    B3["not-found.tsx"]:::backend
    C["App Routing Layer"]:::backend
    D["UI Components"]:::frontend
    D1["Custom UI Components"]:::frontend
    D2["Reusable UI Components"]:::frontend
    E["Data Layer"]:::dataLayer
    F["Utilities & Hooks"]:::utilityLayer
    F1["Hooks"]:::utilityLayer
    F2["Library Utils"]:::utilityLayer
    F3["Additional Utils"]:::utilityLayer
    G["API Endpoint (sitemap)"]:::backend
    H["Global Assets"]:::assetsLayer

    %% Relationships
    A -->|"HTTP Request"| B
    B -->|"includes"| B1
    B -->|"includes"| B2
    B -->|"includes"| B3
    B -->|"routes to"| C
    B -->|"calls"| G
    B -->|"serves"| H
    C -->|"renders"| D
    D -->|"composes"| D1
    D -->|"composes"| D2
    D -->|"consumes"| E
    D -->|"utilizes"| F
    F -->|"provides"| F1
    F -->|"provides"| F2
    F -->|"provides"| F3

    %% Click Events
    click B1 "https://github.com/gramaphenia/sitio-oficial-hexagono/blob/master/src/app/layout.tsx"
    click B2 "https://github.com/gramaphenia/sitio-oficial-hexagono/blob/master/src/app/page.tsx"
    click B3 "https://github.com/gramaphenia/sitio-oficial-hexagono/blob/master/src/app/not-found.tsx"
    click C "https://github.com/gramaphenia/sitio-oficial-hexagono/tree/master/src/app/(routes)"
    click G "https://github.com/gramaphenia/sitio-oficial-hexagono/blob/master/src/app/api/sitemap/route.ts"
    click D1 "https://github.com/gramaphenia/sitio-oficial-hexagono/tree/master/src/components/custom"
    click D2 "https://github.com/gramaphenia/sitio-oficial-hexagono/tree/master/src/components/ui"
    click E "https://github.com/gramaphenia/sitio-oficial-hexagono/tree/master/src/data"
    click H "https://github.com/gramaphenia/sitio-oficial-hexagono/tree/master/public"
    click F1 "https://github.com/gramaphenia/sitio-oficial-hexagono/tree/master/src/hooks"
    click F2 "https://github.com/gramaphenia/sitio-oficial-hexagono/blob/master/src/lib/utils.ts"
    click F3 "https://github.com/gramaphenia/sitio-oficial-hexagono/blob/master/src/utils/validation.ts"

    %% Styles
    classDef browser fill:#f0f0f0,stroke:#333,stroke-width:2px;
    classDef backend fill:#fde2e4,stroke:#f9b3c2,stroke-width:2px;
    classDef frontend fill:#e0f7fa,stroke:#00acc1,stroke-width:2px;
    classDef dataLayer fill:#e8f5e9,stroke:#66bb6a,stroke-width:2px;
    classDef assetsLayer fill:#fff3e0,stroke:#fb8c00,stroke-width:2px;
    classDef utilityLayer fill:#f3e5f5,stroke:#8e24aa,stroke-width:2px;
```
