System Overview

A complete catalogue of the Sysevo platform — every product surface and how it fits together.

Complete reference of every portal, page, tool, feature, and backend function built across the platform. Used by the XPAND CLI to discover existing functionality before scaffolding new features. Last generated: 2026


Table of Contents

  1. Admin Portal (Super Admin)
  2. Developer Portal
  3. Sales Rep / Sales Manager Portal (XpandBot)
  4. White Label Partner Portal
  5. Call Center / Command Center Dev
  6. Generic Client Portal
  7. Vets Portal
  8. Real Estate Portal
  9. Excursions Portal
  10. Rentals Portal (Short-Term Rentals)
  11. Marketing Portal
  12. Entertainment Portal
  13. Call Centre Portal (Industry)
  14. Property Owner Portal
  15. Public-Facing Pages & Widgets
  16. White Label Microsite (wl-site)
  17. Edge Functions / Backend Services
  18. Cross-Cutting Systems

1. Admin Portal (Super Admin)

Role: super_admin — full platform control. Route prefix: /admin/*, root admin pages at /.

Client & Account Management

  • Clients (AdminClients) — list, filter, search every client account; status (active/demo/deleted/disabled).
  • Client Detail (AdminClientDetail) — 360° view: subscription, agents, call volume, revenue, contracts, team, KYC.
  • Teams (AdminTeams) — create/manage internal staff teams.
  • Team Management (TeamManagement) — assign sales reps, managers, developers.
  • Users (Users, UserDetail, NewUser) — global user CRUD, role assignment via user_roles table.
  • KYC Review (AdminKycReview) — review submitted KYC docs, approve/reject identity & company verification.
  • Legal Entities (AdminLegalEntities) — manage XPAND EU/UK/Americas billing entities (currency-aware).

Sales & Pipeline (Internal)

  • Leads (Leads, LeadDetail, MyLeads, NewLead) — internal sales pipeline; source attribution, stage progression, AI-detected interest tagging.
  • Lead Sourcing (LeadSourcing) — bulk import / scrape leads.
  • Pipeline (Pipeline) — kanban view of internal sales deals.
  • Cold Call Lists (ColdCallLists, ColdCallListDetail, ColdCallImport) — outbound cold call campaign manager with CSV/XLSX import.
  • Call Center (CallCenter) — live monitoring of in-flight calls (super admin & call_center role).
  • Call Command Center (admin/CallCommandCenter) — orchestration of agent ↔ client mapping, ElevenLabs accounts.

Billing, Finance & Payments

  • Billing (AdminBilling) — global billing overview.
  • Finance Hub (admin/FinanceHub) — executive P&L (EUR-normalised), Setup Fees vs MRR, real-time charts.
  • Invoices (AdminInvoices) — Stripe live invoice listing.
  • Payment Links (AdminPaymentLinks, AdminPaymentLinksHistory) — generate/track Stripe & PayPal links.
  • Commissions (AdminCommissions, Commissions) — sales rep & partner commission tracking.
  • Payouts (AdminPayouts) — process partner/rep payouts.
  • Pricing Management (AdminPricingManagement) — agent type pricing, addons, enterprise tiers.
  • Subscription Pricing (AdminSubscriptionPricing) — Essential/Enterprise plan editor.
  • Pricing Calculator (PricingCalculator) — quote calculator.
  • Usage (AdminUsage) — per-client minute usage, agent metrics.
  • Abandoned Carts (AdminAbandonedCarts) — recover abandoned checkouts.

Documents, Contracts & Quotes

  • Contracts (AdminContracts, AdminContractDetail, AdminContractEdit, AdminContractTemplates) — branded PDF contracts, digital signature flow, signed-URL delivery.
  • Sign Contract (SignContract) — public signing endpoint.
  • NDA Submissions (AdminNdaSubmissions) — review public NDA form submissions (3-year, Spanish law).
  • Proposals Manager (admin/ProposalsManager) — list AI-generated proposals.
  • Proposal Builder (admin/ProposalBuilder) — interactive proposal editor (blocks, OG metadata).
  • Proposal Analytics (admin/ProposalAnalytics) — view tracking, conversion.
  • Quotes Manager (admin/QuotesManager) — XPAND-branded quote list.
  • Quote Builder (admin/QuoteBuilder) — AI-assisted quote generator with legal entity + currency.
  • Sales Documents (AdminSalesDocuments, SalesDocuments) — central library for sales collateral.
  • Sales Resource Hub (admin/sales-resource/*) — Scripts, Objections, Docs.

Communications

  • Inbox (AdminInbox) — unified email inbox (cron-synced).
  • Email Settings (AdminEmailSettings) — admin email accounts/domains.
  • Email Templates (EmailTemplates) — drip sequence + transactional templates; HTML import support.
  • Email Campaigns (AdminEmailCampaigns) — pipeline-stage triggered drip campaigns, fallback domains, spam heuristic.
  • Email Health (AdminEmailHealth) — Resend domain health, delivery monitoring.
  • Reminders (AdminReminders) — schedule cross-portal reminders.
  • Tasks (AdminTasks, Tasks) — admin task tracker.

Vault & Resources

  • Vault (AdminVault) — secure document/asset vault with share-via-email & public link.
  • Public Vault Share (PublicVaultShare) — token-gated public vault access.
  • Resources (AdminResources) — knowledge base & training resources.
  • Documentation (AdminDocumentation) — internal docs CMS.

Support & Forms

  • Support (AdminSupport, AdminSupportTicketDetail) — full ticketing system with realtime chat, SLA, escalation from AI chat.
  • Forms Manager (AdminFormsManager, AdminFormBuilder) — drag-and-drop public form builder.
  • Integration Requests (AdminIntegrationRequests) — client-requested integrations queue.

Projects & Operations

  • Projects (AdminProjects, AdminProjectDetail) — project tracking with command center view.
  • AI Store (AdminAIStore) — marketplace of AI agent templates.
  • API Keys (AdminApiKeys) — 3-tier key system (Admin/Client/MCP), SHA-256 hashed.

White Label Management

  • WL Partners (AdminWhiteLabelPartners, AdminWhiteLabelDetail, AdminWhiteLabelNew) — onboard partners.
  • WL Applications (AdminWLApplications) — review partner applications.
  • WL Clients (AdminWhiteLabelClients, AdminWLClients) — clients under partners.
  • WL Leads (AdminWhiteLabelLeads) — partner-attributed leads.
  • WL Activity (AdminWLActivity) — activity feed per partner.
  • WL Contracts / Payment Links (AdminWLContracts, AdminWLPaymentLinks).

2. Developer Portal

Role: developer — engineering & client onboarding ops. Route prefix: /dev/*.

  • Dashboard (DeveloperDashboard) — stats, active projects.
  • Clients (DeveloperClients, DeveloperClientDetail) — assigned client portfolio.
  • Projects (DeveloperProjects, DeveloperProjectDetail) — implementation projects.
  • Agents (DeveloperAgents) — ElevenLabs agent configuration & provisioning.
  • Integrations (DeveloperIntegrations) — third-party integration setup.
  • Store Submissions (DeveloperStoreSubmissions) — submit AI agents to the store.
  • Tasks (DeveloperTasks) — engineering task board.
  • Support (DeveloperSupport, DeveloperTicketDetail) — client ticket triage.
  • Profile (DeveloperProfile).

3. Sales Rep / Sales Manager Portal (XpandBot)

Roles: sales_rep, sales_manager. Entry point: /xpand-bot.

  • XpandBot (XpandBot) — AI sales assistant chat.
  • Sales Manager Dashboard (SalesManagerDashboard) — team metrics.
  • Sales Rep Dashboard (SalesRepDashboard) — personal pipeline + targets.
  • Sales Manager Tasks (SalesManagerTasks), Sales Rep Tasks (SalesRepTasks).
  • Calendar (Calendar) — appointment scheduling.
  • New Appointment (NewAppointment).
  • Shared with admin: Leads, Cold Call Lists, Pipeline, Sales Resources.

4. White Label Partner Portal

Role: white_label. Route prefix: /wl/*. Custom-domain capable.

  • Dashboard (WhiteLabelDashboard).
  • Clients (WhiteLabelClients, WhiteLabelClientDetail) — partner's branded client base.
  • Leads (WhiteLabelLeads), Pipeline (WhiteLabelPipeline).
  • Cold Call Lists (WhiteLabelColdCallLists, WhiteLabelColdCallListDetail, WhiteLabelColdCallImport).
  • Contracts (WhiteLabelContracts, WhiteLabelContractDetail, WhiteLabelContractEdit, WhiteLabelContractTemplates).
  • Payment Links (WhiteLabelPaymentLinks, WhiteLabelCheckoutLinks).
  • Billing (WhiteLabelBilling).
  • Commissions (WhiteLabelCommissions, WhiteLabelFinanceCommissions).
  • Payouts (WhiteLabelPayouts).
  • Forms (WhiteLabelFormsManager, WhiteLabelFormBuilder).
  • Email Templates (WhiteLabelEmailTemplates).
  • Sales Documents (WhiteLabelSalesDocuments).
  • Calendar (WhiteLabelCalendar).
  • Reports (WhiteLabelReports).
  • Team (WhiteLabelTeam), Projects (WhiteLabelProjects).
  • Support (WhiteLabelSupport, WhiteLabelSupportTicketDetail).
  • Notifications (WhiteLabelNotifications).
  • Integrations (WhiteLabelIntegrations).
  • Settings (WhiteLabelSettings), Profile (WhiteLabelProfile).
  • Checkout flows (WLCheckoutEssential, WLCheckoutEnterprise, WLCheckoutSuccess, WLCheckoutCancel).
  • Activation (WLActivate).

5. Call Center / Command Center Dev

Roles: call_center, command_center_dev (PII-restricted). Route: /call-center.

  • Call Center Live View (CallCenter) — global active calls ticker, quality monitoring, talk ratio.
  • Call Command Center (admin/CallCommandCenter) — agent assignment, ElevenLabs account orchestration.
  • Restrictions: command_center_dev cannot view PII fields (masked).

6. Generic Client Portal

Role: client (industry: generic). Route prefix: /client/*.

Core

  • Dashboard (ClientDashboard) — 30-day revenue (max of closed-won estimates vs paid invoices), call stats.
  • Calls (ClientCalls, ClientCallDetail) — call history with transcripts, AI analysis, audio playback.
  • Live Calls (ClientLiveCalls) — real-time in-progress calls.
  • Leads (ClientLeads, ClientLeadDetail, ClientLeadArchives) — flat lead interface, business-name priority, AI markers cleaned, hidden technical IDs.
  • Pipeline (ClientPipeline) — dynamic stage sync from client_pipeline_stages.
  • Closer (ClientCloser) — high-priority warm leads view.
  • Tracker (ClientTracker) — lead/case tracking board.
  • Calendar (ClientCalendar) — bookings + iCal two-way sync (60s polling, PT1M TTL).
  • Reports (ClientReports).
  • Outbound (ClientOutbound) — outbound campaign requests.
  • Guest Relations (ClientGuestRelations) — guest priority filter (hospitality).
  • Batch Detail (ClientBatchDetail) — outbound batch results.

Communications & Documents

  • Tickets (ClientTickets, ClientTicketDetail, ClientSubmitTicket) — support with realtime chat.
  • Notifications (ClientNotifications) — push (OneSignal) + in-app.
  • Contracts (ClientContracts, ClientContractDetail, ClientContractEdit, ClientContractTemplates).
  • Docs (ClientDocs).
  • Help (ClientHelp) — AI chat with escalation to ticket.
  • Contact (ClientContact).

Account

  • Billing (ClientBilling) — live Stripe (bypasses local DB), exact next payment, auto-refresh.
  • Team (ClientTeam).
  • Profile (ClientProfile), Settings (ClientSettings).
  • Onboarding (ClientOnboarding, ClientSystemsOnboarding) — setup wizard with persistent header (Framer Motion).
  • Activate (ClientActivate).

7. Vets Portal

Industry: veterinary. Route prefix: /vets/*.

Clinical

  • Dashboard (VetsDashboard, VetsDashboardPage) — triage volume, ROI metrics.
  • Live Calls (VetsLiveCalls) — real-time triage line.
  • Calls (VetsCalls, VetsCallDetail, VetCallDetailPage) — vet-specific call analyzer (analyze-vet-call-transcript, gemini-2.5-flash for medical reasoning).
  • Cases / Leads (VetsLeads, VetsLeadDetail, VetsLeadArchives) — case-as-lead model.
  • Case Detail (VetsCaseDetail).
  • AI Triage / Automation (VetsAutomation) — AI symptom triage + emergency escalation.
  • Emergency Log (VetsEmergencyLog) — flagged urgent cases.
  • Animal Detail (VetsAnimalDetail) — pet profile, history.

Owners & Workload

  • Owners (VetsOwners, VetsOwnerDetail) — pet owner CRM.
  • Workload & Handover (VetsWorkload) — staff load balancing, end-of-shift handover (vet-generate-handover).
  • Case Board / Pipeline (VetsPipeline).
  • Calendar (VetsCalendar).

Reporting

  • Reports (VetsReports) — clinic ROI.
  • Case Outcomes (VetsCaseOutcomes) — outcome trend analysis.
  • Complaints (VetsComplaints, VetsComplaintDetail).
  • Referrals (VetsReferrals, VetsReferralDetail).

Admin

  • Emails (VetsEmails), Team (VetsTeam), Billing (VetsBilling), Closer (VetsCloser).
  • Outbound (VetsOutbound), Tracker (VetsTracker), Batch Detail (VetsBatchDetail).
  • Contracts (VetsContracts), Docs (VetsDocs), Help (VetsHelp), Contact (VetsContact).
  • Tickets (VetsTickets, VetsTicketDetail, VetsSubmitTicket).
  • Notifications, Profile, Settings, Onboarding.
  • AI clinical docs: vet-ai-docs (clinical / owner-friendly / internal notes triple output).

8. Real Estate Portal

Industry: real_estate. Route prefix: /realestate/*.

Properties & Deals

  • Dashboard (RealEstateDashboard).
  • Properties Hub (REPropertiesHub, REPropertyForm) — listings management.
  • Deals Pipeline (REDealsPipeline, REDealForm).
  • Matching (REMatching) — AI buyer ↔ property match.
  • Viewings Calendar (REViewingsCalendar, REViewingForm).
  • Transactions (RETransactions).

Leads & Outreach

  • Leads Hub (RELeadsHub, RELeadDetail, RELeadForm).
  • Distribution (REDistribution) — round-robin lead distribution.
  • Calls (RECalls, RECallDetail) — analyze-re-call-transcript.
  • Outbound (REOutbound), Batch Detail (REBatchDetail).
  • Campaigns (RECampaigns), Marketing (REMarketing), Communications (RECommunications), Emails (REEmails).

Insights

  • Market Insights (REMarketInsights), Predictions (REPredictions), Forecasting (REForecasting).
  • Reports (REReports), Revenue (RERevenue), Commissions (RECommissions), Finance (REFinance).

Ops

  • Tasks (RETasks), Calendar (RECalendar), Team (RETeam).
  • Contracts (REContracts), Automations (REAutomations), Integrations (REIntegrations).
  • Assistant (REAssistant) — AI assistant.
  • Profile, Settings, Help.

9. Excursions Portal

Industry: excursions. Route prefix: /excursions/*. Vessel/Paula-protocol.

Booking & Catalog

  • Dashboard (ExcursionsDashboard, ExcursionsDashboardPage).
  • Catalog (ExcursionsCatalog, ExcursionsCatalogEditor) — excursions, vessels, capacity.
  • Fleet (ExcursionsFleet) — per-client vessels (Mustang/Venecia/Pirulet/Ana etc., never hardcoded).
  • Bookings (ExcursionsBookings), New Booking (ExcursionsNewBooking).
  • Manifests (ExcursionsManifests) — passenger lists; excursion-manifest-availability.
  • Daily Till (ExcursionsDailyTill).
  • Smart Calendar (ExcursionsCalendar).
  • Guest Check-in (ExcursionsGuestCheckin).
  • Guest Relations (ExcursionsGuestRelations).

Customers & Sales

  • Customers (ExcursionsCustomers, ExcursionsCustomerDetail).
  • Enquiries (ExcursionsEnquiries).
  • Leads (ExcursionsLeads, ExcursionsLeadDetail, ExcursionsLeadArchives).
  • Pipeline (ExcursionsPipeline), Closer (ExcursionsCloser), Tracker (ExcursionsTracker).
  • Calls (ExcursionsCalls, ExcursionsCallDetail) — analyze-excursion-call-transcript.
  • Live Calls (ExcursionsLiveCalls).
  • Outbound (ExcursionsOutbound), Batch Detail (ExcursionsBatchDetail).

Finance

  • Revenue (ExcursionsRevenue), Reports (ExcursionsReports).
  • Invoicing (ExcursionsInvoicing), Billing (ExcursionsBilling).
  • Contracts (ExcursionsContracts).

Ops

  • Team (ExcursionsTeam), Emails (ExcursionsEmails).
  • Help, Docs, Contact, Notifications, Profile, Settings, Onboarding.
  • Tickets (ExcursionsTickets, ExcursionsTicketDetail, ExcursionsSubmitTicket).
  • Crew Manifest View (CrewManifestView) — for client_crew role at /excursions/crew.

Public/Booking

  • Public excursion page, checkout, payment success, booking widget, manage booking. (See Public section.)

10. Rentals Portal (Short-Term Rentals)

Industry: rentals. Airbnb-style lifecycle. Route prefix: /rentals/*.

Properties & Pricing

  • Dashboard (RentalsDashboard, RentalsDashboardPage).
  • Properties (RentalsProperties, RentalsPropertyDetail, RentalsPropertyForm).
  • Pricing (RentalsPricing) — dynamic pricing (rental-dynamic-pricing).
  • Smart Calendar (RentalsSmartCalendar, RentalsCalendar) — OTA two-way iCal sync (sync-ota-bookings, ota-ical-feed, export-rental-ical).

Bookings & Guests

  • Bookings (RentalsBookings, RentalsBookingDetail, RentalsNewBooking).
  • Customers (RentalsCustomers, RentalsCustomerDetail).
  • Leads (RentalsLeads, RentalsLeadDetail, RentalsLeadArchives).
  • Pipeline (RentalsPipeline), Closer (RentalsCloser), Tracker (RentalsTracker).
  • Messages (RentalsMessages) — guest messaging (rental-guest-messages).
  • Guest Portal (RentalsGuestPortal) — rental-guest-portal edge function.
  • Reviews (RentalsReviews) — rental-review-analyzer.
  • Upsells (RentalsUpsells).

Operations

  • Cleaning (RentalsCleaning), Cleaners (RentalsCleaners).
  • Maintenance (RentalsMaintenance).
  • Owners (RentalsOwners) — owner statements (rental-owner-statement).
  • Team (RentalsTeam).

Finance

  • Financials (RentalsFinancials), Invoicing (RentalsInvoicing), Billing (RentalsBilling).
  • Reports (RentalsReports).
  • Contracts (RentalsContracts, RentalsContractDetail, RentalsContractEdit, RentalsContractTemplates).

Calls & Outreach

  • Calls (RentalsCalls, RentalsCallDetail) — analyze-rental-call-transcript.
  • Live Calls (RentalsLiveCalls), Outbound (RentalsOutbound), Batch Detail (RentalsBatchDetail).
  • Emails (RentalsEmails), Automations (RentalsAutomations).

Account

  • Tickets, Notifications, Profile, Settings, Onboarding, Help, Contact.

11. Marketing Portal

Industry: marketing. Route prefix: /marketing/*.

  • Dashboard (MarketingDashboard), Analytics (MarketingAnalytics).
  • Clients (MarketingClients, MarketingClientDetail), Companies (MarketingCompanies), Contacts (MarketingContacts).
  • Leads (MarketingLeads, MarketingLeadDetail, MarketingLeadArchives), Lead Sourcing (MarketingLeadSourcing).
  • Pipeline, Closer, Tracker.
  • Calls (MarketingCalls, MarketingCallDetail), Live Calls.
  • Cold Call Lists (MarketingColdCallImport, MarketingColdCallListDetail), Outbound, Batch Detail.
  • Campaigns (MarketingCampaigns), Emails (MarketingEmails).
  • Proposals (MarketingProposals).
  • Projects (MarketingProjects).
  • AI Tools (MarketingAITools), Automations (MarketingAutomations).
  • Forms (MarketingForms, MarketingFormBuilder).
  • Inbox (MarketingInbox).
  • Integrations (MarketingIntegrations).
  • Calendar, Team, Reports, Invoicing, Billing, Payment Links (MarketingPaymentLinks), Contracts.
  • Tickets, Notifications, Profile, Settings, Onboarding, Help, Contact, Docs.

12. Entertainment Portal

Industry: entertainment. Route prefix: /entertainment/*.

Shows & Events (4 primary areas)

  • Dashboard (EntertainmentDashboard).
  • Shows (EntertainmentShows, EntertainmentShowDetail, EntertainmentCreateShow) — full-width inline animated panel for creation (not dialogs).
  • Events (EntertainmentEvents) + Public Event Page (PublicEventPage).
  • Talent Roster (EntertainmentTalent) — 26+ bilingual EN/ES categories.
  • Venues (EntertainmentVenues).
  • Settlements (EntertainmentSettlements).
  • Calendar (EntertainmentCalendar) — custom bilingual date/time pickers.
  • Appointments — Artist Booking, Sound Check, Rehearsal terminology.

CRM (Unified)

  • Leads (EntertainmentLeads, EntertainmentLeadDetail, EntertainmentLeadArchives, EntertainmentNewLead).
  • Companies (EntertainmentCompanies) — VAT + schema metadata.
  • Contacts (EntertainmentContacts, EntertainmentContactDetail) — shared contact toggle, caller memory.
  • Clients (EntertainmentClients, EntertainmentClientDetail).
  • Pipeline (EntertainmentPipeline) — dynamic sync from client_pipeline_stages.
  • Closer, Tracker.
  • Calls (EntertainmentCalls, EntertainmentCallDetail), Live Calls.

Outreach

  • Outbound, Cold Call Import (EntertainmentColdCallImport, EntertainmentColdCallListDetail), Batch Detail.
  • Email Campaigns (EntertainmentEmailCampaigns) — Gmail-safe sanitization (strip base64/styles/titles).
  • Emails (EntertainmentEmails), Inbox (EntertainmentInbox, EntertainmentInboxSettings).
  • Campaigns (EntertainmentCampaigns), Automations (EntertainmentAutomations).
  • AI Tools (EntertainmentAITools) — entertainment-ai-shows, entertainment-ai-populate.

Finance

  • Invoicing (EntertainmentInvoicing), Billing, Payment Links (EntertainmentPaymentLinks).
  • Proposals (EntertainmentProposals) — Public proposal with dynamic OG (PublicEntertainmentProposal, proposal-og).
  • Contracts (EntertainmentContracts).
  • Reports (EntertainmentReports), Analytics.

Ops

  • Projects (EntertainmentProjects), Team, Forms (EntertainmentForms, EntertainmentFormBuilder).
  • Integrations (EntertainmentIntegrations).
  • Tickets, Notifications, Profile, Settings, Onboarding, Docs, Help, Contact.

13. Call Centre Portal (Industry)

Industry: call_centre. Route prefix: /callcentre/*.

  • Dashboard (CallCentreDashboard) — Talk Ratio, lead logic separation.
  • Calls (CallCentreCalls, CallCentreCallDetail), Live Calls.
  • Leads (CallCentreLeads, CallCentreLeadDetail, CallCentreLeadArchives), Lead Lists (CallCentreLeadLists).
  • Cases (CallCentreCases, CallCentreCaseDetail, CallCentreCaseForm), Claims Form (CallCentreClaimsForm).
  • Contacts (CallCentreContacts).
  • Pipeline, Outbound, Batch Detail, Trash (CallCentreTrash).
  • New Appointment, Calendar.
  • Forms (CallCentreForms, CallCentreFormsManager, CallCentreFormBuilder).
  • Email Templates (CallCentreEmailTemplates), Inbox.
  • Contracts (CallCentreContracts, CallCentreContractDetail, CallCentreContractEdit, CallCentreContractTemplates).
  • Payment Links (CallCentrePaymentLinks) — unified Stripe + PayPal billing.
  • Reports, Team, Help, Notifications, Profile, Settings, Billing.

14. Property Owner Portal

Role: owner (rentals owners). Route prefix: /owner/*.

  • Dashboard (OwnerDashboard) — property performance.
  • Properties (OwnerProperties).
  • Bookings (OwnerBookings, OwnerBookingDetail).
  • Calendar (OwnerCalendar).
  • Payments (OwnerPayments) — payouts.
  • Issues (OwnerIssues).
  • Settings (OwnerSettings).

15. Public-Facing Pages & Widgets

Forms & Onboarding

  • NDA Form (public/NdaForm) — dark themed, 3-year Spanish law, PDF rendering.
  • Partner Apply (public/PartnerApply).
  • Solar Form (public/PublicSolarForm) — process-solar-intake, analyze-solar-call-transcript.

Proposals & Quotes

  • Public Proposal (PublicProposal) — branded interactive blocks, OG metadata (proposal-og).
  • Public Entertainment Proposal (PublicEntertainmentProposal).
  • Public Quote (PublicQuote) — XPAND-branded, quote-og.

Events

  • Public Events List (PublicEventsList).
  • Public Event Detail (PublicEventDetail).
  • Public Event Widget (PublicEventWidget) — embeddable.

Excursions Booking

  • Public Excursion Page (PublicExcursionPage).
  • Public Excursion Checkout (PublicExcursionCheckout).
  • Excursion Booking Widget (ExcursionBookingWidget) — embed.
  • Booking Success / Payment Success (BookingSuccess, ExcursionsPaymentSuccess).
  • Manage Booking (ManageBookingPage).

Rentals Booking

  • Public Rental Property Page (PublicRentalPropertyPage).
  • Public Rental Checkout (PublicRentalCheckout).
  • Rental Booking Widget (RentalBookingWidget).
  • Rental Booking Success (RentalBookingSuccess).

Checkout / Auth

  • Checkout — Essential / Enterprise / Cancel / Success.
  • Auth (Auth), Portal Auth (PortalAuth), Setup Password, KYC Welcome / Onboarding.
  • Unsubscribe (Unsubscribe).
  • Public Vault Share (PublicVaultShare).
  • Sign Contract (SignContract).

16. White Label Microsite (wl-site)

Public-facing partner microsite. Route: wl-site/*.

  • Home (WLMicrositeHome).
  • Solutions (WLMicrositeSolutions).
  • Industry Solution (WLMicrositeIndustrySolution).
  • Voice AI (WLMicrositeVoiceAI).
  • Smart CRM (WLMicrositeSmartCRM).
  • Products (WLMicrositeProducts).
  • Pricing (WLMicrositePricing).

Branding via useMicrositeBranding, custom-domain resolved via verify-custom-domain.


17. Edge Functions / Backend Services

Located at supabase/functions/*. All deploy automatically.

AI Call Analyzers (per industry, with ai_response_cache short-circuit)

  • analyze-call-transcript — generic.
  • analyze-vet-call-transcript — gemini-2.5-flash medical reasoning.
  • analyze-re-call-transcript, analyze-rental-call-transcript, analyze-excursion-call-transcript, analyze-solar-call-transcript.
  • analytics-from-call-history.

ElevenLabs / Voice

  • eleven-labs-proxy, eleven-labs-audio, elevenlabs-transcribe, elevenlabs-scribe-token.
  • elevenlabs-post-call-webhook — triple-redundancy pipeline.
  • provision-agent-tools — automated tool create+PATCH-link.
  • agent-memory-lookup, caller-memory, update-caller-name.
  • vet-live-calls, vet-live-transcript-webhook.
  • get-elevenlabs-key — dynamic account orchestration via DB registry.
  • sync-agent-calls, agent-metrics, client-metrics.

Lead & Call Pipeline

  • auto-create-leads, enrich-leads, verify-leads, scrape-leads.
  • recalculate-lead-priorities — warm/cold logic.
  • bulk-match-lead-lists, clean-business-names.
  • call-history, call-center-api.
  • Backfills: backfill-leads, backfill-lead-phones, backfill-phones, backfill-call-appointments, backfill-followup-leads, backfill-admin-attachments, backfill-solar-case-intelligence.

Billing / Stripe / PayPal

  • create-checkout-session, verify-checkout-session, track-checkout-session.
  • stripe-webhook — multi-entity routing (EU/UK/Americas).
  • wl-verify-stripe.
  • customer-portal, cancel-subscription, admin-cancel-subscription, sync-stripe-subscription.
  • fetch-stripe-customers, fetch-stripe-subscription-detail, fetch-stripe-transactions.
  • fetch-billing-metrics, fetch-financial-summary.
  • create-payment-link.
  • create-excursion-invoice, create-rental-invoice, create-solar-invoice, create-solar-paypal-invoice.
  • excursion-create-checkout, excursion-send-payment-link, verify-excursion-payment.
  • report-usage, sync-exchange-rates.

Documents (Contracts / Proposals / Quotes / NDA)

  • generate-proposal, generate-proposal-pdf, proposal-og, track-proposal.
  • generate-quote, generate-quote-pdf, quote-og.
  • process-signature, regenerate-signed-contract, notify-contract-event, decline-document.
  • get-contract-signed-url, get-signing-session, send-contract-email, send-contract-reminder.
  • process-nda-signature, regenerate-nda-pdf.

Email Infrastructure

  • manage-email-domain, manage-admin-email-domain, email-health-check, sync-email-stats.
  • receive-inbound-email, setup-inbound-webhook, sync-admin-inbox, sync-admin-inbox-cron.
  • send-email-campaign, send-scheduled-campaigns, process-sequence-sends.
  • email-campaign-webhooks, spam-filter, handle-unsubscribe.
  • Transactional senders: send-account-setup-email, send-admin-email, send-agent-live-email, send-appointment-notification, send-approval-email, send-rejection-email, send-booking-confirmation, send-rental-booking-confirmation, send-excursion-booking-confirmation, send-excursion-checkin-email, send-event-ticket, send-client-activation-email, send-client-invitation, send-cold-call-email, send-integration-notification, send-invoice-email, send-meeting-invite, send-notification-email, send-onboarding-form-email, send-partner-application-email, send-password-reset, send-payment-confirmation, send-portal-link, send-recovery-email, send-sales-rep-welcome-email, send-solar-email, send-solar-stage-email, send-ticket-email, send-welcome-email, send-wl-invitation.
  • vault-share, vault-share-email.
  • resolve-admin-attachment.

Calendar

  • google-calendar-sync, sync-calendar-feeds, export-calendar-ical, export-rental-ical.
  • generate-meet-link.
  • excursion-manifest-availability.

OTA / GYG / Rentals

  • gyg-supplier-api, gyg-webhook.
  • sync-ota-bookings, ota-ical-feed, sync-rental-calendars.
  • rental-dynamic-pricing, rental-guest-messages, rental-guest-portal, rental-owner-statement, rental-review-analyzer.

Vets-Specific

  • vet-ai-docs (3-output clinical/owner/internal), vet-ai-triage, vet-case-email, vet-generate-handover.
  • seed-vet-demo, seed-vet-demo-data.

Solar / Real Estate

  • process-solar-intake, update-solar-case-stage.

Entertainment

  • entertainment-ai-shows, entertainment-ai-populate.

Push / Notifications

  • send-push-notification, get-onesignal-config — OneSignal Web SDK v16, PWA installable.

Auth / Account / KYC

  • activate-client-account, activate-wl-account.
  • admin-bootstrap-user, bootstrap-test-client.
  • create-user, delete-user, delete-client-account.
  • submit-kyc, admin-kyc-review, twilio-kyc-webhook, admin-twilio-manage.
  • verify-custom-domain.
  • resend-activation-email.
  • register-attendee, check-in-attendee.

Sales / AI Chat

  • ai-support-chat — escalates to ticket.
  • xpand-bot-chat, xpand-api, xpand-admin-api — programmable client API (lead pipeline, contracts, calls).
  • handle-sales-contact-request.
  • explain-addon, translate-content, translate-scope.
  • estimate-outbound-cost.
  • process-payout.
  • seed-documentation, seed-resources.
  • get-internal-api-secret.

18. Cross-Cutting Systems

Authentication & Roles

  • 9-role hierarchy: super_admin, developer, partner (white_label), sales_manager, sales_rep, client, client_crew, call_center, command_center_dev.
  • Roles in dedicated user_roles table with has_role() security-definer function.
  • Industry routing via client_industry attribute → portal redirect (Index.tsx).

Internationalization

  • Strict react-i18next, zero hardcoded strings, no notranslate tags.

Design System

  • 2026 SaaS aesthetic: pure black #000000, 2% white glassmorphism, Primary #9164E5.
  • Inter font-light typography, pill-shaped buttons.
  • Semantic Tailwind tokens only (no raw text-white/bg-black in components).

Security

  • Strict RBAC, fail-closed logic, Zod validation, masked PII, token-based auth.
  • API key 3-tier system (Admin/Client/MCP), SHA-256 hashed with prefixes.
  • MCP 2-layer auth (token hash + X-Xpand-Api-Key).
  • Onboarding developer bypass: @xpandagent.io skips delivery tracker.

Realtime

  • Supabase Realtime: ai_chat_messages, messages, notifications, live calls, push fan-out.

AI Cost Optimization

  • Default model: google/gemini-2.5-flash-lite.
  • Medical/critical reasoning: google/gemini-2.5-flash.
  • Mandatory cache short-circuit via ai_response_cache table (translations, explanations, 6 analyzers).

Mobile / PWA

  • OneSignal Web SDK v16, push subscriptions table, installable PWA, iframe-safe.

White Label / Custom Domains

  • Branded isolation, zero-vendor markers.
  • Domain hardcoded for XPAND public URLs: https://portal.xpandagent.io.

Demo Environment

  • status: 'demo' interception in AuthContext.

Soft-Delete & Recovery

  • status: 'deleted' interception, animated localized recovery screen.

Confirmations & UX

  • Prohibited native confirm(); mandatory AlertDialog with optimistic UI.
  • Help icons use Popover (not Tooltip).

Financial Reporting

  • A4 professional PDFs, monospace fonts.
  • 30-day window, max(closed-won estimates, paid invoices).
  • Live Stripe bypass of local DB.

Triple-Redundancy Call Processing

  • Webhook + cron + background sync for call ingestion.

Generated catalogue. Update when adding new portals or major features.


PART II — DEEP REFERENCE (Every Tool, Function & Module)

This second half is the exhaustive index. Every page route, every edge function, every hook, and every notable component is enumerated with its purpose. Use this when the high-level Part I doesn't give enough context.


19. Edge Function Reference — All 184 Functions (Detailed)

Functions live at supabase/functions/<name>/index.ts. All deploy automatically on push. Default JWT verification is enabled unless a function-level [functions.X] block in supabase/config.toml sets verify_jwt = false (used for public endpoints, Stripe/Twilio/ElevenLabs/Resend webhooks, OG renderers, public widgets).

19.1 AI Call Analyzers (industry-tuned, cache-backed)

FunctionPurpose
analyze-call-transcriptGeneric baseline analyzer — sentiment, intent, summary, lead capture, appointment detection, AI follow-up. Cache short-circuit via ai_response_cache.
analyze-vet-call-transcriptVeterinary-tuned: triage severity (red/amber/green), species/symptom extraction, emergency escalation flag, owner emotional state, repeat-caller detection. Uses gemini-2.5-flash for medical reasoning.
analyze-re-call-transcriptReal-estate-tuned: buyer/seller intent, budget, area, bedroom count, viewing intent, property-match feeders.
analyze-rental-call-transcriptShort-term rentals: dates, party size, property preferences, OTA channel, upsell signals, cancellation risk.
analyze-excursion-call-transcriptExcursion-specific: vessel preference (per-client grounding — never hardcode Mustang/Venecia/Pirulet/Ana), pax count, language, departure preference, Paula protocol.
analyze-solar-call-transcriptSolar intake: roof type, monthly bill, ownership, decision authority, consumption KWh, financing interest.
analytics-from-call-historyAggregates historical calls into KPI rollups for dashboards.

19.2 ElevenLabs / Voice Orchestration

FunctionPurpose
eleven-labs-proxyGeneric proxy with fetchWithKeyFallback over the Dynamic Account Orchestration registry.
eleven-labs-audioStreams call audio (signed URL hand-off).
elevenlabs-transcribeStandalone transcription endpoint.
elevenlabs-scribe-tokenIssues short-lived Scribe session tokens.
elevenlabs-post-call-webhookPrimary ingest. Triple-redundancy partner: webhook → sync-agent-calls cron → background sync.
provision-agent-toolsCreate-then-link PATCH for ElevenLabs tools (calendar, lead capture, memory, escalation). Query-string parameters; tool-safe fallback contract.
agent-memory-lookupXPAND MCP — Motion OS memory tool used by agents at call time.
caller-memoryCaller history retrieval for agent grounding.
update-caller-namePersists caller display name once captured.
vet-live-callsReal-time vet live-call feed.
vet-live-transcript-webhookStreams partial transcripts for the vet live console.
get-elevenlabs-keyResolves the right ElevenLabs API key per client/account.
sync-agent-callsCron pull of recent agent calls (redundancy layer 2).
agent-metrics / client-metricsAggregated minutes / call-count / outcome rollups.

19.3 Lead & Pipeline Engine

FunctionPurpose
auto-create-leadsCreates a lead from a call/email/form, deduplicates by email, attaches activity.
enrich-leadsEnriches lead with name, company, role, social signals.
verify-leadsPhone/email validation + dial-tone preflight.
scrape-leadsWeb/SERP scraping pipeline (background queue).
recalculate-lead-prioritiesWarm/cold logic — AI-detected interest overrides negative dispositions.
bulk-match-lead-listsMatches imported CSV/XLSX leads against existing CRM.
clean-business-namesNormalizes business names; strips fragment IDs and AI markers (Lead Portal Presentation Standard).
call-historyAuthenticated call list endpoint for portals.
call-center-apiProgrammatic call-center API for command-center role.

Backfills: backfill-leads, backfill-lead-phones, backfill-phones, backfill-call-appointments, backfill-followup-leads, backfill-admin-attachments, backfill-solar-case-intelligence. Used when retroactively re-running pipeline logic.

19.4 Billing — Stripe, PayPal, Multi-Entity

FunctionPurpose
create-checkout-sessionCreates Stripe Checkout for Essential/Enterprise. Routes to correct legal entity (EU EUR / UK GBP / Americas USD).
verify-checkout-sessionPost-payment verification + onboarding redirect.
track-checkout-sessionAbandoned-cart tracking.
stripe-webhookMulti-entity webhook router — picks the right entity by webhook signing secret. Triggers fulfillment, deduplicates leads by email, marks closed_won.
wl-verify-stripeWhite Label partner Stripe Connect verification.
customer-portalStripe customer portal session for self-serve.
cancel-subscriptionPeriod-end cancel for paid; instant for trials (Stripe Cancellation Standard).
admin-cancel-subscriptionAdmin override cancel.
sync-stripe-subscriptionPull-down resync.
fetch-stripe-customers / fetch-stripe-subscription-detail / fetch-stripe-transactionsLive Stripe reads (Live Stripe Billing Architecture — bypasses local DB).
fetch-billing-metrics / fetch-financial-summaryExecutive Finance Hub feeds.
create-payment-linkGeneric Stripe payment link generator.
create-excursion-invoice / create-rental-invoice / create-solar-invoiceIndustry invoicing.
create-solar-paypal-invoicePayPal invoicing variant.
excursion-create-checkout / excursion-send-payment-link / verify-excursion-paymentExcursions full payment lifecycle.
report-usageStripe metered-usage reporter (per minute/per call).
sync-exchange-ratesUpdates exchange_rates for executive EUR normalization.

19.5 Documents — Contracts, Proposals, Quotes, NDA

FunctionPurpose
generate-proposalAI-drafts a proposal (blocks JSON).
generate-proposal-pdfRenders proposal HTML → A4 PDF (puppeteer/headless chromium).
proposal-ogDynamic Open Graph image renderer for public proposals (SEO/share preview).
track-proposalView tracking + UTM attribution.
generate-quote / generate-quote-pdf / quote-ogQuote (Presupuestos) parity with proposals.
process-signatureCaptures signer signature, stamps PDF, locks contract.
regenerate-signed-contractRebuilds final PDF when fields/templates change.
notify-contract-eventMulti-recipient notifications on contract lifecycle.
decline-documentSigner-side decline path.
get-contract-signed-urlIsolated time-limited signed URL per signer.
get-signing-sessionPer-signer signing context (token).
send-contract-email / send-contract-reminderEmail delivery and reminders.
process-nda-signature / regenerate-nda-pdfNDA-specific flow (3-year, Spanish law).

19.6 Email Infrastructure

Domains/Health: manage-email-domain, manage-admin-email-domain, email-health-check, sync-email-stats.

Inbound: receive-inbound-email, setup-inbound-webhook, sync-admin-inbox, sync-admin-inbox-cron.

Campaigns: send-email-campaign, send-scheduled-campaigns, process-sequence-sends, email-campaign-webhooks, spam-filter (heuristic + sanitization), handle-unsubscribe.

Transactional senders (atomic, branded): send-account-setup-email, send-admin-email, send-agent-live-email, send-appointment-notification, send-approval-email, send-rejection-email, send-booking-confirmation, send-rental-booking-confirmation, send-excursion-booking-confirmation, send-excursion-checkin-email, send-event-ticket, send-client-activation-email, send-client-invitation, send-cold-call-email, send-integration-notification, send-invoice-email, send-meeting-invite, send-notification-email, send-onboarding-form-email, send-partner-application-email, send-password-reset, send-payment-confirmation, send-portal-link, send-recovery-email, send-sales-rep-welcome-email, send-solar-email, send-solar-stage-email, send-ticket-email, send-welcome-email, send-wl-invitation.

Vault email/share: vault-share, vault-share-email. Attachments: resolve-admin-attachment.

19.7 Calendar & Scheduling

FunctionPurpose
google-calendar-syncOAuth + bidirectional Google Calendar sync.
sync-calendar-feedsBackground poll (60s) of subscribed iCal feeds; PT1M TTL; sanitization.
export-calendar-ical / export-rental-icalOutbound iCal feeds.
generate-meet-linkCreates Google Meet link for appointments.
excursion-manifest-availabilityReal-time vessel capacity + overlap checks (ElevenLabs Calendar Tool).

19.8 OTA / GYG / Rentals Pricing

FunctionPurpose
gyg-supplier-api / gyg-webhookGetYourGuide supplier integration.
sync-ota-bookingsPull bookings from Airbnb/Booking/VRBO via iCal.
ota-ical-feedOutbound feed exposing internal bookings to OTAs.
sync-rental-calendarsMaster rentals calendar reconciler.
rental-dynamic-pricingPricing engine — demand, seasonality, lead time, day-of-week.
rental-guest-messagesGuest messaging orchestration.
rental-guest-portalServer-rendered guest portal (check-in, info, upsells).
rental-owner-statementMonthly owner P&L PDF.
rental-review-analyzerGuest review NLP — sentiment, themes, action items.

19.9 Vets-Specific

FunctionPurpose
vet-ai-docsTriple output — clinical SOAP, owner-friendly summary, internal staff notes.
vet-ai-triageSymptom → severity + recommended action.
vet-case-emailBranded case-update email to owner.
vet-generate-handoverEnd-of-shift handover summary (active cases, pending decisions, high-risk animals, follow-ups due).
seed-vet-demo / seed-vet-demo-dataDemo environment seeders.

19.10 Solar / Real Estate

process-solar-intake — public solar form ingestion; update-solar-case-stage — pipeline stage updates with notification fan-out.

19.11 Entertainment

entertainment-ai-shows — AI generates show drafts; entertainment-ai-populate — populates dropdowns/metadata across the portal.

19.12 Push Notifications

send-push-notification — fans out from notifications realtime to OneSignal; get-onesignal-config — client config endpoint.

19.13 Auth, Account, KYC

activate-client-account, activate-wl-account, admin-bootstrap-user, bootstrap-test-client, create-user, delete-user, delete-client-account (deep referential cascade), submit-kyc, admin-kyc-review, twilio-kyc-webhook, admin-twilio-manage, verify-custom-domain, resend-activation-email, register-attendee, check-in-attendee.

19.14 AI Chat / Programmable API

FunctionPurpose
ai-support-chatIn-portal AI chat (cache-aware) — escalates to ticket when stuck.
xpand-bot-chatInternal sales-rep AI assistant (XpandBot).
xpand-apiPublic Client Integration API — programmable lead pipeline, contracts, calls.
xpand-admin-apiAdmin-only API (super_admin token).
handle-sales-contact-requestRoutes inbound sales contact form.
explain-addonAI explains pricing addon to user.
translate-content / translate-scopeOn-demand translation (cached).
estimate-outbound-costCost estimator for outbound campaigns.
process-payoutPartner/rep payout execution.
seed-documentation / seed-resourcesSeeds the docs/resources library.
get-internal-api-secretResolves the internal automation secret (vs pg_cron anon source).

20. Hooks Reference — Reusable Domain Logic

20.1 Auth, Account, Client Context

  • useClientAccountId — resolves the active client_account_id for the logged-in user.
  • useClientBranding / useWLBranding / useMicrositeBranding — pulls branding (logo, primary color, favicon, name).
  • useWLFaviconEffect — applies WL favicon at runtime.
  • useCustomDomainResolver — resolves the right tenant for the current host.
  • useSubscription — current Stripe subscription state.
  • useClientUsage — minute/call usage with thresholds.

20.2 Pipelines & Stages

  • useClientPipelineStages — generic dynamic stages.
  • useExcursionPipelineStages — excursions-specific stages.
  • useWLPipelineStages — WL stages.
  • useSidebarBadges / useExcursionsSidebarBadges — unread counts in sidebars.
  • useInboxUnreadCount — admin inbox badge.

20.3 Calls, Live Status, Notifications

  • useExcursionsRealtime — realtime channel subscription.
  • useLeadAndAppointmentAlerts — toast/sound alerts.
  • useNotifications / useNotificationSounds — in-app notification feed + audio.
  • useReminders / useReminderNotifier / useAppointmentReminders — reminders engine.
  • useOneSignal — push subscription lifecycle.
  • useVetNotifications — vet-specific alert routing.

20.4 Documents — Contracts / Proposals / Quotes / Vault

  • useContracts / useContractSignedUrl / useContractSigning — full signing flow.
  • useProposalPdf / useQuotePdf — PDF render hooks.
  • useVault — vault listing + share creation.
  • useResourceFolders — vault folder tree.
  • useDocumentation — docs reader.

20.5 Billing & Payments

  • useInvoices — Stripe live invoice list.
  • usePaymentLinks — generated links.
  • useAbandonedCheckouts — recover carts.
  • useExchangeRates — for EUR normalization.
  • usePricing / useEssentialPricing / useEnterprisePricing / useEnterpriseAddons / useAgentTypePricing / useUsagePricing / useRentalPricing — pricing engines.

20.6 Email & Inbox

  • useEmailAccounts / useAdminEmailAccounts — connected mailboxes.
  • useAdminInbox / useCallCentreInbox — inbox state.
  • useLiveResendStatus — Resend domain health.
  • useRecipientSuggestions — contact autocomplete.

20.7 Tasks, Teams, Sales Resources

  • useTasks / useTaskBoards — kanban tasks.
  • useTeams / useTeamManagement / useShareableUsers — team CRUD + assignments.
  • useSalesScripts / useSalesObjections / useSalesDocs — Sales Resource Hub.
  • useSalesCallBooking — book sales calls.

20.8 Industry-Specific

  • Vets: useVetClinicalTasks, useVetHandover, useVetTimeline, useVetDemoSimulation, useVetNotifications.
  • Excursions: useExcursionsRealtime, useExcursionsSidebarBadges, useExcursionPipelineStages, useUserVesselScope, useMarkAllBookingsSeen, useMarkExcursionItemsSeen, useTranslatedExcursion.
  • Rentals: useRentalPricing.
  • Real Estate: usePropertyImport, usePropertyMatching.
  • Call Centre: useCallCentreCases, useCallCentreLeadLists, useCallCentreInbox.

20.9 Misc Utility

  • useApiKeys — manages 3-tier API keys (Admin/Client/MCP).
  • useFeatureRequests — feature request board.
  • useSupportTickets / useTicketingEnabled — ticketing.
  • useDeveloperStats — developer portal KPIs.
  • useLegalEntities — XPAND EU/UK/Americas entities.
  • useAIChat — AI chat session.
  • useVoiceNote — voice-note recorder/uploader.
  • usePersistentState / usePersistentAudioController — UI state persistence.
  • usePortalPrefix — current portal URL prefix.
  • useConfirmDialog — non-native confirm replacement (AlertDialog standard).
  • useMicrositePageTitle — sets <title> per microsite page.
  • useOutboundRequests — outbound campaign queue state.
  • useClient360 / useClient360Live — admin client 360° hooks.
  • useProjectCommand — admin project command-center hook.

21. Component Library Reference

21.1 Layout & Navigation

  • DashboardLayout, DashboardSidebar, MobileSidebar — admin shell.
  • DeveloperLayout / DeveloperSidebar — developer shell.
  • WhiteLabelLayout / WhiteLabelSidebar — WL shell.
  • client/ClientLayout(Route), ClientSidebar, ClientMobileSidebar.
  • Industry layouts: vets/VetsLayout+sidebar+mobile, realestate/RealEstateLayout(Route)+sidebar+mobile, excursions/ExcursionsLayout+sidebar+mobile + CrewLayout, rentals/RentalsLayout(Route)+sidebar+mobile, marketing/MarketingLayout+sidebar+mobile, entertainment/EntertainmentLayout(Route)+sidebar+mobile, callcentre/CallCentreLayout+sidebar+mobile, owner/OwnerLayout+sidebar+mobile.
  • NavLink, ProtectedRoute, LanguageToggle, ThemeToggle, XpandMark.

21.2 Notifications & Realtime

  • NotificationBell, NotificationPreferences, NotificationTester, OneSignalInitializer, MobilePushSettings.
  • ReminderNotifier, ActiveCallsTicker, AnimatedBadgeCount, AnimatedNumber.
  • vets/VetNotificationBell, vets/EmergencyAlertStrip.

21.3 Calendar

  • CalendarGrid, CalendarHeader, DayView/WeekView/MonthView and Modern variants, SleekTimePicker, AppointmentDialog/AppointmentDetailDialog, CalendarSyncSettings, GoogleCalendarConnect.

21.4 Calls & Audio

  • AudioPlayerWithWaveform, SyncedTranscript, MobileCallCard, MobileOutboundCard.

21.5 KYC

  • kyc/StepWelcome, StepBusiness, StepRepresentative, StepAddress, StepDocuments, StepReview, StepIndicator, KycField, DocumentUpload, CameraCapture, ContinueOnPhone, RejectedBanner, WhyRequiredDisclosure.

21.6 Contracts

  • ContractCard, ContractFieldEditor (drag/drop signature fields), ContractStatusBadge, ContractAuditLog, ContractTemplateCard, CreateContractDialog, AssignClientDialog, SignaturePad, NdaDetailDialog.

21.7 Proposals & Quotes

  • proposals/ProposalEditor, ProposalRenderer. quotes/QuoteEditor, QuoteRenderer.

21.8 Vault & Documents

  • vault/VaultPdfViewer, VaultVideoPlayer (video.js theme), VaultFolderTree, VaultThumb, PdfThumbnail, VideoThumbnail, VaultPreviewDialog, VaultMoveDialog, VaultShareDialog, VaultUploadTray, VaultShortcutsDialog, VaultIcons.
  • documents/DocumentPreviewDialog, FolderTree, FolderCreateDialog.
  • docs/DocumentationReader, ResourcesLibrary.

21.9 Tasks

  • tasks/TaskBoard + TaskColumn + TaskCard, TaskDetailDialog, TaskCreateDialog, TaskListView, TaskMobileBoard, TaskFilters, TaskBoardCreateDialog, TaskBoardSettingsDialog, TaskBoardSidebar, TaskBoardMobileSelector, AssigneesMultiSelect, SimpleRichTextEditor.

21.10 Support & AI Chat

  • support/AIChatWidget, MinimalAIChatWidget, EnhancedAIChatWidget, AIChatHistoryDialog, AIChatSummary, AIChatContextBanner.
  • TicketMessageThread, MessageAttachments, SendEmailDialog, WhatsAppButton.
  • FeatureRequestForm, FeatureRequestList, HelpCentreActionCard, HelpCentreQuickLinks.
  • SalesCallBookingForm, CheckoutSalesContactDialog.

21.11 Billing

  • billing/SubscriptionCard, SubscriptionDetailDialog, CancellationDialog, InvoiceList, UsageMeter, PaymentLinkGenerator, BillingCountrySelector.

21.12 Pricing

  • pricing/EssentialPricingCard, EnterprisePricingCard, EnterpriseCalculator, AgentTypePricingCard, AddonsManager, AddonInfoButton, AddonInfoDialog, CurrencyPricingTabs, ExchangeRateDisplay.

21.13 Inbox

  • inbox/PortalInbox, AttachmentPreviewDialog, inbox/client/*.

21.14 Outbound & Leads

  • outbound/OutboundUploadDialog. leads/FormSubmissionNote.

21.15 Team & Settings

  • team/TeamMemberCard, TeamMemberDetailDialog, AddTeamMembersDialog, AddSalesRepDialog. settings/ApiKeysTab.

21.16 Sales Resource

  • sales-resource/DocCard, DocUploader, SalesDocThumb, ScriptEditor, ScriptReader, ObjectionCard, ObjectionEditor.

21.17 Vets-Specific Components

  • EmergencyAlertStrip, AfterHoursIndicator, RepeatCallerBadge, OwnerEmotionalState, MissedCallQueue, ExpectationLogger, EscalationDialog, EscalationPanel, FailSafeIndicator, InternalCaseChat, CaseTimeline, ClinicalTaskCard, AddClinicalTaskDialog, AddAnimalDialog, AddOwnerDialog, AdviceLog, AIDocumentationButton, VetsAnalytics, VetsPortalGuide, VetPipelineStagesSettings.

21.18 Real Estate Components

  • LeadCard, LeadTableView, LeadActivityManager, LeadRankingWidget, AIPriorityQueue, AIFollowUpSuggestion, RecentCallsWidget, DealStallInsightsWidget, SecondBrainWidget, SensitiveCaseAlert, RealEstateAnalytics, PropertyImportDialog, REPageHeader.

21.19 Excursions Components

  • ExcursionsBookingDetail, ExcursionsCalendarView, ExcursionsCustomerDetail, ExcursionsDeepAnalytics, ExcursionPipelineSettings, ExcursionsBrandingSettings, ExcursionsPaymentSettings, ExcursionImageGallery, ExcursionIntegrations, ExcursionBookingSidebar, BookingsExportMenu, CheckInQRDialog, QRScannerDialog, OTASyncStatus, GYGApiTesting, AddVesselDialog, VesselDetailSheet, PaymentConfirmationDialog, catalog-editor/*, checkout/*.

21.20 Rentals Components

  • RentalsAIInsights, RentalsDeepAnalytics, RentalsRevenueAnalytics, RentalsOperationalStatus, RentalsLiveCallStatus, RentalsBrandingSettings.

21.21 Entertainment Components

  • EntertainmentDatePicker, EntertainmentDateTimePicker, EntertainmentTimePicker (custom bilingual pickers), AIPopulateDialog.

21.22 Call Centre Components

  • CallCentreLiveCallStatus, CallCentreCaseCard, CallCentreCasesExportMenu, CallCentreContactField, CallCentrePriorityStrip, CallCentrePipelineStagesSettings, CallCentrePortalGuide, OpenerDashboard, CloserDashboard, PaymentConnectionHero, PaymentLinkSettings, StripeSetupWizard, PayPalSetupWizard, CustomDomainSettings, InboxAccessManager, AddCallCentreLeadDialog, claims/*, inbox/*.

21.23 Admin Components

  • AdminInboxAccessManager, AdminInboxSettings, AdminPersonalAccountsManager, AdminSharedAccountsManager, EditDisplayNameDialog, AbandonedCartDetailDialog, CommissionDetailDialog, PayoutDetailDialog, PaymentLinksApiTestReport, clients/*, wl-detail/*.

21.24 Call Center (Cross-Industry Command)

  • call-center/CallCenterApiPanel, CallCenterMemoryPanel, AgentsPanel, ClientsPanel, ActivityLogPanel, CreateClientWizard, ElevenLabsAccountsManager, AgentMemorySetupGuide.

21.25 Finance & Reporting

  • finance/CashFlowTab, BudgetsTab, ExpensesTab, InvestmentsTab, ReportsTab, FinanceErrorBoundary, pdf/* (A4 PDF renderers, monospace fonts).

21.26 Onboarding

  • onboarding/CallTypesSelector, LanguageSelector, SystemsSelector, OnboardingIntegrations, plus OnboardingTypes.ts / SimplifiedOnboardingTypes.ts schemas.

21.27 Owner Portal Components

  • owner/OwnerLayout, OwnerSidebar, OwnerMobileSidebar.

21.28 White Label & Microsite

  • wl/BankingSetupWizard, PipelineStagesSettings, StripeSetupRequired. wl-site/* for the public microsite.

21.29 Shared / Client UX

  • shared/ActivitySection, VoiceNoteButton, VoiceNotePanel.
  • client/CalendarBookingSettings, CallAnalytics, CallbackDialog, DeliveryTracker, EmailLeadDialog, HelpDesk, IntegrationConfigModal, Integrations, KycTrackerCard, LeadPriorityDropdown, LeadStatusDropdown, QuickAppointmentDialog, UpcomingBookingsDialog.
  • MetricCard, PerformanceChart, ProjectPipelineWidget, QuickLinks, RecentActivity, ProfilePictureUpload, SystemStatusControl, ClientDisabled, AccountDeleted, PendingApproval.

21.30 Checkout

  • checkout/CheckoutLanguageSwitcher, PhoneInputWithCountry.

21.31 Project & Delivery

  • projects/TwilioKycPanel, projects/command/*, projects/delivery/*.

22. Major Feature Deep-Dives

22.1 Triple-Redundancy Call Processing

  1. Layer 1 — Webhook (elevenlabs-post-call-webhook): authoritative path, near real-time.
  2. Layer 2 — Cron (sync-agent-calls): every minute, pulls last N hours of calls and replays missing ones.
  3. Layer 3 — Background sync: on portal load, hooks like useExcursionsRealtime reconcile against DB.

Failsafe: every call ends up in agent_calls with analysis_status flag; analyzers idempotent via ai_response_cache keyed on transcript hash.

22.2 Lead Pipeline & Priority Resolution

  • Leads created by auto-create-leads (calls/forms/email/import).
  • recalculate-lead-priorities runs warm/cold logic — AI-detected interest overrides negative dispositions.
  • Stage resolution dynamic: stage_order fallback rather than hardcoding 'new_inquiry' (per Lead Pipeline Stage Resolution Standard).
  • Post-checkout fulfillment dedupes by email and forces closed_won, redirecting to onboarding form.
  • UI sanitization blocks fragment IDs; business name shown bold-priority; AI markers cleaned.

22.3 Contracts End-to-End

  1. Admin/WL/CC creates contract from template (CreateContractDialog).
  2. Field editor maps signers + signature/date/text fields (ContractFieldEditor, drag/drop on PDF).
  3. send-contract-email issues per-signer signed URL (get-contract-signed-url).
  4. Signer opens SignContract page → get-signing-sessionSignaturePadprocess-signature stamps PDF.
  5. regenerate-signed-contract rebuilds final PDF on field/template changes.
  6. notify-contract-event fans out lifecycle notifications. decline-document for refusals. ContractAuditLog kept for compliance.

22.4 Proposals & Quotes (Hosted, Branded)

  • AI generation via generate-proposal / generate-quote (block JSON).
  • Editor: ProposalEditor / QuoteEditor (interactive blocks, legal entity + currency).
  • Public hosted page: PublicProposal / PublicQuote / PublicEntertainmentProposal with dynamic OG (proposal-og, quote-og).
  • PDF: generate-proposal-pdf / generate-quote-pdf (A4, branded).
  • Tracking: track-proposal (views, UTM); analytics in admin/ProposalAnalytics.

22.5 Vault

  • AdminVault + industry-portal vault tabs share useVault.
  • Folder tree (VaultFolderTree), thumbnails (VaultThumb, PdfThumbnail, VideoThumbnail).
  • Preview: VaultPreviewDialog with PDF (VaultPdfViewer) and video (VaultVideoPlayer + custom video.js theme).
  • Move (VaultMoveDialog), upload tray (VaultUploadTray), keyboard shortcuts (VaultShortcutsDialog).
  • Share via email (vault-share-email) or token-gated public link (PublicVaultShare + vault-share).

22.6 Support / Ticketing System

  • Realtime chat tickets (TicketMessageThread, Supabase Realtime).
  • AI chat widget with escalation: AIChatWidget / EnhancedAIChatWidget / MinimalAIChatWidget.
  • AI summary + history: AIChatSummary, AIChatHistoryDialog. Context banner clarifies that AI knows the user's portal context.
  • Escalation creates a ticket via ai-support-chat; admin/dev sees thread with full AI context attached.
  • Feature requests: FeatureRequestForm + FeatureRequestList.
  • Sales contact / call booking: SalesCallBookingForm, CheckoutSalesContactDialog, handle-sales-contact-request.
  • WhatsApp escape hatch: WhatsAppButton.

22.7 Email Campaigns & Sequences

  • Drip sequences with pipeline-stage triggers (per Email Marketing Platform memory).
  • Sender chain: send-email-campaign (single push) → send-scheduled-campaigns (cron) → process-sequence-sends (sequence step).
  • email-campaign-webhooks ingest Resend events; sync-email-stats rolls up.
  • spam-filter heuristic + Email Marketing Sanitization Protocol (strip base64, styles, titles for Gmail).
  • Fallback domain rotation; unsubscribe via handle-unsubscribe.
  • Template builder: EmailTemplates page; HTML import protected via email_format: 'html'.

22.8 Inbox (Unified)

  • AdminInbox, CallCentreInbox, EntertainmentInbox, MarketingInbox all share inbox/PortalInbox core.
  • Inbound: receive-inbound-email + setup-inbound-webhook.
  • Cron: sync-admin-inbox + sync-admin-inbox-cron keep mailboxes fresh.
  • Access control: AdminInboxAccessManager, InboxAccessManager (Call Centre).
  • Personal vs shared mailboxes: AdminPersonalAccountsManager, AdminSharedAccountsManager.

22.9 Reminders & Tasks

  • Reminders (AdminReminders) drive useReminderNotifier toasts and push.
  • Appointment reminders (useAppointmentReminders) auto-fire before bookings.
  • Tasks: useTasks + useTaskBoards power admin/dev/client task boards (TaskBoard, TaskListView, TaskMobileBoard).
  • Vets clinical tasks separate (useVetClinicalTasks + ClinicalTaskCard).

22.10 Calendar (Two-Way iCal Sync)

  • Background polling every 60s (sync-calendar-feeds); PT1M TTL; sanitization removes spam fields.
  • Outbound: export-calendar-ical, export-rental-ical.
  • Google: google-calendar-sync + generate-meet-link.
  • UI: ModernDay/Week/MonthView, AppointmentDialog, SleekTimePicker. Excursions has its own ExcursionsCalendarView. Entertainment custom pickers for bilingual scheduling.

22.11 OTA / Rentals Operations

  • Two-way iCal with Airbnb/Booking/VRBO via sync-ota-bookings + ota-ical-feed + sync-rental-calendars.
  • Dynamic pricing engine (rental-dynamic-pricing) — demand × seasonality × lead-time.
  • Guest portal (rental-guest-portal), messaging (rental-guest-messages), reviews (rental-review-analyzer).
  • Cleaning + maintenance + cleaners scheduling.
  • Owner portal (separate, see §14) + monthly statement (rental-owner-statement).

22.12 Excursions Operations

  • Vessel-aware pricing & manifests (per-client grounding — never hardcode vessel names).
  • Real-time availability + overlap checks (excursion-manifest-availability).
  • QR check-in (CheckInQRDialog, QRScannerDialog, send-excursion-checkin-email).
  • Crew portal at /excursions/crew (CrewLayout, CrewManifestView).
  • GYG supplier (gyg-supplier-api, gyg-webhook, GYGApiTesting UI).
  • Daily till (ExcursionsDailyTill) for cash reconciliation.
  • Public booking widget embeddable.

22.13 Vets Clinical Suite

  • Triage & emergency: EmergencyAlertStrip, AfterHoursIndicator, EscalationPanel/Dialog, MissedCallQueue.
  • Caller intelligence: RepeatCallerBadge, OwnerEmotionalState.
  • Case timeline (CaseTimeline + useVetTimeline).
  • Clinical tasks (ClinicalTaskCard + useVetClinicalTasks).
  • Internal case chat (InternalCaseChat).
  • AI documentation triple output (AIDocumentationButtonvet-ai-docs).
  • End-of-shift handover (vet-generate-handover + useVetHandover).
  • Demo simulator (useVetDemoSimulation + seed functions).
  • Failsafe indicator surfaces redundancy state.

22.14 Real Estate Specialization

  • Lead matching engine (REMatching, usePropertyMatching).
  • AI priority queue + follow-up suggestions (AIPriorityQueue, AIFollowUpSuggestion).
  • Deal stall insights, second brain, sensitive case alerts.
  • Property import (usePropertyImport + PropertyImportDialog).
  • Distribution (round-robin), commissions, transactions, forecasting, predictions, market insights.

22.15 Entertainment Specialization

  • 4 primary areas: Shows, Leads, Outreach, Finance.
  • Shows / Show Detail / Create Show with full-width inline animated panels (not modal dialogs).
  • Talent roster (26+ bilingual EN/ES categories), Venues, Settlements.
  • Public Event Page + dynamic OG. Public proposal with automated styling.
  • AI tools (entertainment-ai-shows, entertainment-ai-populate).
  • Custom bilingual date/time pickers.
  • Unified CRM (shared contact + company toggle, detailed caller memory).

22.16 Call Centre Specialization

  • Lead-list driven outbound + inbound; cases & claims.
  • Talk Ratio dashboard metric.
  • Unified Stripe + PayPal billing.
  • Setup wizards: StripeSetupWizard, PayPalSetupWizard, CustomDomainSettings.
  • Opener / Closer dashboards.

22.17 White Label Partner Ecosystem

  • Custom domains via verify-custom-domain + useCustomDomainResolver.
  • Branding isolation (no XPAND markers); useWLBranding + useWLFaviconEffect.
  • Banking setup wizard (BankingSetupWizard); Stripe Connect (wl-verify-stripe).
  • Payouts (process-payout, WhiteLabelPayouts).
  • Microsite (wl-site/*) for public marketing.
  • Commissions (single source vs Finance-Commissions parity).

22.18 Pricing & Subscriptions

  • Three pricing axes: Essential plan, Enterprise tier, per-agent type.
  • Addons (AddonsManager) with AI explanation (explain-addon).
  • Currency tabs (EUR/GBP/USD) auto-route to legal entity.
  • Live Stripe billing (fetch-stripe-*, bypasses local DB).
  • Outstanding revenue requires non-null email_sent_at (per Outstanding Revenue Logic).

22.19 KYC & Onboarding

  • Multi-step wizard: Welcome → Business → Representative → Address → Documents → Review.
  • Continue-on-phone (ContinueOnPhone) for camera capture flow.
  • Twilio KYC integration (twilio-kyc-webhook, admin-twilio-manage, TwilioKycPanel).
  • Admin review (AdminKycReview + admin-kyc-review).
  • Onboarding setup wizard layout: persistent header, deep padding, Framer Motion (per Setup Wizard Layout Constraint).
  • Developer email bypass: @xpandagent.io skips delivery tracker.

22.20 Notifications, Push & PWA

  • In-app notifications table with Realtime subscription.
  • Push fan-out: send-push-notification → OneSignal Web SDK v16.
  • push_subscriptions table; PWA installable; iframe-safe.
  • MobilePushSettings, NotificationPreferences, NotificationTester.
  • Notification translation (notificationTranslation.ts) localizes payloads.

22.21 Programmable Client Integration API

  • xpand-api exposes lead pipeline, contracts, calls.
  • Three-tier API keys (Admin / Client / MCP), SHA-256 hashed with prefixes.
  • MCP 2-layer auth (token hash + X-Xpand-Api-Key).
  • API Keys management UI: AdminApiKeys + settings/ApiKeysTab + useApiKeys.

22.22 Finance Hub & Executive Reporting

  • Executive EUR normalization via useExchangeRates + sync-exchange-rates.
  • Setup Fees vs MRR split. Real-time P&L charts.
  • A4 professional PDF reports, monospace fonts (finance/pdf/*).
  • Cash flow / Budgets / Expenses / Investments / Reports tabs.
  • Dashboard revenue rule: 30-day window, max(closed-won estimates, paid invoices).

22.23 Sales Resource Hub

  • Three artifact types: Scripts, Objections, Docs.
  • Script editor + reader, objection editor + cards, doc uploader + thumbnails.
  • Surfaced inside admin and (sanitized) WL portal.

22.24 Mobile / PWA / Offline

  • Manifest at public/manifest.json; OneSignal SW at public/OneSignalSDKWorker.js.
  • useIsMobile, mobile sidebars per portal, dedicated mobile cards (MobileCallCard, MobileOutboundCard).
  • Voice notes via useVoiceNote + VoiceNoteButton/VoiceNotePanel.

22.25 Industry Routing

  • Index.tsx redirects based on userRole + clientIndustry:
    • vets/vets/dashboard
    • real_estate/realestate/dashboard
    • excursions/excursions/dashboard
    • rentals/rentals/dashboard
    • marketing/marketing/dashboard
    • entertainment/entertainment/dashboard
    • call_centre/callcentre/dashboard
    • generic → /client/dashboard
  • client_crew/excursions/crew. white_label/wl/dashboard. developer/dev/dashboard. call_center/command_center_dev/call-center. sales_*/xpand-bot.

