# ekthar/manjal architecture

> Architecture diagram of the GitHub repository ekthar/manjal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ekthar/manjal
- Repository: https://github.com/ekthar/manjal

## Overview

1. This repository is a Vite-based React + TypeScript single-page marketing site, likely for a medical/wellness brand. It is entirely frontend-focused: there is no backend, API layer, or database code in the repo.

2. The application entry path is the standard Vite flow: `index.html` loads `src/main.tsx`, which mounts the React app from `src/index.tsx` and applies the global stylesheet from `src/index.css`. This is the root of the runtime architecture.

3. The UI is assembled from a set of feature-oriented components in `src/components`. The main page appears to be composed of themed sections such as `Hero`, `Doctors`, `AllServices`, `Therapies`, `Consultation`, `HospitalDetails`, `AboutGallery`, and `ChakraList`, plus shared navigation/utility pieces like `Navbar`, `FloatingDock`, `ScrollReveal`, `SectionDivider`, `LoadingIntro`, `FloatingParticles`, and `MeditatingSilhouette`.

4. The page structure is likely one long scroll experience with anchored sections rather than route-based navigation. The presence of `Navbar`, `FloatingDock`, and `ScrollReveal` suggests the main interactions are section jumping, animated reveals on scroll, and persistent quick-navigation controls.

5. Content and configuration are separated from presentation. `src/constants.ts` likely holds copy, section labels, and shared data used by multiple components, while `src/types.ts` defines the shared TypeScript shapes for that content. This keeps the section components mostly presentational.

6. Visual styling is split across Tailwind and targeted CSS. Tailwind is configured in `tailwind.config.cjs`, PostCSS in `postcss.config.cjs`, and global styling lives in `src/index.css`. A dedicated `src/styles/gallery.css` indicates the gallery has custom layout/animation rules beyond the general site styles.

7. The assets are heavily static and prebuilt. `public/` contains the custom font (`Priestacy.otf`), treatment assets, and a large responsive gallery in AVIF formats at multiple sizes (`-400`, `-800`, `-1200`). That implies the site is optimized for fast asset delivery and image-responsive presentation without server-side processing.

8. Media preparation is handled by repo scripts rather than runtime code. `scripts/prepare-gallery-images.mjs` and `scripts/optimize-svgs.mjs` suggest a build-time content pipeline that converts/optimizes gallery media and SVG assets before they are served from `public/`.

9. The `public/gallery-src` and `public/gallery` split shows a source/derived asset boundary. The source directory appears to hold original media, while `public/gallery` contains the generated web-ready variants consumed by the gallery UI.

10. The build/tooling layer is standard modern frontend tooling: Vite for bundling/dev server, TypeScript for type safety, Tailwind/PostCSS for styling, and ESLint for code quality. The architecture is optimized for local static development and production asset bundling, not for server orchestration.

11. `metadata.json` and the asset-heavy public structure suggest the site likely includes SEO/social metadata and image-driven sections, but those are still delivered as static files from the frontend build.

12. Overall architecture: a static, componentized React presentation site with a strong content/asset pipeline. The main data flow is from constants/types and preprocessed public assets into section components, then into a single scrollable UI with animation and navigation helpers.

