# oliveberch/marketingpitch architecture

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

- Interactive diagram: https://gitdiagram.com/oliveberch/marketingpitch
- Repository: https://github.com/oliveberch/marketingpitch

## Overview

##### Project type and purpose
- This is a lightweight, client-side web application (“Marketing Pitch Generator”) whose sole function is to collect product details in the browser, call out to an AI/ML service, and display the generated marketing pitch in real time.

##### File structure
- Top level files only—no separate “backend” folder—indicates a purely front-end, static-hosted site.
- index.html: main UI shell
- style.css: all presentation logic
- script.js: client-side logic, event handlers, API requests
- env.js: holds configuration (e.g. API key or endpoint URL)
- LICENSE / Readme.md: metadata, not runtime

##### README for additional insights
- Describes features (real-time AI integration, responsive UI).
- Technology stack: HTML5/CSS3, vanilla JavaScript, Normalize.css, Google Fonts, external AI/ML service.
- No mention of in-house backend—implies client → third-party AI API calls.

##### Final advice
- Be detailed but concise: break the front-end into UI vs. logic vs. config, then show the single external dependency.
- Processing steps—don’t skip the env.js configuration lookup.
- “Where is the code?”
- “What talks to what?”
- “Which part is third-party?”

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Users
    User(("User")):::user

    subgraph "Client Browser"
        direction TB
        Index["UI Layer<br/>(index.html)"]:::client
        Style["Presentation Layer<br/>(style.css, Normalize.css, Google Fonts)"]:::client
        Config["Configuration Module<br/>(env.js)"]:::config
        Logic["Logic Layer<br/>(script.js)"]:::client
    end

    ExternalAI["External AI Service"]:::external

    %% Flows
    User -->|"fillProductDetails()"| Index
    Index -->|"onInput() (DOM events)"| Logic
    Logic -->|"readConfig()"| Config
    Logic -->|"POST /generatePitch"| ExternalAI
    ExternalAI -->|"generatedPitchResponse"| Logic
    Logic -->|"displayResponse()"| Index

    %% Click events
    click Index "https://github.com/oliveberch/marketingpitch/blob/main/index.html"
    click Style "https://github.com/oliveberch/marketingpitch/blob/main/style.css"
    click Config "https://github.com/oliveberch/marketingpitch/blob/main/env.js"
    click Logic "https://github.com/oliveberch/marketingpitch/blob/main/script.js"

    %% Styles
    classDef client fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef config fill:#90EE90,stroke:#333,stroke-width:1px
    classDef external fill:#FFA500,stroke:#333,stroke-width:1px
    classDef user fill:#FFFACD,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
```