22.26 Demo & Soft-Delete UX

  • Demo accounts: status: 'demo' interception in AuthContext; vets demo seeders.
  • Soft-deleted: status: 'deleted' interception → animated localized recovery screen (AccountDeleted + send-recovery-email).
  • Pending approval: PendingApproval interstitial.
  • Disabled: ClientDisabled interstitial.

22.27 Deletion / Confirmation Standard

  • Native confirm() prohibited platform-wide.
  • Mandatory AlertDialog (useConfirmDialog) with optimistic UI updates.
  • Agent deletion follows deep referential cascade protocol to safely purge agent + related records.

22.28 Translation & Localization

  • react-i18next with EN/ES baseline. No hardcoded strings, no notranslate tags.
  • On-demand AI translation (translate-content, translate-scope) cached in ai_response_cache.
  • Localized fallback strings + SVG placeholders (UI Resilience Standard).

22.29 Security Memory & Posture

  • Strict RBAC, fail-closed, Zod everywhere, masked PII, token auth.
  • Internal Automation Authentication Policy: service role header for app calls; pg_cron uses anon key — code differentiates source.
  • API Polling Resilience: client-side getSession for high-frequency polling, empty payload fallback.
  • Radix UI Select non-empty values: use "__all__" placeholder, never empty strings.
  • Edge Function Cold Start: refactor sub-modules to bypass 10s BOOT_ERROR.

