# veldor09/proyecto1 architecture

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

- Interactive diagram: https://gitdiagram.com/veldor09/proyecto1
- Repository: https://github.com/veldor09/proyecto1

## Overview

##### Project type and purpose
- This is a single‐page frontend application built with React, TypeScript, and Vite.
- It has no in‐house backend; it fetches and persists data via an external JSON‐bin service (see `src/Hooks/useJsonBin.ts`).

##### File structure
- Top‐level:
- `index.html` + `public/` → static assets & HTML shell
- `vite.config.ts` → build & dev server config
- `src/main.tsx` → React entry point
- `src/router.tsx` → client‐side routing (React Router)
- `src/Pages/…` → page‐level containers
- `src/Components/…` → reusable UI components (tables, forms, layout, navbar)
- `src/Hooks/…` → custom hooks (data‐access, navigation)
- `src/assets/…` → images/static files
- Configuration files: ESLint, tsconfig, package.json

##### README for insights
- Standard React + TypeScript + Vite template with HMR, ESLint rules.
- No built‐in backend; instead uses JSON‐bin or similar service for CRUD operations.

##### Elements
- Clear labels for: Browser, Dev Server/CDN, React SPA sub‐layers, External API
- Browser → Dev Server (GET index.html)
- Browser ↔ React components (user events)
- Blue rectangles for client‐side modules (Pages, Components, Hooks)
- Green rectangle for infra (Vite server/CDN)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["User's Browser"]:::client
    DevServer["Vite Dev Server / CDN"]:::infra
    Browser -->|"GET index.html"| DevServer
    DevServer -->|"Serves index.html & assets"| Browser

    subgraph "React SPA"
      entry["Entry & Bootstrapping\n(main.tsx)"]:::client
      router["Client-side Routing\n(router.tsx)"]:::client
      app["Root App\n(App.tsx)"]:::client
      subgraph "Pages\n(src/Pages)"
        home["HomePage"]:::client
        don["DonacionPage"]:::client
        proj["ProyectosPage"]:::client
        vol["VoluntariosPage"]:::client
      end
      subgraph "Components\n(src/Components)"
        layout["Layout"]:::client
        nav["NavBar"]:::client
        af["AliadoForm"]:::client
        at["AliadoTable"]:::client
        pf["ProyectoForm"]:::client
        pt["ProyectoTable"]:::client
        vf["VoluntarioForm"]:::client
        vt["VoluntarioTable"]:::client
      end
      subgraph "Hooks\n(src/Hooks)"
        json["useJsonBin"]:::client
        navhook["useNavigateTo"]:::client
      end
    end

    DevServer -->|"Serves bundled JS"| entry
    entry --> router
    router --> app
    app --> home
    app --> don
    app --> proj
    app --> vol
    home --> layout
    home --> nav
    don --> af
    don --> at
    proj --> pf
    proj --> pt
    vol --> vf
    vol --> vt
    af --> json
    at --> json
    pf --> json
    pt --> json
    vf --> json
    vt --> json
    layout --> navhook
    nav --> navhook

    json -->|"HTTP GET/POST"| JSONBin["JSON-bin Service"]:::external
    JSONBin --> json

    click entry "https://github.com/veldor09/proyecto1/blob/main/src/main.tsx"
    click router "https://github.com/veldor09/proyecto1/blob/main/src/router.tsx"
    click app "https://github.com/veldor09/proyecto1/blob/main/src/App.tsx"
    click home "https://github.com/veldor09/proyecto1/blob/main/src/Pages/HomePage.tsx"
    click don "https://github.com/veldor09/proyecto1/blob/main/src/Pages/DonacionPage.tsx"
    click proj "https://github.com/veldor09/proyecto1/blob/main/src/Pages/ProyectosPage.tsx"
    click vol "https://github.com/veldor09/proyecto1/blob/main/src/Pages/VoluntariosPage.tsx"
    click layout "https://github.com/veldor09/proyecto1/blob/main/src/Components/Layout.tsx"
    click nav "https://github.com/veldor09/proyecto1/blob/main/src/Components/NavBar.tsx"
    click af "https://github.com/veldor09/proyecto1/blob/main/src/Components/AliadoForm.tsx"
    click at "https://github.com/veldor09/proyecto1/blob/main/src/Components/AliadoTable.tsx"
    click pf "https://github.com/veldor09/proyecto1/blob/main/src/Components/ProyectoForm.tsx"
    click pt "https://github.com/veldor09/proyecto1/blob/main/src/Components/ProyectoTable.tsx"
    click vf "https://github.com/veldor09/proyecto1/blob/main/src/Components/VoluntarioForm.tsx"
    click vt "https://github.com/veldor09/proyecto1/blob/main/src/Components/VoluntarioTable.tsx"
    click json "https://github.com/veldor09/proyecto1/blob/main/src/Hooks/useJsonBin.ts"
    click navhook "https://github.com/veldor09/proyecto1/blob/main/src/Hooks/useNavigateTo.ts"

    classDef infra fill:#cdeacc,stroke:#2d7a32,stroke-width:1px
    classDef client fill:#aaccff,stroke:#1f4e79,stroke-width:1px
    classDef external fill:#f4d35e,stroke:#a6611a,stroke-width:1px
```
