# pavanvtalix/fbitest architecture

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

- Interactive diagram: https://gitdiagram.com/pavanvtalix/fbitest
- Repository: https://github.com/pavanvtalix/fbitest

## Overview

1. This repository is a single-page React application built with Vite. It appears to be the Vtalix website: a marketing/engagement site with informational pages, lead capture, questionnaires, and appointment-related flows rather than a server-rendered app.

2. The top-level shell is centered around `src/main.jsx`, `src/App.jsx`, and `src/modules/static/index.jsx`, which likely assemble routing, providers, and global layout. The app is structured as route-driven pages rather than a deeply nested feature app.

3. The main product area lives under `src/modules/static`. That module contains the core pages: `Homepage`, `Contact`, `Privacy`, `TermsAndConditions`, `ResourcesEmergency`, `QnA`, `Thankyou`, and `Xtra`, plus many assessment/test pages such as `DASS_test`, `GSES_test`, `PSS_test`, `WHO_test`, `UWES_test`, and others. This indicates a flow where users move from landing content into questionnaire-style assessment screens and then into follow-up pages.

4. UI composition is split into reusable layout pieces in `src/modules/static/components` and `sub-components`. There are distinct header/footer pieces, chatbot popup, FAQ/QnA shared UI, thank-you states, and specialized home-page sections like banner, care, how-it-works, gift, FAQ, brand section, and comparison tables. This suggests a modular landing-page architecture with shared branded components across routes.

5. There is a clear consultation/contact boundary. `Contact` is backed by `ContactHero` and `ContactForm`, which likely form the primary user-facing lead capture flow. `QnA`, `QnAShared`, and `commentData.js` suggest a reusable question-and-answer experience that may feed into support, screening, or user onboarding.

6. The state/data layer is Redux-based and split by domain. Slices such as `authSlice`, `userSlice`, `patientSlice`, `appointmentSlice`, `slotsSlice`, `querySlice`, and `answerSlice` indicate multiple business workflows: authentication, patient/user identity, scheduling, question intake, and answer persistence. `src/redux/axiosInstance.js` likely centralizes API calls to an external backend.

7. Persistence and session handling are handled separately from UI. `persistConfig.js` suggests Redux state survives refreshes, while `src/utils/tokenManager.js` likely manages auth tokens and `src/utils/paymentStateManager.js` manages checkout/payment lifecycle. This implies the frontend orchestrates stateful workflows across page transitions and reloads.

8. Analytics and tracking are first-class concerns. `src/providers/GTMProvider` and `TrackPageView.jsx` indicate Google Tag Manager page-view tracking is wired into the app shell. The README also includes a Meta Pixel snippet for Facebook tracking, implying marketing analytics is meant to be part of the deployed website.

9. The UI stack is React + Vite + Tailwind, with supporting CSS files such as `index.css`, `404.css`, and `vectors.css`, plus `tailwind.config.js` and `postcss.config.js`. The repo also includes custom fonts, branded images, SVG/video assets, and static data like `keywords.json`, showing that visual branding and rich media are integral to the frontend.

10. Deployment/runtime tooling is production-oriented. `Dockerfile`, `nginx.conf`, and `Jenkinsfile` show the app is built into static assets, served by Nginx in a container, and likely deployed through CI/CD. `stats.html` suggests bundle analysis or build inspection is part of the workflow.

11. From an architecture-diagram perspective, the main boundaries are: browser UI, client-side routing, Redux state, API layer to an external backend, analytics providers, and static media assets. The app’s key data flows are user navigation → routed page/component → Redux/actions/axios → backend services, with analytics events emitted in parallel.