22.30 Stripe Subscription Cancellation Standard

  • Trial subs → instant cancel.
  • Paid subs → cancel at period end.
  • Implemented uniformly across cancel-subscription + admin-cancel-subscription.

23. Database & Realtime — Key Tables

(Inferred from edge functions + hooks; see live schema for canonical truth.)

TablePurpose
user_rolesRBAC (9 roles) — never on profiles.
profilesUser profile data.
client_accountsTenants. Industry attribute drives portal routing.
client_usersUser ↔ client_account membership.
client_pipeline_stagesDynamic per-tenant pipeline stages.
agent_leadsLead/case records (used vet-side for cases too).
agent_callsCall records + transcripts + analysis status.
appointmentsBookings (calendar core).
notificationsRealtime in-app notifications.
push_subscriptionsOneSignal device subscriptions.
ai_response_cacheCache for analyzers/translations/explanations.
vet_clinical_tasks, vet_shift_handovers, vet_case_timelineVets clinical suite.
contracts, contract_signers, contract_fields, contract_audit_logContracts engine.
proposals, quotesHosted documents.
email_campaigns, email_sequences, email_templatesMarketing platform.
vault_items, vault_sharesVault storage refs.
support_tickets, ticket_messages, ai_chat_messages, ai_chat_sessionsSupport/chat.
tasks, task_boardsTasks engine.
legal_entities, exchange_ratesMulti-entity finance.
payment_links, invoices, subscriptionsBilling.
feature_requestsFeature board.
documentation, resourcesKnowledge libraries.
api_keys (3-tier hashed)Programmable API.
excursion_* (vessels, manifests, bookings)Excursions ops.
rental_properties, rental_bookings, rental_owners, rental_reviews, rental_pricing_rules, rental_cleaning_*, rental_maintenance_*Rentals ops.
re_* (properties, deals, viewings, transactions)Real estate.
entertainment_* (shows, talent, venues, settlements, events)Entertainment.
call_centre_cases, call_centre_lead_listsCall Centre.
kyc_submissions, nda_submissionsCompliance.

