# pedrohqalves/telegram-finance-bot-landing-page architecture

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

- Interactive diagram: https://gitdiagram.com/pedrohqalves/telegram-finance-bot-landing-page
- Repository: https://github.com/pedrohqalves/telegram-finance-bot-landing-page

## Overview

##### Project type & purpose
- This is a **single‐page, frontend‐only React application** (built with Vite + TypeScript) that renders a marketing/landing site (pages: Index, NotFound) using Shadcn-UI components and Tailwind CSS for styling.
- There is no dedicated backend service in the repo; all logic lives in the browser.

##### Core file‐structure analysis
- **Root**
- Configuration: `package.json`, `vite.config.ts`, `tailwind.config.ts`, `tsconfig.json`, `eslint.config.js`, etc.
- Entry HTML: `index.html`
- **public/** – static assets (e.g., `robots.txt`) that get copied verbatim.
- **src/**
- `main.tsx` – application bootstrap (ReactDOM.render)
- `App.tsx` & `App.css` – root component + global styles
- **pages/** – page‐level route components (`Index.tsx`, `NotFound.tsx`)
- **components/** – reusable UI sections (HeroSection, FeaturesSection, etc.)
- **components/ui/** – low-level UI primitives (buttons, modals, inputs…) from shadcn-ui
- **hooks/** – custom React hooks
- **lib/** – utility functions

##### Insights from README
- Confirms tech stack: Vite, TypeScript, React, shadcn-ui, Tailwind CSS
- Describes development workflow: local dev (Vite dev server), Lovable integration, deployment

##### Main components
a. **Developer Environment**
- IDE (VSCode, GitHub Codespaces)
- Git/VCS integration
- Node.js & npm
b. **Build Toolchain**
- Vite (dev server + bundler)
- PostCSS & Tailwind CSS (styling pipeline)
- TypeScript compiler
c. **Source Code**
- `src/` folder modules (pages, components, ui primitives, hooks, utils)
d. **Static Hosting**
- Lovable’s hosting service (or any static‐site host) serving `dist/`
e. **Client Browser**
- Loads `index.html` → JavaScript bundle → renders React tree
f. **External Services (optional)**
- Analytics, CDN, any third-party scripts loaded via `<script>` in HTML

##### Relationships & interactions
- Developer edits code → Git → triggers Vite (dev or build)
- Vite reads `src/`, compiles TS → JS + CSS
- Tailwind CSS & PostCSS transform classnames → final CSS
- Output static assets → served by dev server or deployed to Lovable
- Client browser requests `index.html` → JS bundle → React mounts → uses UI primitives, hooks, pages, utils to render UI

##### Architectural patterns & design principles
- **Component‐based architecture** (React + shadcn-ui)
- **Single‐page application** with client-side routing (Index + NotFound)
- **Atomic UI**: low-level primitives in `components/ui`, composed into higher-level sections
- **Unidirectional data flow**: props down, events up (standard React)
- **Utility modules** (`lib/utils.ts`) for shared business logic

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development Layer
    subgraph "Development Environment"
        direction TB
        DevIDE["VSCode / Codespaces"]:::dev
        NodeNpm["Node.js & npm"]:::dev
        GitVC["Git/VCS"]:::dev
        Configs["Configs\n(package.json,\nvite.config.ts,\ntsconfig.json,\n…)"]:::dev
    end

    DevIDE -->|"edit code"| GitVC
    GitVC -->|"triggers build/watch"| Vite

    %% Build Pipeline Layer
    subgraph "Build Pipeline"
        direction TB
        Vite["Vite (Dev Server & Bundler)"]:::build
        TSComp["TypeScript Compiler"]:::build
        Tailwind["Tailwind CSS & PostCSS"]:::build
        Dist["dist/ (JS bundle + CSS)"]:::build
    end

    Vite -->|"compiles TS"| TSComp
    Vite -->|"processes CSS"| Tailwind
    TSComp -->|"outputs JS"| Dist
    Tailwind -->|"outputs CSS"| Dist

    %% Source Code Layer
    subgraph "Source Code (src/)"
        direction TB
        Main["main.tsx"]:::code
        App["App.tsx / App.css"]:::code
        subgraph "Pages (src/pages)"
            direction TB
            Index["Index.tsx"]:::code
            NotFound["NotFound.tsx"]:::code
        end
        subgraph "Components (src/components)"
            direction TB
            Hero["HeroSection.tsx"]:::code
            Features["FeaturesSection.tsx"]:::code
            Benefits["BenefitsSection.tsx"]:::code
            Faq["FaqSection.tsx"]:::code
            Testimonials["TestimonialsSection.tsx"]:::code
            Cta["CtaSection.tsx"]:::code
            Navbar["Navbar.tsx"]:::code
            Footer["Footer.tsx"]:::code
            ScrollTop["ScrollToTop.tsx"]:::code
            subgraph "UI Primitives (src/components/ui)"
                direction TB
                UIPrims["shadcn-ui primitives"]:::code
            end
        end
        subgraph "Hooks & Utils"
            direction TB
            Hooks["use-mobile.ts / use-toast.ts"]:::code
            Utils["utils.ts"]:::code
        end
    end

    Dist -->|"contains bundles"| Hosting

    %% Deployment Layer
    subgraph "Static Hosting"
        direction TB
        Hosting["Lovable / Static Host"]:::deploy
        Public["public/ (static assets)"]:::deploy
    end

    Public -->|"copied verbatim"| Dist
    Hosting -->|"serves via HTTP"| Browser

    %% Runtime Layer
    subgraph "Client Browser"
        direction TB
        Browser["Browser"]:::runtime
        ReactDOM["index.html → ReactDOM.render"]:::runtime
        DOM["Browser DOM"]:::runtime
    end

    Browser -->|"loads index.html"| ReactDOM
    ReactDOM -->|"mounts App"| App
    App -->|"renders Pages & Components"| Index
    App -->|"renders Pages & Components"| NotFound
    Index -->|"> uses UI Sections"| Hero
    Index -->|"…"| Features
    Index -->|"…"| Benefits
    Index -->|"…"| Faq
    Index -->|"…"| Testimonials
    Index -->|"…"| Cta
    App -->|"uses Navbar & Footer & ScrollToTop"| Navbar
    App -->|"uses Navbar & Footer & ScrollToTop"| Footer
    App -->|"uses Navbar & Footer & ScrollToTop"| ScrollTop
    UIPrims -->|"primitive props"| Hero
    Hooks -->|"hooks in components"| Hero
    Utils -->|"utils in components"| Features

    %% Click Events
    click Configs "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/package.json"
    click Configs "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/vite.config.ts"
    click Configs "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/tsconfig.json"
    click Configs "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/tailwind.config.ts"
    click Configs "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/postcss.config.js"
    click Configs "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/eslint.config.js"
    click Main "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/main.tsx"
    click App "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/App.tsx"
    click App "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/App.css"
    click Index "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/pages/Index.tsx"
    click NotFound "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/pages/NotFound.tsx"
    click Hero "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/HeroSection.tsx"
    click Features "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/FeaturesSection.tsx"
    click Benefits "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/BenefitsSection.tsx"
    click Faq "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/FaqSection.tsx"
    click Testimonials "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/TestimonialsSection.tsx"
    click Cta "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/CtaSection.tsx"
    click Navbar "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/Navbar.tsx"
    click Footer "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/Footer.tsx"
    click ScrollTop "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/components/ScrollToTop.tsx"
    click UIPrims "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/tree/main/src/components/ui/"
    click Hooks "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/hooks/use-mobile.tsx"
    click Hooks "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/hooks/use-toast.ts"
    click Utils "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/src/lib/utils.ts"
    click Public "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/tree/main/public/"
    click Public "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/blob/main/public/robots.txt"
    click Dist "https://github.com/pedrohqalves/telegram-finance-bot-landing-page/tree/main/dist/"

    %% Styles
    classDef dev fill:#D0E8FF,stroke:#6BA4FF,color:#000
    classDef build fill:#FFE6C1,stroke:#FFB957,color:#000
    classDef deploy fill:#D7F0D6,stroke:#7FCF73,color:#000
    classDef runtime fill:#E5D1FF,stroke:#B48FD4,color:#000
    classDef code fill:#F5F5F5,stroke:#CCCCCC,color:#000,stroke-dasharray: 2 2
```
