# pallavimshr/deepsoul architecture

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

- Interactive diagram: https://gitdiagram.com/pallavimshr/deepsoul
- Repository: https://github.com/pallavimshr/deepsoul

## Overview

##### Project type and purpose
- DeepSoul is a single-page React application (SPA) that serves as a static marketing/site portal with themed UI sections (hero, therapy, self-help, resources).
- It is delivered via static hosting (Netlify) and runs entirely in the browser, with no dedicated backend service beyond localStorage for persisting theme preference.

##### File structure
- Top-level config files: package.json, tailwind.config.js, postcss.config.js → define dependencies, build/post-CSS rules for Tailwind CSS.
- public/ → static assets (HTML shell, images).
- src/ → React application code:
- index.js → app entry point
- App.js → root component
- components/ → UI widgets (Header, Footer, HeroSection, TherapySection, SelfHelp, Resources, ArticleCard, ResourceCard, ScrollToTopButton)
- context/themeContext.js → React Context provider for light/dark mode, backed by localStorage
- CSS files and test harnesses (App.test.js, setupTests.js, reportWebVitals.js)

##### README for additional insights
- Tech stack: React, JavaScript, Tailwind CSS, React Context API
- Live deployment on Netlify
- Features: theme toggle (persisted in localStorage), scroll-to-top button
- Core UI sections enumerated to match component tree

## Diagram (Mermaid)

```mermaid
flowchart TB
  %% Build & Deployment Pipeline
  subgraph "Build & Deployment Pipeline"
    Pkg["package.json"]:::build
    PostCSS["postcss.config.js"]:::build
    Tailwind["tailwind.config.js"]:::build
    BuildCmd["npm run build"]:::build
    Assets["JS/CSS bundles & HTML"]:::build
    Pkg -->|defines deps & scripts| BuildCmd
    PostCSS -->|configures CSS| BuildCmd
    Tailwind -->|configures CSS| BuildCmd
    BuildCmd -->|outputs| Assets
  end

  %% Static Hosting / CDN
  Assets -->|deployed to| Netlify["Netlify CDN"]:::hosting
  subgraph "Static Hosting / CDN"
    PublicHTML["index.html"]:::hosting
    Images["public/images"]:::hosting
    Netlify -->|serves| PublicHTML
    Netlify -->|serves| Images
  end

  %% Client / Browser Runtime
  PublicHTML -->|loads bundles| Entry["src/index.js"]:::client
  subgraph "Client / Browser"
    subgraph "React Application"
      Entry -->|renders| App["src/App.js"]:::client
      App -->|provides| ThemeCtx["ThemeContext"]:::client
      App -->|renders| Header["Header"]:::client
      App -->|renders| HeroSection["HeroSection"]:::client
      App -->|renders| TherapySection["TherapySection"]:::client
      App -->|renders| SelfHelp["SelfHelp"]:::client
      App -->|renders| Resources["Resources"]:::client
      App -->|renders| Footer["Footer"]:::client
      App -->|renders| ScrollBtn["ScrollToTopButton"]:::client
      ThemeCtx -->|reads/writes| LocalStorage["localStorage"]:::client
      ScrollEvents["scroll events"]:::client -->|triggers| ScrollBtn
      Resources -->|uses| ArticleCard["ArticleCard"]:::client
      Resources -->|uses| ResourceCard["ResourceCard"]:::client
      Styles["src/index.css"]:::client
      Entry -->|imports| Styles
    end
  end

  %% Click Events
  click Pkg "https://github.com/pallavimshr/deepsoul/blob/master/package.json"
  click PostCSS "https://github.com/pallavimshr/deepsoul/blob/master/postcss.config.js"
  click Tailwind "https://github.com/pallavimshr/deepsoul/blob/master/tailwind.config.js"
  click PublicHTML "https://github.com/pallavimshr/deepsoul/blob/master/public/index.html"
  click Images "https://github.com/pallavimshr/deepsoul/tree/master/public/images/"
  click Entry "https://github.com/pallavimshr/deepsoul/blob/master/src/index.js"
  click App "https://github.com/pallavimshr/deepsoul/blob/master/src/App.js"
  click ThemeCtx "https://github.com/pallavimshr/deepsoul/blob/master/src/context/themeContext.js"
  click Header "https://github.com/pallavimshr/deepsoul/blob/master/src/components/header.js"
  click Footer "https://github.com/pallavimshr/deepsoul/blob/master/src/components/footer.js"
  click HeroSection "https://github.com/pallavimshr/deepsoul/blob/master/src/components/heroSection.js"
  click TherapySection "https://github.com/pallavimshr/deepsoul/blob/master/src/components/therapySection.js"
  click SelfHelp "https://github.com/pallavimshr/deepsoul/blob/master/src/components/selfHelp.js"
  click Resources "https://github.com/pallavimshr/deepsoul/blob/master/src/components/resources.js"
  click ArticleCard "https://github.com/pallavimshr/deepsoul/blob/master/src/components/articleCard.js"
  click ResourceCard "https://github.com/pallavimshr/deepsoul/blob/master/src/components/resourceCard.js"
  click ScrollBtn "https://github.com/pallavimshr/deepsoul/blob/master/src/components/scrollToTopButton.js"
  click Styles "https://github.com/pallavimshr/deepsoul/blob/master/src/index.css"

  %% Styles
  classDef build fill:#eeeeee,stroke:#666666,color:#000000
  classDef hosting fill:#cce5ff,stroke:#004085,color:#000000
  classDef client fill:#d4edda,stroke:#155724,color:#000000
```