Realtime channels in active use: notifications, messages, ai_chat_messages, live calls, push fan-out, excursions feed.


24. Integrations Catalog

Logos under public/images/integrations/. Visible in onboarding/integrations modules:

Acuity, Airtable, Asana, BigCommerce, Cal.com, Calendly, ClickUp, Close, Crisp, Discord, Freshdesk, GraphQL, Help Scout, HubSpot, Intercom, Mailchimp, Make, Monday, n8n, Notion, Outlook, PayPal, Pipedrive, Salesforce, Shopify, Slack, Square, Stripe, Teams, Tray.io, Twilio, Vonage, WhatsApp, WooCommerce, WordPress, Workato, Zapier, Zendesk, Zoho.

Catalog generator: scripts/generate-integration-catalog.cjs.


25. Public Endpoints & Embeddable Widgets

PagePathPurpose
PublicProposal/p/:tokenHosted branded proposal.
PublicQuote/q/:tokenHosted branded quote.
PublicEntertainmentProposal/ep/:tokenEntertainment proposal variant.
PublicEventsList / PublicEventDetail / PublicEventWidgetevents routesEvent listings + embeddable widget.
PublicExcursionPage / PublicExcursionCheckout / ExcursionBookingWidget / BookingSuccess / ManageBookingPageexcursions routesBooking flow.
PublicRentalPropertyPage / PublicRentalCheckout / RentalBookingWidget / RentalBookingSuccessrentals routesBooking flow.
PublicSolarFormsolar routeSolar intake.
NdaFormnda routePublic NDA submission.
PartnerApplypartner routeWL partner application.
PublicVaultShare/v/:tokenToken-gated vault share.
SignContract/sign/:tokenPer-signer contract signing.
Unsubscribe/unsubscribeEmail unsubscribe.

