The GSM Application frontend is a static single-page application built with Vite 6 and React 19. It ships a locale-prefixed router, per-tenant theming, and fully typed API client hooks generated directly from the backend OpenAPI specifications. The final build artifact is a plainDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ti-infinite/GSMApplication/llms.txt
Use this file to discover all available pages before exploring further.
dist/ folder deployed to AWS S3 and served globally through CloudFront.
Technology Stack
Core Framework
React 19 with TypeScript, bundled by Vite 6. Strict mode is on by default. Path alias
@/ maps to src/.Styling
Tailwind CSS v4 via the PostCSS plugin. CSS custom properties carry per-tenant brand colors applied at runtime.
Routing
React Router v7 with locale-prefixed routes (
/en/…, /es/…). The locale is read from localStorage on first load.Data Fetching
TanStack Query v5 wraps every API call. Query keys, stale times, and suspense boundaries are configured per feature.
Internationalisation
i18next with
react-i18next loads translation files for English (en.json) and Spanish (es.json) from messages/.Session & Cookies
js-cookie reads and writes the gsm_exp, gsm_user_name, and gsm_company cookies set after a successful login.UI Primitives
Radix UI (Dialog, DropdownMenu, Tooltip, Slot) provides accessible headless components. Icons come from
lucide-react.Notifications
sonner renders rich-colour toast notifications anchored to the top-center of the viewport.Project Structure
The codebase follows a domain-driven layout where each slice of product functionality lives undersrc/features/ and every piece of shared infrastructure lives under src/shared/.
Orval API Code Generation
Rather than writing API client code by hand, the project uses Orval to generate fully typed React Query hooks from the three backend OpenAPI specs stored inswagger/.
orval.config.ts and writes to src/shared/api/:
| Config key | Input spec | Output directory | Mutator |
|---|---|---|---|
gsmApplication | swagger/gsm-application.json | src/shared/api/application/ | applicationFetch |
gsmAuth | swagger/gsm-auth.json | src/shared/api/auth/ | authFetch |
gsmOperations | swagger/gsm-operations.json | src/shared/api/operations/ | operationsFetch |
mode: 'tags-split' so hooks are grouped by OpenAPI tag into separate files. The gsmOperations generator additionally filters to only the Integrations and Operations tags from the spec. All hooks are wrapped by a custom mutator function defined in src/shared/lib/fetcher.ts that attaches credentials and handles auth errors globally.
Re-run
npm run generate whenever a backend OpenAPI spec changes. The generated files under src/shared/api/ are committed to source control so the CI build does not require a live backend.Vite Dev Proxy
In development, all requests matching/api/* are proxied to http://localhost:80, which is where the local gateway listens. This avoids CORS issues and mirrors the production routing handled by YARP inside the gateway container.
Build & Chunking
npm run build runs tsc -b for type checking and then vite build, emitting optimised output to dist/. Manual chunk splitting keeps vendor bundles separate from application code:
| Chunk | Libraries |
|---|---|
vendor-react | react, react-dom |
vendor-router | react-router-dom |
vendor-query | @tanstack/react-query |
vendor-i18n | i18next, react-i18next |
vendor-ui | lucide-react, @radix-ui/react-dropdown-menu, @radix-ui/react-dialog, @radix-ui/react-tooltip, @radix-ui/react-slot |
vendor-utils | clsx, tailwind-merge, class-variance-authority, js-cookie |
Local Development
Copy environment variables
VITE_TENANT_DEFAULT to the default Company ID shown on the login page (e.g. IH001) and VITE_TENANT_IDS to a comma-separated list of all tenant IDs that should be selectable in the login panel (e.g. IH001,AG001).Generate API clients
Start the dev server
/api/* to http://localhost:80.Environment Variables
| Variable | Description | Example |
|---|---|---|
VITE_TENANT_DEFAULT | Default Company ID pre-filled in the login form | IH001 |
VITE_TENANT_IDS | Comma-separated list of selectable tenant IDs | IH001,AG001 |
Explore Further
Routing & i18n
Deep dive into the locale-prefixed route tree, AuthGuard logic, and the i18next language-switching setup.
Features
Detailed documentation for Login & Tenant Resolution, Dashboard, Productivity, Products, Module Renderers, and Session Management.