Skip to content

UI Architecture

The Advisor Console follows a page-based architecture with a collapsible sidebar navigation and shared layout components.

Application Layout

appLayout.tsx
├── Sidebar (collapsible, dark #111C33)
│   ├── Logo
│   ├── Navigation items
│   └── AI Button (animated lava blob)
├── Main Content Area
│   ├── Header
│   └── Page Content (router outlet)
└── Footer

Pages

PageRouteDescription
Home/Dashboard with quick actions
AI/aiAI landing page with animated lava lamp icon and 6 preset routines
AI Chat/ai/chatAI chat interface with session history
Destinations/destinationsDestination list (Destination__c)
Destination Detail/destinations/:idDestination detail page
Members/membersMember list with 4-axis filtering
Member Detail/members/:idMember detail page
Trips/tripsTrip list with stage/date filters
Trip Detail/trips/:idEditable trip detail page
Tasks/tasksTask list with status/priority filters
Inbox/inboxUnified omnichannel inbox

Key Components

ComponentPurpose
AIChat.tsxMain AI assistant component (~1300 lines)
AIButton.tsxAnimated AI button with lava blob CSS and sparkle effects
ChatHistorySidebar.tsxChat history with RECENT/EARLIER grouping
ChatMessage.tsxChat message renderer
ContextSearchPopover.tsxReal-time Salesforce record search for context attachment
Dialer.tsxPhone dialer with call simulation
appLayout.tsxMain layout with collapsible dark sidebar
graphqlClient.tsGraphQL wrapper around Salesforce UIAPI
chatHistory.tsIndexedDB CRUD operations for chat persistence

Component Co-location

src/
├── pages/          # Page components (one per route)
├── components/     # Shared UI components
├── hooks/          # Custom React hooks
├── libs/           # Utilities, GraphQL client, chat history
└── styles/         # Global styles and Tailwind config

The sidebar provides access to all major sections. It collapses to icons on smaller screens. The AI button is prominently placed with an animated lava blob effect to draw attention to the AI capabilities.

Routing

React Router handles client-side routing. All routes are statically defined in the application entry point. Dynamic routes use URL parameters for detail pages (e.g., /members/:id).

Marchay Platform Documentation