All public URLs hardcoded to https://portal.xpandagent.io per Production Domain Hardcoding standard. WL pages resolve via custom domain.


26. Conventions Summary (for the CLI)

When the CLI scaffolds a new portal/feature it must:

  1. Roles — extend user_roles enum + has_role(); never store roles on profiles.
  2. Routing — add to Index.tsx redirect map using clientIndustry.
  3. Layout — create <Industry>Layout + Sidebar + MobileSidebar.
  4. Pipeline — read stages dynamically from client_pipeline_stages (no hardcoded 'new_inquiry').
  5. Calls — add analyze-<industry>-call-transcript analyzer with ai_response_cache short-circuit.
  6. i18n — every string via react-i18next; ship EN + ES.
  7. Design — semantic tokens only; pure black bg, primary #9164E5, Inter font-light, pill buttons, glassmorphism.
  8. Confirmations — never confirm(), always AlertDialog.
  9. Notifications — push fan-out via send-push-notification + in-app notifications realtime.
  10. Billing — route to legal entity by currency (EU EUR / UK GBP / Americas USD).
  11. Public URLs — hardcode https://portal.xpandagent.io (or WL-resolved domain).
  12. Demo / soft-delete — respect status interception in AuthContext.
  13. API keys — use 3-tier hashed system; never store plaintext.
  14. AI cost — default gemini-2.5-flash-lite; escalate to gemini-2.5-flash only for medical/critical reasoning.
  15. Edge functions — keep sub-modular to dodge 10s cold-start BOOT_ERROR.

End of Part II. Combined with Part I, this catalogue covers every portal, page, hook, component, edge function, and architectural rule currently shipping in the XPAND platform.

Was this page helpful?
Open Dashboard →