# jumbojhon04/proyectomycs architecture

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

- Interactive diagram: https://gitdiagram.com/jumbojhon04/proyectomycs
- Repository: https://github.com/jumbojhon04/proyectomycs

## Overview

##### Project type and purpose
- This is not a multi-service or microservices system but a static, content-driven tourism website (“ProyectoMyCS”) designed to showcase destinations in Napo Province.
- It uses only frontend technologies (HTML/CSS/JS/Bootstrap) plus a simple PHP contact-form endpoint and a JSON data file.

##### File structure
- Top-level HTML pages: index.html, about.html, destinos/*.html, hoteles.html, etc.
- css/ – compiled CSS (style.css)
- scss/ – source SCSS/bootstrap overrides and custom styles
- js/ – application scripts (main.js reads hoteles-napo.json; hoteles-napo.json holds hotel data)
- lib/ – third-party JS/CSS libraries (OwlCarousel, Tempusdominus, easing)
- img/ and imgDestinos/ – static images and destination pictures
- mail/ – contact.js (front-end AJAX), contact.php (server-side mail handler)
- No database—data is static JSON or hard-coded in HTML.

##### README for additional insights
- Project is part of a GitFlow exercise: branches for features, releases, hotfixes.
- Build process: SCSS compilation (likely via a local tool) produces css/style.css.
- Deployment target: any PHP-enabled web server (to service the contact.php).

- Client Browser (UI)
- Static Web Server (hosting HTML/CSS/JS/images/JSON)
- Build Tool (SCSS → CSS compiler)
- Mail Handler (contact.php + SMTP or mail system)
- GitFlow Repository (version control with main, develop, feature branches)

b. Relationships & interactions:
- Browser → HTTP GET → Web Server → serves HTML/CSS/JS/images/JSON
- main.js in browser → reads hoteles-napo.json → renders listings
- contact.js → AJAX POST → contact.php on server → SMTP mail delivery
- Developer Machine → SCSS compiler → output style.css → committed to Git
- Developers ↔ GitHub using GitFlow → deploy stable main to Production Server

c. Architectural patterns & principles:
- Two-tier static architecture (Presentation + Static Data)
- Build-time preprocessing (SCSS) separated from run-time (no client bundler shown, but could be added)
- Single API endpoint pattern for contact form

d. Key technologies & libraries:
- Bootstrap (CSS framework)
- jQuery / easing.js / OwlCarousel / Tempusdominus (UI components)
- PHP mail script (contact.php)
- JSON as lightweight data store (hoteles-napo.json)
- GitFlow for source control

##### Diagramming recommendations
- Use clear, consistent labels: e.g., “Browser (Chrome/Firefox)”, “Web Server (Apache/Nginx + PHP)”, “SCSS Compiler”, “SMTP Server”.
- Browser → GET /index.html → Web Server
- Browser → GET /js/main.js → Web Server
- Browser (main.js) → fetch hoteles-napo.json → Web Server
- Browser (contact.js) → POST /mail/contact.php → Web Server → SMTP
- Developer → push/pull → GitHub (branches)
- Developer → compile → SCSS → CSS
- Rectangles for runtime components (Browser, Web Server)
- Parallelograms for code/artifacts (SCSS, CSS, JS)
- Clouds or envelopes for external SMTP service

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        direction TB
        DevMachine["Developer Machine"]:::dev
        SCSS_Src["scss/ (SCSS Source)"]:::artifact
        SCSS_Compiler["SCSS Compiler"]:::dev
        CSS_Output["css/style.css"]:::artifact
        GitHub["GitFlow Repository"]:::repo
        DevMachine -->|"edits SCSS/JS/HTML"| SCSS_Src
        SCSS_Src -->|"compile"| SCSS_Compiler
        SCSS_Compiler -->|"outputs"| CSS_Output
        CSS_Output -->|"commit"| GitHub
        DevMachine -->|"push/pull branches"| GitHub
    end

    %% Production Runtime
    subgraph "Production Runtime"
        direction TB
        Browser["Client Browser (Chrome/Firefox)"]:::runtime
        WebServer["Web Server (Apache/Nginx + PHP)"]:::runtime
        SMTP["SMTP Server"]:::mail

        Browser -->|"GET /index.html, about.html, destinos/*.html, etc."| WebServer
        Browser -->|"GET /css/style.css"| WebServer
        Browser -->|"GET /js/main.js"| WebServer
        Browser -->|"fetch hoteles-napo.json"| WebServer
        Browser -->|"AJAX POST /mail/contact.php"| WebServer

        WebServer -->|"serves static assets"| StaticAssets
        WebServer -->|"executes PHP"| ContactPHP
        ContactPHP -->|"send email"| SMTP
    end

    %% Static Assets Group
    subgraph "Static Assets" 
        direction TB
        HTML_Pages["Static HTML Pages"]:::artifact
        CSS_File["css/style.css"]:::artifact
        JS_App["js/main.js"]:::artifact
        JSON_Data["js/hoteles-napo.json"]:::data
        ContactJS["mail/contact.js"]:::artifact
        ContactPHP["mail/contact.php"]:::mail
        Libs["lib/ (easing, owlcarousel, tempusdominus)"]:::artifact
        Images["img/ and imgDestinos/"]:::artifact

        StaticAssets --> HTML_Pages
        StaticAssets --> CSS_File
        StaticAssets --> JS_App
        StaticAssets --> JSON_Data
        StaticAssets --> ContactJS
        StaticAssets --> ContactPHP
        StaticAssets --> Libs
        StaticAssets --> Images
    end

    %% Deployment Flow
    GitHub -->|"deploy main branch"| WebServer

    %% Click Events
    click SCSS_Src "https://github.com/jumbojhon04/proyectomycs/tree/main/scss/"
    click CSS_Output "https://github.com/jumbojhon04/proyectomycs/blob/main/css/style.css"
    click JS_App "https://github.com/jumbojhon04/proyectomycs/blob/main/js/main.js"
    click JSON_Data "https://github.com/jumbojhon04/proyectomycs/blob/main/js/hoteles-napo.json"
    click ContactJS "https://github.com/jumbojhon04/proyectomycs/blob/main/mail/contact.js"
    click ContactPHP "https://github.com/jumbojhon04/proyectomycs/blob/main/mail/contact.php"
    click Libs "https://github.com/jumbojhon04/proyectomycs/tree/main/lib/"
    click Images "https://github.com/jumbojhon04/proyectomycs/tree/main/img/"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/index.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/about.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/tree/main/destinos/"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/hoteles.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/hotel-detalle.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/contact.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/blog.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/guide.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/service.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/single.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/testimonial.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/destination.html"
    click HTML_Pages "https://github.com/jumbojhon04/proyectomycs/blob/main/package.html"
    click GitHub "https://github.com/jumbojhon04/proyectomycs/blob/main/.gitignore"
    click GitHub "https://github.com/jumbojhon04/proyectomycs/blob/main/readme.md"
    click GitHub "https://github.com/jumbojhon04/proyectomycs/blob/main/CONTRIBUTING.md"
    click GitHub "https://github.com/jumbojhon04/proyectomycs/blob/main/LICENSE.txt"

    %% Styles
    classDef dev fill:#E3F2FD,stroke:#90CAF9
    classDef runtime fill:#E8F5E9,stroke:#66BB6A
    classDef artifact fill:#FFF3E0,stroke:#FFB74D
    classDef data fill:#FCE4EC,stroke:#F06292
    classDef repo fill:#FFF9C4,stroke:#FFEE58
    classDef mail fill:#EDE7F6,stroke:#9575CD
```