Main entry points: [`src/index.tsx`](https://github.com/ekthar/manjal/blob/main/src/index.tsx) (index.tsx), [`src/components/AboutGallery.tsx`](https://github.com/ekthar/manjal/blob/main/src/components/AboutGallery.tsx) (About Gallery), [`src/main.tsx`](https://github.com/ekthar/manjal/blob/main/src/main.tsx) (main.tsx), [`src/constants.ts`](https://github.com/ekthar/manjal/blob/main/src/constants.ts) (constants.ts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_index_html["index.html<br/>app shell<br/>[index.html]"]
  node_main_tsx["main.tsx<br/>bootstrap<br/>[main.tsx]"]
  node_index_tsx["index.tsx<br/>root app<br/>[index.tsx]"]
end

subgraph group_ui["UI"]
  node_hero["Hero<br/>section<br/>[Hero.tsx]"]
  node_services["All Services<br/>section<br/>[AllServices.tsx]"]
  node_doctors["Doctors<br/>section<br/>[Doctors.tsx]"]
  node_therapies["Therapies<br/>section<br/>[Therapies.tsx]"]
  node_consultation["Consultation<br/>section<br/>[Consultation.tsx]"]
  node_hospital["Hospital Details<br/>section"]
  node_gallery["About Gallery<br/>section<br/>[AboutGallery.tsx]"]
  node_chakras["Chakra List<br/>section<br/>[ChakraList.tsx]"]
  node_nav["Navbar<br/>navigation<br/>[Navbar.tsx]"]
  node_dock["Floating Dock<br/>quick nav<br/>[FloatingDock.tsx]"]
  node_reveal["Scroll Reveal<br/>animation<br/>[ScrollReveal.tsx]"]
  node_intro["Loading Intro<br/>overlay<br/>[LoadingIntro.tsx]"]
  node_particles(("Floating Particles<br/>visual effect"))
  node_silhouette(("Silhouette<br/>decorative art"))
end

subgraph group_content["Content"]
  node_constants["constants.ts<br/>content map<br/>[constants.ts]"]
  node_types["types.ts<br/>shared types<br/>[types.ts]"]
  node_styles["index.css<br/>global styles<br/>[index.css]"]
  node_gallery_css["gallery.css<br/>gallery styles<br/>[gallery.css]"]
end

subgraph group_assets["Assets"]
  node_gallery_public[("public/gallery<br/>derived media")]
  node_gallery_src[("gallery-src<br/>source media")]
  node_treatments[("treatments<br/>static assets")]
  node_font["Priestacy.otf<br/>font asset<br/>[Priestacy.otf]"]
end

subgraph group_tooling["Tooling"]
  node_prepare_gallery["prepare-gallery<br/>media pipeline"]
  node_optimize_svgs["optimize-svgs<br/>asset pipeline<br/>[optimize-svgs.mjs]"]
  node_vite_config["vite.config.ts<br/>build config<br/>[vite.config.ts]"]
  node_tailwind_config["tailwind.config.cjs<br/>style config"]
  node_postcss_config["postcss.config.cjs<br/>style config<br/>[postcss.config.cjs]"]
  node_eslint_config["eslint.config.js<br/>lint config<br/>[eslint.config.js]"]
end

node_index_html -->|"loads"| node_main_tsx
node_main_tsx -->|"mounts"| node_index_tsx
node_index_tsx -->|"composes"| node_hero
node_index_tsx -->|"composes"| node_services
node_index_tsx -->|"composes"| node_doctors
node_index_tsx -->|"composes"| node_therapies
node_index_tsx -->|"composes"| node_consultation
node_index_tsx -->|"composes"| node_hospital
node_index_tsx -->|"composes"| node_gallery
node_index_tsx -->|"composes"| node_chakras
node_index_tsx -->|"uses"| node_nav
node_index_tsx -->|"uses"| node_dock
node_index_tsx -->|"uses"| node_intro
node_index_tsx -->|"decorates"| node_particles
node_index_tsx -->|"decorates"| node_silhouette
node_index_tsx -->|"wraps"| node_reveal
node_index_tsx -->|"reads"| node_constants
node_index_tsx -->|"styles"| node_styles
node_gallery -->|"renders"| node_gallery_public
node_gallery -->|"styles"| node_gallery_css
node_gallery -->|"reads"| node_constants
node_constants -->|"typed by"| node_types
node_gallery_public -.->|"generated from"| node_gallery_src
node_prepare_gallery -->|"processes"| node_gallery_src
node_prepare_gallery -->|"outputs"| node_gallery_public
node_optimize_svgs -->|"processes"| node_treatments
node_index_tsx -->|"loads"| node_font
node_vite_config -->|"bundles"| node_main_tsx
node_tailwind_config -->|"configures"| node_styles
node_postcss_config -->|"processes"| node_styles
node_eslint_config -.->|"checks"| node_index_tsx

click node_index_html "https://github.com/ekthar/manjal/blob/main/index.html"
click node_main_tsx "https://github.com/ekthar/manjal/blob/main/src/main.tsx"
click node_index_tsx "https://github.com/ekthar/manjal/blob/main/src/index.tsx"
click node_hero "https://github.com/ekthar/manjal/blob/main/src/components/Hero.tsx"
click node_services "https://github.com/ekthar/manjal/blob/main/src/components/AllServices.tsx"
click node_doctors "https://github.com/ekthar/manjal/blob/main/src/components/Doctors.tsx"
click node_therapies "https://github.com/ekthar/manjal/blob/main/src/components/Therapies.tsx"
click node_consultation "https://github.com/ekthar/manjal/blob/main/src/components/Consultation.tsx"
click node_hospital "https://github.com/ekthar/manjal/blob/main/src/components/HospitalDetails.tsx"
click node_gallery "https://github.com/ekthar/manjal/blob/main/src/components/AboutGallery.tsx"
click node_chakras "https://github.com/ekthar/manjal/blob/main/src/components/ChakraList.tsx"
click node_nav "https://github.com/ekthar/manjal/blob/main/src/components/Navbar.tsx"
click node_dock "https://github.com/ekthar/manjal/blob/main/src/components/FloatingDock.tsx"
click node_reveal "https://github.com/ekthar/manjal/blob/main/src/components/ScrollReveal.tsx"
click node_intro "https://github.com/ekthar/manjal/blob/main/src/components/LoadingIntro.tsx"
click node_particles "https://github.com/ekthar/manjal/blob/main/src/components/FloatingParticles.tsx"
click node_silhouette "https://github.com/ekthar/manjal/blob/main/src/components/MeditatingSilhouette.tsx"
click node_constants "https://github.com/ekthar/manjal/blob/main/src/constants.ts"
click node_types "https://github.com/ekthar/manjal/blob/main/src/types.ts"
click node_styles "https://github.com/ekthar/manjal/blob/main/src/index.css"
click node_gallery_css "https://github.com/ekthar/manjal/blob/main/src/styles/gallery.css"
click node_gallery_public "https://github.com/ekthar/manjal/tree/main/public/gallery"
click node_gallery_src "https://github.com/ekthar/manjal/tree/main/public/gallery-src"
click node_treatments "https://github.com/ekthar/manjal/tree/main/public/assets/treatments"
click node_font "https://github.com/ekthar/manjal/blob/main/public/Priestacy.otf"
click node_prepare_gallery "https://github.com/ekthar/manjal/blob/main/scripts/prepare-gallery-images.mjs"
click node_optimize_svgs "https://github.com/ekthar/manjal/blob/main/scripts/optimize-svgs.mjs"
click node_vite_config "https://github.com/ekthar/manjal/blob/main/vite.config.ts"
click node_tailwind_config "https://github.com/ekthar/manjal/blob/main/tailwind.config.cjs"
click node_postcss_config "https://github.com/ekthar/manjal/blob/main/postcss.config.cjs"
click node_eslint_config "https://github.com/ekthar/manjal/blob/main/eslint.config.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_index_html,node_main_tsx,node_index_tsx toneBlue
class node_hero,node_services,node_doctors,node_therapies,node_consultation,node_hospital,node_gallery,node_chakras,node_nav,node_dock,node_reveal,node_intro,node_particles,node_silhouette toneAmber
class node_constants,node_types,node_styles,node_gallery_css toneMint
class node_gallery_public,node_gallery_src,node_treatments,node_font toneRose
class node_prepare_gallery,node_optimize_svgs,node_vite_config,node_tailwind_config,node_postcss_config,node_eslint_config toneIndigo
```

## Components

### Runtime

Vite entry and React app composition

- [index.html](https://github.com/ekthar/manjal/blob/main/index.html): app shell · Vite entry document that loads the React bundle · `index.html`
- [main.tsx](https://github.com/ekthar/manjal/blob/main/src/main.tsx): bootstrap · Browser entry that mounts the application · `src/main.tsx`
- [index.tsx](https://github.com/ekthar/manjal/blob/main/src/index.tsx): root app · Top-level React composition for the single-page experience · `src/index.tsx`

### UI

Section components and shared presentation pieces

- [Hero](https://github.com/ekthar/manjal/blob/main/src/components/Hero.tsx): section · Landing section and first visual impression · `src/components/Hero.tsx`
- [All Services](https://github.com/ekthar/manjal/blob/main/src/components/AllServices.tsx): section · Overview of available offerings · `src/components/AllServices.tsx`
- [Doctors](https://github.com/ekthar/manjal/blob/main/src/components/Doctors.tsx): section · Provider and team presentation · `src/components/Doctors.tsx`
- [Therapies](https://github.com/ekthar/manjal/blob/main/src/components/Therapies.tsx): section · Therapy and treatment content block · `src/components/Therapies.tsx`
- [Consultation](https://github.com/ekthar/manjal/blob/main/src/components/Consultation.tsx): section · Appointment and consultation call to action · `src/components/Consultation.tsx`
- [Hospital Details](https://github.com/ekthar/manjal/blob/main/src/components/HospitalDetails.tsx): section · Facility and location information · `src/components/HospitalDetails.tsx`
- [About Gallery](https://github.com/ekthar/manjal/blob/main/src/components/AboutGallery.tsx): section · Image-driven gallery and brand storytelling · `src/components/AboutGallery.tsx`
- [Chakra List](https://github.com/ekthar/manjal/blob/main/src/components/ChakraList.tsx): section · Specialized content list for the site narrative · `src/components/ChakraList.tsx`
- [Navbar](https://github.com/ekthar/manjal/blob/main/src/components/Navbar.tsx): navigation · Primary section navigation · `src/components/Navbar.tsx`
- [Floating Dock](https://github.com/ekthar/manjal/blob/main/src/components/FloatingDock.tsx): quick nav · Persistent shortcut navigation for the long scroll page · `src/components/FloatingDock.tsx`
- [Scroll Reveal](https://github.com/ekthar/manjal/blob/main/src/components/ScrollReveal.tsx): animation · Scroll-triggered reveal wrapper for sections · `src/components/ScrollReveal.tsx`
- [Loading Intro](https://github.com/ekthar/manjal/blob/main/src/components/LoadingIntro.tsx): overlay · Initial loading or entrance sequence · `src/components/LoadingIntro.tsx`
- [Floating Particles](https://github.com/ekthar/manjal/blob/main/src/components/FloatingParticles.tsx): visual effect · Ambient background motion layer · `src/components/FloatingParticles.tsx`
- [Silhouette](https://github.com/ekthar/manjal/blob/main/src/components/MeditatingSilhouette.tsx): decorative art · Hero-area decorative illustration element · `src/components/MeditatingSilhouette.tsx`

### Content

Static data, types, and styling

- [constants.ts](https://github.com/ekthar/manjal/blob/main/src/constants.ts): content map · Shared copy and section data consumed by the UI · `src/constants.ts`
- [types.ts](https://github.com/ekthar/manjal/blob/main/src/types.ts): shared types · TypeScript shapes for structured site content · `src/types.ts`
- [index.css](https://github.com/ekthar/manjal/blob/main/src/index.css): global styles · Site-wide stylesheet layered with Tailwind · `src/index.css`
- [gallery.css](https://github.com/ekthar/manjal/blob/main/src/styles/gallery.css): gallery styles · Custom styles for gallery layout and motion · `src/styles/gallery.css`

### Assets

Prebuilt public media and source gallery inputs

- [public/gallery](https://github.com/ekthar/manjal/tree/main/public/gallery): derived media · Responsive AVIF gallery variants served to the UI · `public/gallery`
- [gallery-src](https://github.com/ekthar/manjal/tree/main/public/gallery-src): source media · Original gallery media used to generate public variants · `public/gallery-src`
- [treatments](https://github.com/ekthar/manjal/tree/main/public/assets/treatments): static assets · Treatment imagery and supporting public media · `public/assets/treatments`
- [Priestacy.otf](https://github.com/ekthar/manjal/blob/main/public/Priestacy.otf): font asset · Custom brand font shipped from public assets · `public/Priestacy.otf`

### Tooling

Build, lint, and media preparation scripts

- [prepare-gallery](https://github.com/ekthar/manjal/blob/main/scripts/prepare-gallery-images.mjs): media pipeline · Build-time gallery image preparation script · `scripts/prepare-gallery-images.mjs`
- [optimize-svgs](https://github.com/ekthar/manjal/blob/main/scripts/optimize-svgs.mjs): asset pipeline · Build-time SVG optimization script · `scripts/optimize-svgs.mjs`
- [vite.config.ts](https://github.com/ekthar/manjal/blob/main/vite.config.ts): build config · Vite bundling and dev-server configuration · `vite.config.ts`
- [tailwind.config.cjs](https://github.com/ekthar/manjal/blob/main/tailwind.config.cjs): style config · Tailwind theme and content configuration · `tailwind.config.cjs`
- [postcss.config.cjs](https://github.com/ekthar/manjal/blob/main/postcss.config.cjs): style config · PostCSS pipeline configuration · `postcss.config.cjs`
- [eslint.config.js](https://github.com/ekthar/manjal/blob/main/eslint.config.js): lint config · Linting rules for the frontend codebase · `eslint.config.js`

## Connections

- index.html → main.tsx: loads · HTML bootstraps the Vite React entry
- main.tsx → index.tsx: mounts · Main entry renders the app root
- index.tsx → Hero: composes · Root page includes the hero section
- index.tsx → All Services: composes · Root page includes the services section
- index.tsx → Doctors: composes · Root page includes the doctors section
- index.tsx → Therapies: composes · Root page includes the therapies section
- index.tsx → Consultation: composes · Root page includes the consultation section
- index.tsx → Hospital Details: composes · Root page includes facility details
- index.tsx → About Gallery: composes · Root page includes the gallery section
- index.tsx → Chakra List: composes · Root page includes the chakra content block
- index.tsx → Navbar: uses · Root page includes primary navigation
- index.tsx → Floating Dock: uses · Root page includes floating quick navigation
- index.tsx → Loading Intro: uses · Root page includes the loading intro
- index.tsx → Floating Particles: decorates · Background motion layer enhances the page
- index.tsx → Silhouette: decorates · Decorative art supports the hero section
- index.tsx → Scroll Reveal: wraps · Sections animate through scroll reveal
- index.tsx → constants.ts: reads · Page content is driven by shared constants
- index.tsx → index.css: styles · Application uses the global stylesheet
- About Gallery → public/gallery: renders · Gallery UI consumes generated responsive images
- About Gallery → gallery.css: styles · Gallery section uses dedicated CSS rules
- About Gallery → constants.ts: reads · Gallery content is sourced from shared data
- constants.ts → types.ts: typed by · Structured content follows shared TypeScript types
- public/gallery → gallery-src: generated from · Web-ready gallery assets are derived from source media
- prepare-gallery → gallery-src: processes · Script prepares original gallery inputs
- prepare-gallery → public/gallery: outputs · Script generates the responsive gallery variants
- optimize-svgs → treatments: processes · Script optimizes shipped asset files
- index.tsx → Priestacy.otf: loads · Application uses the bundled custom font
- vite.config.ts → main.tsx: bundles · Vite config targets the React entry
- tailwind.config.cjs → index.css: configures · Tailwind works with the global stylesheet
- postcss.config.cjs → index.css: processes · PostCSS transforms site styles
- eslint.config.js → index.tsx: checks · Linting covers the application source
