# cgbm-unimagdalena/pagina-web-cgbm architecture

> Architecture diagram of the GitHub repository cgbm-unimagdalena/pagina-web-cgbm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cgbm-unimagdalena/pagina-web-cgbm
- Repository: https://github.com/cgbm-unimagdalena/pagina-web-cgbm

## Overview

#### Purpose and Runtime
CGBM-WEB is a Vite-served React/TypeScript informational site for CGBM, covering institutional content, research, services, news, and service-request forms. Browser rendering begins at `src/main.tsx`, mounts the application in `src/app/App.tsx`, and is configured by `vite.config.ts`.

#### Application Shell and Navigation
`src/app/App.tsx` is the primary composition and route-selection boundary. Shared chrome and page behavior are provided by `src/app/components/Header.tsx`, `src/app/components/Footer.tsx`, and `src/app/components/ScrollToTop.tsx`. `src/app/components/ui/PageLayout.tsx` likely standardizes page framing for route-level content.

#### Route-Level Content Domains
Page modules separate the site into institutional, research, service, and news domains:
- Institutional/contact: `src/app/pages/AboutPage.tsx`, `src/app/pages/ContactPage.tsx`, `src/app/pages/EducationPage.tsx`
- Research: `src/app/pages/ResearchGroupsPage.tsx`, `src/app/pages/ResearchProjectsPage.tsx`, `src/app/pages/ResearchersPage.tsx`
- Services: `src/app/pages/ServicesPage.tsx`, `src/app/pages/ServiceFormPage.tsx`
- News: `src/app/pages/NewsPage.tsx`, `src/app/pages/NewsDetailPage.tsx`

Navigation flows from the shared header into these page modules; pages compose domain components and static data/assets.

#### Home Page as Content Aggregator
`src/app/pages/HomePage.tsx` assembles the landing experience from focused sections: `src/app/components/home/ImageCarousel.tsx`, `src/app/components/home/MetricsSection.tsx`, `src/app/components/home/NewsEventsSection.tsx`, `src/app/components/home/ProjectsPreview.tsx`, and `src/app/components/home/ServicesPreview.tsx`. This is a presentation aggregation layer rather than a backend-driven dashboard.

#### Service Request Forms
Service inquiry flows are split by specialty, allowing tailored form pages for PCR, NGS, barcoding, veterinary PCR, consultancy, and education: `src/app/pages/PCRFormPage.tsx`, `src/app/pages/NGSFormPage.tsx`, `src/app/pages/BarcodingFormPage.tsx`, `src/app/pages/VeterinaryPCRFormPage.tsx`, `src/app/pages/ConsultancyFormPage.tsx`, and `src/app/pages/EducationFormPage.tsx`. Reusable service-facing UI includes `src/app/components/Services.tsx` and `src/app/components/ServiceForm.tsx`. The tree does not identify a server/API integration, so submission handling should be treated as a boundary requiring verification.

#### Content and Asset Boundaries
Static application content is centralized in `src/app/data/cgbmdata.ts` and `src/app/data/noticias.ts`; news views likely consume the latter for listing and detail rendering. Visual and document resources are bundled under `src/assets`, while deployable public files include downloadable sample-submission material at `public/formato-de-envio-de-muestras.xlsx` and news static content under `public/noticias`.

#### Deployment and External Edge Handling
The site is a static frontend build with hosting rewrite/redirect rules in `public/.htaccess` and `public/_redirects`, indicating compatibility with Apache- and Netlify-style static hosts. `og-proxy.php` is the only PHP entry point and likely provides an Open Graph/proxy edge function outside the React runtime. Styling is globally layered through `src/styles/index.css`, `src/styles/tailwind.css`, and `src/styles/theme.css`.