Main entry points: [`src/modules/static/index.jsx`](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/index.jsx) (Static index), [`src/modules/static/pages/Homepage.jsx`](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/Homepage.jsx) (Homepage), [`src/App.jsx`](https://github.com/pavanvtalix/fbitest/blob/main/src/App.jsx) (App), [`src/redux/slices/authSlice.js`](https://github.com/pavanvtalix/fbitest/blob/main/src/redux/slices/authSlice.js) (Domain slices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_shell["App shell"]
  node_node_main(("main.jsx<br/>entrypoint<br/>[main.jsx]"))
  node_node_app["App<br/>router shell<br/>[App.jsx]"]
  node_node_static_index["Static index<br/>route registry<br/>[index.jsx]"]
end

subgraph group_grp_static["Static site"]
  node_node_home["Homepage<br/>landing page<br/>[Homepage.jsx]"]
  node_node_contact["Contact<br/>lead capture<br/>[Contact.jsx]"]
  node_node_qna["QnA<br/>question flow<br/>[QnA.jsx]"]
  node_node_shared_qna["Shared QnA<br/>shared flow<br/>[QnAShared.jsx]"]
  node_node_tests["Assessments<br/>test suite<br/>[DASS_test.jsx]"]
  node_node_followup["Follow-up<br/>post-flow pages<br/>[Thankyou.jsx]"]
end

subgraph group_grp_ui["Shared UI"]
  node_node_header["Header<br/>navigation UI<br/>[Header.jsx]"]
  node_node_footer["Footer<br/>page chrome<br/>[Footer.jsx]"]
  node_node_home_sections["Home sections<br/>landing sections<br/>[HomeBanner.jsx]"]
  node_node_contact_form["Contact form<br/>form UI<br/>[ContactForm.jsx]"]
  node_node_qna_shared["QnA UI<br/>interaction UI<br/>[QnAShared.jsx]"]
end

subgraph group_grp_state["Client state"]
  node_node_store["Redux store<br/>client state<br/>[store.js]"]
  node_node_slices["Domain slices<br/>state domains<br/>[authSlice.js]"]
  node_node_api["API client<br/>backend gateway<br/>[axiosInstance.js]"]
  node_node_utils["Session utils<br/>workflow utils<br/>[tokenManager.js]"]
end

subgraph group_grp_platform["Platform"]
  node_node_tracking["Tracking<br/>analytics<br/>[index.jsx]"]
  node_node_assets[("Brand assets<br/>media assets<br/>[keywords.json]")]
  node_node_deploy{{"Deploy stack<br/>build/runtime<br/>[vite.config.js]"}}
end

node_node_main -->|"boots"| node_node_app
node_node_app -->|"routes to"| node_node_static_index
node_node_static_index -->|"mounts"| node_node_home
node_node_static_index -->|"mounts"| node_node_contact
node_node_static_index -->|"mounts"| node_node_qna
node_node_static_index -->|"mounts"| node_node_shared_qna
node_node_static_index -->|"mounts"| node_node_tests
node_node_static_index -->|"mounts"| node_node_followup
node_node_home -->|"composes"| node_node_home_sections
node_node_home -->|"uses"| node_node_header
node_node_home -->|"uses"| node_node_footer
node_node_contact -->|"composes"| node_node_contact_form
node_node_qna -->|"shares"| node_node_qna_shared
node_node_static_index -->|"provides"| node_node_store
node_node_store -->|"combines"| node_node_slices
node_node_slices -->|"calls"| node_node_api
node_node_slices -->|"uses"| node_node_utils
node_node_app -->|"wraps with"| node_node_tracking
node_node_static_index -->|"renders with"| node_node_assets
node_node_deploy -->|"builds"| node_node_main
node_node_deploy -->|"serves"| node_node_static_index

click node_node_main "https://github.com/pavanvtalix/fbitest/blob/main/src/main.jsx"
click node_node_app "https://github.com/pavanvtalix/fbitest/blob/main/src/App.jsx"
click node_node_static_index "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/index.jsx"
click node_node_home "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/Homepage.jsx"
click node_node_contact "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/Contact.jsx"
click node_node_qna "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/QnA.jsx"
click node_node_shared_qna "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/QnAShared.jsx"
click node_node_tests "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/DASS_test.jsx"
click node_node_followup "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/Thankyou.jsx"
click node_node_header "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/Header.jsx"
click node_node_footer "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/Footer.jsx"
click node_node_home_sections "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/sub-components/HomeComponents/HomeBanner.jsx"
click node_node_contact_form "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/sub-components/ContactComponents/ContactForm.jsx"
click node_node_qna_shared "https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/QnAShared.jsx"
click node_node_store "https://github.com/pavanvtalix/fbitest/blob/main/src/redux/store.js"
click node_node_slices "https://github.com/pavanvtalix/fbitest/blob/main/src/redux/slices/authSlice.js"
click node_node_api "https://github.com/pavanvtalix/fbitest/blob/main/src/redux/axiosInstance.js"
click node_node_utils "https://github.com/pavanvtalix/fbitest/blob/main/src/utils/tokenManager.js"
click node_node_tracking "https://github.com/pavanvtalix/fbitest/blob/main/src/providers/GTMProvider/index.jsx"
click node_node_assets "https://github.com/pavanvtalix/fbitest/blob/main/src/assets/data/keywords.json"
click node_node_deploy "https://github.com/pavanvtalix/fbitest/blob/main/vite.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_node_main,node_node_app,node_node_static_index toneBlue
class node_node_home,node_node_contact,node_node_qna,node_node_shared_qna,node_node_tests,node_node_followup toneAmber
class node_node_header,node_node_footer,node_node_home_sections,node_node_contact_form,node_node_qna_shared toneMint
class node_node_store,node_node_slices,node_node_api,node_node_utils toneRose
class node_node_tracking,node_node_assets,node_node_deploy toneIndigo
```

## Components

### App shell

Vite entrypoint, routing, and global wrappers.

- [main.jsx](https://github.com/pavanvtalix/fbitest/blob/main/src/main.jsx): entrypoint · Bootstraps the React app. · `src/main.jsx`
- [App](https://github.com/pavanvtalix/fbitest/blob/main/src/App.jsx): router shell · Top-level app composition and route wiring. · `src/App.jsx`
- [Static index](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/index.jsx): route registry · Assembles the static module routes and shared wrappers. · `src/modules/static/index.jsx`

### Static site

Route-driven marketing, contact, and assessment pages.

- [Homepage](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/Homepage.jsx): landing page · Primary marketing landing page. · `src/modules/static/pages/Homepage.jsx`
- [Contact](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/Contact.jsx): lead capture · Contact and consultation entry page. · `src/modules/static/pages/Contact.jsx`
- [QnA](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/QnA.jsx): question flow · Interactive question-and-answer experience. · `src/modules/static/pages/QnA.jsx`
- [Shared QnA](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/QnAShared.jsx): shared flow · Shared QnA page variant and reusable flow entry. · `src/modules/static/pages/QnAShared.jsx`
- [Assessments](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/DASS_test.jsx): test suite · Collection of screening and questionnaire pages. · `src/modules/static/pages/DASS_test.jsx`
- [Follow-up](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/pages/Thankyou.jsx): post-flow pages · Thank-you, resources, privacy, terms, and extra informational pages. · `src/modules/static/pages/Thankyou.jsx`

### Shared UI

Reusable layout and page sections used across the static experience.

- [Header](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/Header.jsx): navigation UI · Top navigation and menu chrome. · `src/modules/static/components/Header.jsx`
- [Footer](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/Footer.jsx): page chrome · Footer and trust/legal footer variants. · `src/modules/static/components/Footer.jsx`
- [Home sections](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/sub-components/HomeComponents/HomeBanner.jsx): landing sections · Banner, care, how-it-works, FAQ, brand, gift, and comparison sections. · `src/modules/static/components/sub-components/HomeComponents/HomeBanner.jsx`
- [Contact form](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/sub-components/ContactComponents/ContactForm.jsx): form UI · Contact hero and submission form components. · `src/modules/static/components/sub-components/ContactComponents/ContactForm.jsx`
- [QnA UI](https://github.com/pavanvtalix/fbitest/blob/main/src/modules/static/components/QnAShared.jsx): interaction UI · Shared QnA presentation and chatbot popup. · `src/modules/static/components/QnAShared.jsx`

### Client state

Redux store, API access, and persistence helpers.

- [Redux store](https://github.com/pavanvtalix/fbitest/blob/main/src/redux/store.js): client state · Global state composition and persistence setup. · `src/redux/store.js`
- [Domain slices](https://github.com/pavanvtalix/fbitest/blob/main/src/redux/slices/authSlice.js): state domains · Auth, user, patient, appointment, slots, query, and answer state. · `src/redux/slices/authSlice.js`
- [API client](https://github.com/pavanvtalix/fbitest/blob/main/src/redux/axiosInstance.js): backend gateway · Centralized axios instance for backend requests. · `src/redux/axiosInstance.js`
- [Session utils](https://github.com/pavanvtalix/fbitest/blob/main/src/utils/tokenManager.js): workflow utils · Token and payment state helpers. · `src/utils/tokenManager.js`

### Platform

Tracking, media, and deployment/runtime tooling.

- [Tracking](https://github.com/pavanvtalix/fbitest/blob/main/src/providers/GTMProvider/index.jsx): analytics · GTM provider and page-view tracking. · `src/providers/GTMProvider/index.jsx`
- [Brand assets](https://github.com/pavanvtalix/fbitest/blob/main/src/assets/data/keywords.json): media assets · Fonts, images, video, SVGs, and keyword data used for branded presentation. · `src/assets/data/keywords.json`
- [Deploy stack](https://github.com/pavanvtalix/fbitest/blob/main/vite.config.js): build/runtime · Vite build, Nginx serving, Docker packaging, and CI pipeline. · `vite.config.js`

## Connections

- main.jsx → App: boots · React entrypoint renders the application shell.
- App → Static index: routes to · Top-level app delegates into the static route module.
- Static index → Homepage: mounts · Registers the home route.
- Static index → Contact: mounts · Registers the contact route.
- Static index → QnA: mounts · Registers the question flow route.
- Static index → Shared QnA: mounts · Registers the shared QnA variant.
- Static index → Assessments: mounts · Registers the assessment pages.
- Static index → Follow-up: mounts · Registers follow-up and info pages.
- Homepage → Home sections: composes · Homepage is built from reusable branded sections.
- Homepage → Header: uses · Landing page shares global navigation chrome.
- Homepage → Footer: uses · Landing page shares footer chrome.
- Contact → Contact form: composes · Contact page is centered on the lead form.
- QnA → QnA UI: shares · QnA page uses shared interaction UI.
- Static index → Redux store: provides · Pages rely on global Redux state.
- Redux store → Domain slices: combines · Store is composed from domain slices.
- Domain slices → API client: calls · State workflows fetch and persist through the API client.
- Domain slices → Session utils: uses · Auth and payment flows use session helpers.
- App → Tracking: wraps with · App shell includes page-view and tag management.
- Static index → Brand assets: renders with · Static pages depend on branded media and content assets.
- Deploy stack → main.jsx: builds · Production tooling packages the React entrypoint.
- Deploy stack → Static index: serves · Built assets are served as a static site.
