Project Folder Structure
This page gives you a quick tour of the repository so you can find things fast.Top-level layout
Source code (src/)
api/– Client-side API helpers (endpoints, fetch wrappers, param parsing, suspense wrappers)assets/– Static assets used by the app (images, data, SCSS sources)components/– Reusable UI componentserrorBoundries/– Error boundary components and fallbackshelpers/– Pure helper utilities and formatting helpershooks/– Reusable React hookslayouts/– Layout wrappers (shared chrome)routes/– Route-level components and loadersstates/– Global or module-level state containerstransitions/– Animation/transition helperstypes/– TypeScript type definitionsutils/– Generic utilities not tied to Reactviews/– Page-level or feature-complete views- Root files
App.tsx– App rootmain.tsx– Vite entryi18n.ts– i18next initializationwidget.tsx– Widget bootstrapping/entry
Builds and distributions
dist-widget/– Production bundle of the widget and its assets. This is what you deploy/embed.dist-widget-debug/– Debug build (includes source maps and demo assets for easier testing).
Static assets (public/)
Files in public/ are served as-is at the site root by Vite. Use this for icons, manifest, and images that should not pass through the bundler.
Documentation (docs/)
Mintlify-powered documentation lives here. MDX pages are organized by topic (e.g., api/, overview/, customisation/). The navigation is defined in docs/docs.json.
Scripts and utilities
api/scss-to-css.ts– SCSS-to-CSS processing script (used in build/deploy pipelines)scripts/– i18n and maintenance utilities; for exampletranslate-missing.mjsand ignored translations lists.
Widget demo (widget/)
Contains a minimal host page (index.htm) and locales for trying the widget in isolation.
Testing
vitest.config.ts,vitest.setup.ts– Unit test configuration (Vitest)jest.config.js– Jest config (kept for compatibility in some environments)
Notes
- Build and dev flows are handled by Vite. Check
package.jsonscripts for standard commands. - Internationalization is i18next-based; see
src/i18n.tsandpublic/locales/*.