v2 customer frontend (mono) #
App: apps/rapidstor-frontend/. React 18, Redux Toolkit, hash router, i18next, Vite.
Journey variant from window.rapidstor_settings.app_config.journey.variant:
- JBL — journey-based listing screens
- Standard — standard unit listing + shared wizard
API client: src/core/api/rapidstor.ts — calls both /api/v1/* and tokenised legacy paths.
Move-in form #
src/core/screens/move-in.tsx hydrates draft fields from the reservation response. dateOfBirth is copied when present so returning customers see DOB prefilled (alongside name cleanup for placeholder lastName .).
i18n & Automate translations #
Mono frontend fetches translation overrides from Automate GET /api/v1/tenant-journey/translations at boot (src/core/utils/rapidstor.ts). Vite plugins stamp data-i18n-key and data-rs-setting attributes on translatable DOM for the Journey Editor click-to-translate inspector. Corp-specific static overrides remain in src/core/translations/corporations/* as fallback.
Build-time scripts/generate-translations.mjs bundles base languages + corp overrides into translations.data.json. Cloudflare Pages Function /api/translations exposes this JSON publicly (cacheable 5 min). Automate's scheduled translations:sync pulls this endpoint to seed its translation catalog.
Cross-repo: Translation override chain is authored in Automate Tenant Journey; RapidStor v2 consumes via public API. Base strings flow RapidStor mono → Automate via scheduled sync. RapidStor site settings still control some labels — flagged in the editor.
Insurance coverage — helpful text #
Insurance wizard forms (insurance-coverage/boxes.tsx, picker.tsx) render configurable helpful text beneath coverage options. Text is sourced from site settings insuranceHelpfulText with per-locale translation support via helpers.ts (getInsuranceHelpfulText). Type definition in @r6digital/rapidstor-types.
Chat widget (mono) #
App: apps/rapidstor-chat/. Embeddable widget using @r6digital/rapidstor-chat-ui v0.2.0. Transport layer (transport.ts) talks directly to Automate agent-runtime — no Laravel Echo/Reverb.
- Config —
serviceUrl(agent-runtime origin, e.g.https://agents.r6automate.com),embedToken(pk_…), optionalsiteId. Legacyreverb*fields removed. - Start —
POST /widget/conversationswithX-Widget-Tokenheader; returnsstreamTokenfor watch WebSocket. - Send —
POST /widget/conversations/:id/messages; turn streams back as SSE on the same response (deduped by message id). - Watch — WebSocket
/ws?token=for operator takeover and backgrounded turns;refreshStreamTokenre-mints token after ~5 min TTL. - History —
GET /widget/conversations/:id/historywith folded tool outputs for transcript rehydration.
Cross-repo: Widget agent calls RapidStor MCP tools for booking. Agent prompt and eval cases live in Automate apps/agent-runtime/. See Automate docs for widget API reference.
Legacy AngularJS UI #
Under public/application/scripts/: publicPanel, adminPanel, adminOverview, superAdminPanel. Built with Gulp (npm run build:front).
StorApp cross-reference: MTAS brokers RapidStor JWT for the mobile app. StorApp calls RapidStor directly for payments, merchandise, and insurance — see StorApp docs for the traced contract.