How pavanvtalix/fbitest works
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: index.jsx Static index · Homepage.jsx Homepage · App.jsx App · authSlice.js Domain slices
Components 21
App shell
Vite entrypoint, routing, and global wrappers.
- main.jsx · Bootstraps the React app.
src/main.jsx - App · Top-level app composition and route wiring.
src/App.jsx - Static index · Assembles the static module routes and shared wrappers.
src/modules/static/index.jsx
Static site
Route-driven marketing, contact, and assessment pages.
- Homepage · Primary marketing landing page.
src/modules/static/pages/Homepage.jsx - Contact · Contact and consultation entry page.
src/modules/static/pages/Contact.jsx - QnA · Interactive question-and-answer experience.
src/modules/static/pages/QnA.jsx - Shared QnA · Shared QnA page variant and reusable flow entry.
src/modules/static/pages/QnAShared.jsx - Assessments · Collection of screening and questionnaire pages.
src/modules/static/pages/DASS_test.jsx - Follow-up · 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 · Top navigation and menu chrome.
src/modules/static/components/Header.jsx - Footer · Footer and trust/legal footer variants.
src/modules/static/components/Footer.jsx - Home sections · Banner, care, how-it-works, FAQ, brand, gift, and comparison sections.
src/modules/static/components/sub-components/HomeComponents/HomeBanner.jsx - Contact form · Contact hero and submission form components.
src/modules/static/components/sub-components/ContactComponents/ContactForm.jsx - QnA UI · Shared QnA presentation and chatbot popup.
src/modules/static/components/QnAShared.jsx
Client state
Redux store, API access, and persistence helpers.
- Redux store · Global state composition and persistence setup.
src/redux/store.js - Domain slices · Auth, user, patient, appointment, slots, query, and answer state.
src/redux/slices/authSlice.js - API client · Centralized axios instance for backend requests.
src/redux/axiosInstance.js - Session utils · Token and payment state helpers.
src/utils/tokenManager.js
Platform
Tracking, media, and deployment/runtime tooling.
- Tracking · GTM provider and page-view tracking.
src/providers/GTMProvider/index.jsx - Brand assets · Fonts, images, video, SVGs, and keyword data used for branded presentation.
src/assets/data/keywords.json - Deploy stack · Vite build, Nginx serving, Docker packaging, and CI pipeline.
vite.config.js
Connections 21
- 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.