# sbsawane/webscrapedemo architecture

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

- Interactive diagram: https://gitdiagram.com/sbsawane/webscrapedemo
- Repository: https://github.com/sbsawane/webscrapedemo

## Overview

##### Project Type and Purpose
- This is a lightweight full-stack demo application (WebScrapeDemo) that provides a React/TypeScript single-page UI for working with scraped data. It relies on Supabase as a back-end service (database, auth, migrations). The front end is built with Vite and styled with Tailwind CSS. There is no custom server-side code—Supabase’s hosted Postgres and Auth services fill that role.

##### File Structure Analysis
- Top level
- index.html: entry point for the SPA
- package.json / package-lock.json: node scripts, dependencies
- vite.config.ts: Vite build/dev configuration
- tailwind.config.js & postcss.config.js: styling pipelines
- tsconfig*.json: TypeScript settings
- src/
- main.tsx & App.tsx: React application bootstrap
- components/: reusable UI pieces (Navbar, Hero, Features, etc.)
- lib/supabase.ts: Supabase client initialization for API calls
- types/: shared TypeScript definitions
- supabase/
- migrations/: SQL files for evolving the Postgres schema
- config + linting (.bolt/, eslint.config.js)
- No separate “backend” directory—Supabase is the back-end.

##### README Insights
- Very brief (“WebScrapeDemo”), confirming this is a demo. No additional architecture notes; we infer usage from code and config.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend"
        direction TB
        Browser["User's Browser"]:::external
        StaticHost["Static Hosting"]:::frontend
        ReactSPA["React SPA"]:::frontend
        subgraph "SPA Code"
            direction TB
            HTML["index.html"]:::code
            MainTSX["src/main.tsx"]:::code
            AppTSX["src/App.tsx"]:::code
            Components["src/components/"]:::code
            CSS["src/index.css"]:::code
        end
    end

    %% Development Tools
    subgraph "Development Tools"
        direction TB
        ViteServer["Vite Dev Server"]:::dev
        ViteConfig["vite.config.ts"]:::code
        subgraph "Styling Pipeline"
            Tailwind["tailwind.config.js"]:::code
            PostCSS["postcss.config.js"]:::code
        end
        subgraph "TypeScript Config"
            TSConfig1["tsconfig.json"]:::code
            TSConfig2["tsconfig.app.json"]:::code
            TSConfig3["tsconfig.node.json"]:::code
            ViteEnv["src/vite-env.d.ts"]:::code
        end
        subgraph "Package & Lint"
            PackageJSON["package.json"]:::code
            PackageLock["package-lock.json"]:::code
            ESLint["eslint.config.js"]:::code
            BoltConfig[".bolt/config.json"]:::code
            BoltPrompt[".bolt/prompt"]:::code
        end
    end

    %% Supabase Services
    subgraph "Supabase Services"
        direction TB
        Auth["Supabase Auth"]:::auth
        Database["Supabase Database"]:::db
        MigrationEngine["Migration Engine"]:::dev
        Migrations["supabase/migrations/20250607090841_maroon_bar.sql"]:::code
    end

    %% Optional Scraper
    Scraper["Scraper Service / Edge Function"]:::external

    %% Relationships
    Browser -->|"GET index.html"| StaticHost
    StaticHost -->|serves SPA| Browser
    Browser -->|loads SPA| ReactSPA
    ReactSPA -->|calls Auth API| Auth
    ReactSPA -->|queries DB| Database
    ViteServer -->|serves SPA in dev| Browser
    ViteConfig -->|configures| ViteServer
    ReactSPA -->|built by| ViteServer
    Tailwind -->|styles| ReactSPA
    PostCSS -->|processes CSS| ReactSPA
    MigrationEngine -->|runs migrations| Database
    Migrations -->|defines schema| MigrationEngine
    Scraper -->|pushes data| Database

    %% Click Events
    click HTML "https://github.com/sbsawane/webscrapedemo/blob/main/index.html"
    click MainTSX "https://github.com/sbsawane/webscrapedemo/blob/main/src/main.tsx"
    click AppTSX "https://github.com/sbsawane/webscrapedemo/blob/main/src/App.tsx"
    click Components "https://github.com/sbsawane/webscrapedemo/tree/main/src/components/"
    click CSS "https://github.com/sbsawane/webscrapedemo/blob/main/src/index.css"
    click ViteConfig "https://github.com/sbsawane/webscrapedemo/blob/main/vite.config.ts"
    click Tailwind "https://github.com/sbsawane/webscrapedemo/blob/main/tailwind.config.js"
    click PostCSS "https://github.com/sbsawane/webscrapedemo/blob/main/postcss.config.js"
    click TSConfig1 "https://github.com/sbsawane/webscrapedemo/blob/main/tsconfig.json"
    click TSConfig2 "https://github.com/sbsawane/webscrapedemo/blob/main/tsconfig.app.json"
    click TSConfig3 "https://github.com/sbsawane/webscrapedemo/blob/main/tsconfig.node.json"
    click ViteEnv "https://github.com/sbsawane/webscrapedemo/blob/main/src/vite-env.d.ts"
    click PackageJSON "https://github.com/sbsawane/webscrapedemo/blob/main/package.json"
    click PackageLock "https://github.com/sbsawane/webscrapedemo/blob/main/package-lock.json"
    click ESLint "https://github.com/sbsawane/webscrapedemo/blob/main/eslint.config.js"
    click BoltConfig "https://github.com/sbsawane/webscrapedemo/blob/main/.bolt/config.json"
    click BoltPrompt "https://github.com/sbsawane/webscrapedemo/tree/main/.bolt/prompt"
    click Migrations "https://github.com/sbsawane/webscrapedemo/blob/main/supabase/migrations/20250607090841_maroon_bar.sql"

    %% Styles
    classDef frontend fill:#D0E8FF,stroke:#0366d6,color:#0366d6
    classDef dev fill:#FFF4D0,stroke:#d69e2e,color:#d69e2e
    classDef code fill:#F0F0F0,stroke:#999999,color:#333333,stroke-dasharray: 2 2
    classDef auth fill:#D5F5E3,stroke:#27AE60,color:#27AE60,shape:hexagon
    classDef db fill:#E8F8F5,stroke:#1ABC9C,color:#1ABC9C,shape:cylinder
    classDef external fill:#EFEFEF,stroke:#BBBBBB,color:#555555,stroke-dasharray: 5 5
```