Main entry points: [`src/app/App.tsx`](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/App.tsx) (App and route selection), [`public/_redirects`](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/public/_redirects) (Static hosting rules), [`src/app/pages/ServicesPage.tsx`](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/ServicesPage.tsx) (Services pages), [`src/app/pages/NewsPage.tsx`](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/NewsPage.tsx) (News list and detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Frontend Runtime"]
  node_vite{{"Vite configuration<br/>build config<br/>[vite.config.ts]"}}
  node_main(("Browser entry<br/>React entry<br/>[main.tsx]"))
  node_app["App and route selection<br/>application shell<br/>[App.tsx]"]
end

subgraph group_ui["UI &amp; Routes"]
  node_chrome["Shared chrome<br/>layout components"]
  node_page_layout["Page layout<br/>UI framing<br/>[PageLayout.tsx]"]
  node_home["Home page<br/>landing page<br/>[HomePage.tsx]"]
  node_home_sections["Home sections<br/>content sections"]
  node_institutional["Institutional pages<br/>route pages"]
  node_research["Research pages<br/>route pages"]
  node_services["Services pages<br/>route pages<br/>[ServicesPage.tsx]"]
  node_service_forms["Specialty request forms<br/>form pages"]
  node_service_ui["Reusable service UI<br/>form components<br/>[ServiceForm.tsx]"]
  node_submission{{"Submission handling<br/>unverified boundary"}}
  node_news["News list and detail<br/>route pages<br/>[NewsPage.tsx]"]
end

subgraph group_content["Content &amp; Assets"]
  node_app_data["Institutional content<br/>static data<br/>[cgbmdata.ts]"]
  node_news_data["News content<br/>static data<br/>[noticias.ts]"]
  node_assets["Bundled assets<br/>visual resources"]
  node_styles["Global styles<br/>style layers"]
end

subgraph group_delivery["Static Delivery"]
  node_static_host{{"Static hosting rules<br/>deployment boundary"}}
  node_public_content["Public downloads and news<br/>public files"]
  node_og_proxy{{"Open Graph proxy<br/>PHP edge entry<br/>[og-proxy.php]"}}
end

node_vite -->|"serves and builds"| node_main
node_main -->|"mounts"| node_app
node_app -->|"composes"| node_chrome
node_app -->|"frames routes"| node_page_layout
node_app -->|"selects route"| node_home
node_app -->|"selects routes"| node_institutional
node_app -->|"selects routes"| node_research
node_app -->|"selects route"| node_services
node_app -->|"selects routes"| node_service_forms
node_app -->|"selects routes"| node_news
node_chrome -->|"navigates to"| node_institutional
node_chrome -->|"navigates to"| node_research
node_chrome -->|"navigates to"| node_services
node_chrome -->|"navigates to"| node_news
node_home -->|"aggregates"| node_home_sections
node_home_sections -->|"previews"| node_news_data
node_services -->|"uses"| node_service_ui
node_service_forms -->|"reuse"| node_service_ui
node_service_forms -.->|"submit to"| node_submission
node_institutional -->|"reads"| node_app_data
node_research -->|"reads"| node_app_data
node_news -->|"reads"| node_news_data
node_app -->|"applies"| node_styles
node_app -->|"renders"| node_assets
node_static_host -->|"serves with rewrites"| node_app
node_static_host -->|"serves"| node_public_content
node_static_host -.->|"routes edge request"| node_og_proxy

click node_vite "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/vite.config.ts"
click node_main "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/main.tsx"
click node_app "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/App.tsx"
click node_page_layout "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/components/ui/PageLayout.tsx"
click node_home "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/HomePage.tsx"
click node_services "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/ServicesPage.tsx"
click node_service_ui "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/components/ServiceForm.tsx"
click node_news "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/NewsPage.tsx"
click node_app_data "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/data/cgbmdata.ts"
click node_news_data "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/data/noticias.ts"
click node_assets "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/tree/main/src/assets"
click node_static_host "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/public/_redirects"
click node_public_content "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/public/formato-de-envio-de-muestras.xlsx"
click node_og_proxy "https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/og-proxy.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_vite,node_main,node_app toneBlue
class node_chrome,node_page_layout,node_home,node_home_sections,node_institutional,node_research,node_services,node_service_forms,node_service_ui,node_submission,node_news toneAmber
class node_app_data,node_news_data,node_assets,node_styles toneMint
class node_static_host,node_public_content,node_og_proxy toneRose
```

## Components

### Frontend Runtime

- [Vite configuration](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/vite.config.ts): build config · `vite.config.ts`
- [Browser entry](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/main.tsx): React entry · `src/main.tsx`
- [App and route selection](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/App.tsx): application shell · `src/app/App.tsx`

### UI & Routes

- **Shared chrome**: layout components · Header, footer, and scroll behavior.
- [Page layout](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/components/ui/PageLayout.tsx): UI framing · `src/app/components/ui/PageLayout.tsx`
- [Home page](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/HomePage.tsx): landing page · `src/app/pages/HomePage.tsx`
- **Home sections**: content sections · Carousel, metrics, news, projects, and services previews.
- **Institutional pages**: route pages · About, contact, and education content.
- **Research pages**: route pages · Groups, projects, and researchers.
- [Services pages](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/ServicesPage.tsx): route pages · Service catalogue and request landing page. · `src/app/pages/ServicesPage.tsx`
- **Specialty request forms**: form pages · PCR, NGS, barcoding, veterinary, consultancy, and education requests.
- [Reusable service UI](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/components/ServiceForm.tsx): form components · `src/app/components/ServiceForm.tsx`
- **Submission handling**: unverified boundary · No server or API integration is identified.
- [News list and detail](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/pages/NewsPage.tsx): route pages · `src/app/pages/NewsPage.tsx`

### Content & Assets

- [Institutional content](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/data/cgbmdata.ts): static data · `src/app/data/cgbmdata.ts`
- [News content](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/src/app/data/noticias.ts): static data · `src/app/data/noticias.ts`
- [Bundled assets](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/tree/main/src/assets): visual resources · `src/assets`
- **Global styles**: style layers · Index, Tailwind, and theme styles.

### Static Delivery

- [Static hosting rules](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/public/_redirects): deployment boundary · Apache and Netlify rewrite support. · `public/_redirects`
- [Public downloads and news](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/public/formato-de-envio-de-muestras.xlsx): public files · Includes sample-submission spreadsheet and static news content. · `public/formato-de-envio-de-muestras.xlsx`
- [Open Graph proxy](https://github.com/cgbm-unimagdalena/pagina-web-cgbm/blob/main/og-proxy.php): PHP edge entry · Outside the React runtime. · `og-proxy.php`

## Connections

- Vite configuration → Browser entry: serves and builds
- Browser entry → App and route selection: mounts
- App and route selection → Shared chrome: composes
- App and route selection → Page layout: frames routes
- App and route selection → Home page: selects route
- App and route selection → Institutional pages: selects routes
- App and route selection → Research pages: selects routes
- App and route selection → Services pages: selects route
- App and route selection → Specialty request forms: selects routes
- App and route selection → News list and detail: selects routes
- Shared chrome → Institutional pages: navigates to
- Shared chrome → Research pages: navigates to
- Shared chrome → Services pages: navigates to
- Shared chrome → News list and detail: navigates to
- Home page → Home sections: aggregates
- Home sections → News content: previews
- Services pages → Reusable service UI: uses
- Specialty request forms → Reusable service UI: reuse
- Specialty request forms → Submission handling: submit to
- Institutional pages → Institutional content: reads
- Research pages → Institutional content: reads
- News list and detail → News content: reads
- App and route selection → Global styles: applies
- App and route selection → Bundled assets: renders
- Static hosting rules → App and route selection: serves with rewrites
- Static hosting rules → Public downloads and news: serves
- Static hosting rules → Open Graph proxy: routes edge request
