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
- Admin Portal (Super Admin)
- Developer Portal
- Sales Rep / Sales Manager Portal (XpandBot)
- White Label Partner Portal
- Call Center / Command Center Dev
- Generic Client Portal
- Vets Portal
- Real Estate Portal
- Excursions Portal
- Rentals Portal (Short-Term Rentals)
- Marketing Portal
- Entertainment Portal
- Call Centre Portal (Industry)
- Property Owner Portal
- Public-Facing Pages & Widgets
- White Label Microsite (wl-site)
- Edge Functions / Backend Services
- 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 viauser_rolestable. - 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 fromclient_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) — forclient_crewrole 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-portaledge 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 fromclient_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_rolestable withhas_role()security-definer function. - Industry routing via
client_industryattribute → portal redirect (Index.tsx).
Internationalization
- Strict
react-i18next, zero hardcoded strings, nonotranslatetags.
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-blackin 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.ioskips 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_cachetable (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(); mandatoryAlertDialogwith 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)
| Function | Purpose |
|---|---|
analyze-call-transcript | Generic baseline analyzer — sentiment, intent, summary, lead capture, appointment detection, AI follow-up. Cache short-circuit via ai_response_cache. |
analyze-vet-call-transcript | Veterinary-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-transcript | Real-estate-tuned: buyer/seller intent, budget, area, bedroom count, viewing intent, property-match feeders. |
analyze-rental-call-transcript | Short-term rentals: dates, party size, property preferences, OTA channel, upsell signals, cancellation risk. |
analyze-excursion-call-transcript | Excursion-specific: vessel preference (per-client grounding — never hardcode Mustang/Venecia/Pirulet/Ana), pax count, language, departure preference, Paula protocol. |
analyze-solar-call-transcript | Solar intake: roof type, monthly bill, ownership, decision authority, consumption KWh, financing interest. |
analytics-from-call-history | Aggregates historical calls into KPI rollups for dashboards. |
19.2 ElevenLabs / Voice Orchestration
| Function | Purpose |
|---|---|
eleven-labs-proxy | Generic proxy with fetchWithKeyFallback over the Dynamic Account Orchestration registry. |
eleven-labs-audio | Streams call audio (signed URL hand-off). |
elevenlabs-transcribe | Standalone transcription endpoint. |
elevenlabs-scribe-token | Issues short-lived Scribe session tokens. |
elevenlabs-post-call-webhook | Primary ingest. Triple-redundancy partner: webhook → sync-agent-calls cron → background sync. |
provision-agent-tools | Create-then-link PATCH for ElevenLabs tools (calendar, lead capture, memory, escalation). Query-string parameters; tool-safe fallback contract. |
agent-memory-lookup | XPAND MCP — Motion OS memory tool used by agents at call time. |
caller-memory | Caller history retrieval for agent grounding. |
update-caller-name | Persists caller display name once captured. |
vet-live-calls | Real-time vet live-call feed. |
vet-live-transcript-webhook | Streams partial transcripts for the vet live console. |
get-elevenlabs-key | Resolves the right ElevenLabs API key per client/account. |
sync-agent-calls | Cron pull of recent agent calls (redundancy layer 2). |
agent-metrics / client-metrics | Aggregated minutes / call-count / outcome rollups. |
19.3 Lead & Pipeline Engine
| Function | Purpose |
|---|---|
auto-create-leads | Creates a lead from a call/email/form, deduplicates by email, attaches activity. |
enrich-leads | Enriches lead with name, company, role, social signals. |
verify-leads | Phone/email validation + dial-tone preflight. |
scrape-leads | Web/SERP scraping pipeline (background queue). |
recalculate-lead-priorities | Warm/cold logic — AI-detected interest overrides negative dispositions. |
bulk-match-lead-lists | Matches imported CSV/XLSX leads against existing CRM. |
clean-business-names | Normalizes business names; strips fragment IDs and AI markers (Lead Portal Presentation Standard). |
call-history | Authenticated call list endpoint for portals. |
call-center-api | Programmatic 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
| Function | Purpose |
|---|---|
create-checkout-session | Creates Stripe Checkout for Essential/Enterprise. Routes to correct legal entity (EU EUR / UK GBP / Americas USD). |
verify-checkout-session | Post-payment verification + onboarding redirect. |
track-checkout-session | Abandoned-cart tracking. |
stripe-webhook | Multi-entity webhook router — picks the right entity by webhook signing secret. Triggers fulfillment, deduplicates leads by email, marks closed_won. |
wl-verify-stripe | White Label partner Stripe Connect verification. |
customer-portal | Stripe customer portal session for self-serve. |
cancel-subscription | Period-end cancel for paid; instant for trials (Stripe Cancellation Standard). |
admin-cancel-subscription | Admin override cancel. |
sync-stripe-subscription | Pull-down resync. |
fetch-stripe-customers / fetch-stripe-subscription-detail / fetch-stripe-transactions | Live Stripe reads (Live Stripe Billing Architecture — bypasses local DB). |
fetch-billing-metrics / fetch-financial-summary | Executive Finance Hub feeds. |
create-payment-link | Generic Stripe payment link generator. |
create-excursion-invoice / create-rental-invoice / create-solar-invoice | Industry invoicing. |
create-solar-paypal-invoice | PayPal invoicing variant. |
excursion-create-checkout / excursion-send-payment-link / verify-excursion-payment | Excursions full payment lifecycle. |
report-usage | Stripe metered-usage reporter (per minute/per call). |
sync-exchange-rates | Updates exchange_rates for executive EUR normalization. |
19.5 Documents — Contracts, Proposals, Quotes, NDA
| Function | Purpose |
|---|---|
generate-proposal | AI-drafts a proposal (blocks JSON). |
generate-proposal-pdf | Renders proposal HTML → A4 PDF (puppeteer/headless chromium). |
proposal-og | Dynamic Open Graph image renderer for public proposals (SEO/share preview). |
track-proposal | View tracking + UTM attribution. |
generate-quote / generate-quote-pdf / quote-og | Quote (Presupuestos) parity with proposals. |
process-signature | Captures signer signature, stamps PDF, locks contract. |
regenerate-signed-contract | Rebuilds final PDF when fields/templates change. |
notify-contract-event | Multi-recipient notifications on contract lifecycle. |
decline-document | Signer-side decline path. |
get-contract-signed-url | Isolated time-limited signed URL per signer. |
get-signing-session | Per-signer signing context (token). |
send-contract-email / send-contract-reminder | Email delivery and reminders. |
process-nda-signature / regenerate-nda-pdf | NDA-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
| Function | Purpose |
|---|---|
google-calendar-sync | OAuth + bidirectional Google Calendar sync. |
sync-calendar-feeds | Background poll (60s) of subscribed iCal feeds; PT1M TTL; sanitization. |
export-calendar-ical / export-rental-ical | Outbound iCal feeds. |
generate-meet-link | Creates Google Meet link for appointments. |
excursion-manifest-availability | Real-time vessel capacity + overlap checks (ElevenLabs Calendar Tool). |
19.8 OTA / GYG / Rentals Pricing
| Function | Purpose |
|---|---|
gyg-supplier-api / gyg-webhook | GetYourGuide supplier integration. |
sync-ota-bookings | Pull bookings from Airbnb/Booking/VRBO via iCal. |
ota-ical-feed | Outbound feed exposing internal bookings to OTAs. |
sync-rental-calendars | Master rentals calendar reconciler. |
rental-dynamic-pricing | Pricing engine — demand, seasonality, lead time, day-of-week. |
rental-guest-messages | Guest messaging orchestration. |
rental-guest-portal | Server-rendered guest portal (check-in, info, upsells). |
rental-owner-statement | Monthly owner P&L PDF. |
rental-review-analyzer | Guest review NLP — sentiment, themes, action items. |
19.9 Vets-Specific
| Function | Purpose |
|---|---|
vet-ai-docs | Triple output — clinical SOAP, owner-friendly summary, internal staff notes. |
vet-ai-triage | Symptom → severity + recommended action. |
vet-case-email | Branded case-update email to owner. |
vet-generate-handover | End-of-shift handover summary (active cases, pending decisions, high-risk animals, follow-ups due). |
seed-vet-demo / seed-vet-demo-data | Demo 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
| Function | Purpose |
|---|---|
ai-support-chat | In-portal AI chat (cache-aware) — escalates to ticket when stuck. |
xpand-bot-chat | Internal sales-rep AI assistant (XpandBot). |
xpand-api | Public Client Integration API — programmable lead pipeline, contracts, calls. |
xpand-admin-api | Admin-only API (super_admin token). |
handle-sales-contact-request | Routes inbound sales contact form. |
explain-addon | AI explains pricing addon to user. |
translate-content / translate-scope | On-demand translation (cached). |
estimate-outbound-cost | Cost estimator for outbound campaigns. |
process-payout | Partner/rep payout execution. |
seed-documentation / seed-resources | Seeds the docs/resources library. |
get-internal-api-secret | Resolves 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/MonthViewand 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, plusOnboardingTypes.ts/SimplifiedOnboardingTypes.tsschemas.
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
- Layer 1 — Webhook (
elevenlabs-post-call-webhook): authoritative path, near real-time. - Layer 2 — Cron (
sync-agent-calls): every minute, pulls last N hours of calls and replays missing ones. - Layer 3 — Background sync: on portal load, hooks like
useExcursionsRealtimereconcile 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-prioritiesruns warm/cold logic — AI-detected interest overrides negative dispositions.- Stage resolution dynamic:
stage_orderfallback 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
- Admin/WL/CC creates contract from template (
CreateContractDialog). - Field editor maps signers + signature/date/text fields (
ContractFieldEditor, drag/drop on PDF). send-contract-emailissues per-signer signed URL (get-contract-signed-url).- Signer opens
SignContractpage →get-signing-session→SignaturePad→process-signaturestamps PDF. regenerate-signed-contractrebuilds final PDF on field/template changes.notify-contract-eventfans out lifecycle notifications.decline-documentfor refusals.ContractAuditLogkept 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/PublicEntertainmentProposalwith dynamic OG (proposal-og,quote-og). - PDF:
generate-proposal-pdf/generate-quote-pdf(A4, branded). - Tracking:
track-proposal(views, UTM); analytics inadmin/ProposalAnalytics.
22.5 Vault
AdminVault+ industry-portal vault tabs shareuseVault.- Folder tree (
VaultFolderTree), thumbnails (VaultThumb,PdfThumbnail,VideoThumbnail). - Preview:
VaultPreviewDialogwith 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-webhooksingest Resend events;sync-email-statsrolls up.spam-filterheuristic + Email Marketing Sanitization Protocol (strip base64, styles, titles for Gmail).- Fallback domain rotation; unsubscribe via
handle-unsubscribe. - Template builder:
EmailTemplatespage; HTML import protected viaemail_format: 'html'.
22.8 Inbox (Unified)
AdminInbox,CallCentreInbox,EntertainmentInbox,MarketingInboxall shareinbox/PortalInboxcore.- Inbound:
receive-inbound-email+setup-inbound-webhook. - Cron:
sync-admin-inbox+sync-admin-inbox-cronkeep mailboxes fresh. - Access control:
AdminInboxAccessManager,InboxAccessManager(Call Centre). - Personal vs shared mailboxes:
AdminPersonalAccountsManager,AdminSharedAccountsManager.
22.9 Reminders & Tasks
- Reminders (
AdminReminders) driveuseReminderNotifiertoasts and push. - Appointment reminders (
useAppointmentReminders) auto-fire before bookings. - Tasks:
useTasks+useTaskBoardspower 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 ownExcursionsCalendarView. 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,GYGApiTestingUI). - 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 (
AIDocumentationButton→vet-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.ioskips delivery tracker.
22.20 Notifications, Push & PWA
- In-app
notificationstable with Realtime subscription. - Push fan-out:
send-push-notification→ OneSignal Web SDK v16. push_subscriptionstable; PWA installable; iframe-safe.MobilePushSettings,NotificationPreferences,NotificationTester.- Notification translation (
notificationTranslation.ts) localizes payloads.
22.21 Programmable Client Integration API
xpand-apiexposes 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 atpublic/OneSignalSDKWorker.js. useIsMobile, mobile sidebars per portal, dedicated mobile cards (MobileCallCard,MobileOutboundCard).- Voice notes via
useVoiceNote+VoiceNoteButton/VoiceNotePanel.
22.25 Industry Routing
Index.tsxredirects based onuserRole+clientIndustry:vets→/vets/dashboardreal_estate→/realestate/dashboardexcursions→/excursions/dashboardrentals→/rentals/dashboardmarketing→/marketing/dashboardentertainment→/entertainment/dashboardcall_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 inAuthContext; vets demo seeders. - Soft-deleted:
status: 'deleted'interception → animated localized recovery screen (AccountDeleted+send-recovery-email). - Pending approval:
PendingApprovalinterstitial. - Disabled:
ClientDisabledinterstitial.
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-i18nextwith EN/ES baseline. No hardcoded strings, nonotranslatetags.- On-demand AI translation (
translate-content,translate-scope) cached inai_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
getSessionfor 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.)
| Table | Purpose |
|---|---|
user_roles | RBAC (9 roles) — never on profiles. |
profiles | User profile data. |
client_accounts | Tenants. Industry attribute drives portal routing. |
client_users | User ↔ client_account membership. |
client_pipeline_stages | Dynamic per-tenant pipeline stages. |
agent_leads | Lead/case records (used vet-side for cases too). |
agent_calls | Call records + transcripts + analysis status. |
appointments | Bookings (calendar core). |
notifications | Realtime in-app notifications. |
push_subscriptions | OneSignal device subscriptions. |
ai_response_cache | Cache for analyzers/translations/explanations. |
vet_clinical_tasks, vet_shift_handovers, vet_case_timeline | Vets clinical suite. |
contracts, contract_signers, contract_fields, contract_audit_log | Contracts engine. |
proposals, quotes | Hosted documents. |
email_campaigns, email_sequences, email_templates | Marketing platform. |
vault_items, vault_shares | Vault storage refs. |
support_tickets, ticket_messages, ai_chat_messages, ai_chat_sessions | Support/chat. |
tasks, task_boards | Tasks engine. |
legal_entities, exchange_rates | Multi-entity finance. |
payment_links, invoices, subscriptions | Billing. |
feature_requests | Feature board. |
documentation, resources | Knowledge 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_lists | Call Centre. |
kyc_submissions, nda_submissions | Compliance. |
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
| Page | Path | Purpose |
|---|---|---|
PublicProposal | /p/:token | Hosted branded proposal. |
PublicQuote | /q/:token | Hosted branded quote. |
PublicEntertainmentProposal | /ep/:token | Entertainment proposal variant. |
PublicEventsList / PublicEventDetail / PublicEventWidget | events routes | Event listings + embeddable widget. |
PublicExcursionPage / PublicExcursionCheckout / ExcursionBookingWidget / BookingSuccess / ManageBookingPage | excursions routes | Booking flow. |
PublicRentalPropertyPage / PublicRentalCheckout / RentalBookingWidget / RentalBookingSuccess | rentals routes | Booking flow. |
PublicSolarForm | solar route | Solar intake. |
NdaForm | nda route | Public NDA submission. |
PartnerApply | partner route | WL partner application. |
PublicVaultShare | /v/:token | Token-gated vault share. |
SignContract | /sign/:token | Per-signer contract signing. |
Unsubscribe | /unsubscribe | Email 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:
- Roles — extend
user_rolesenum +has_role(); never store roles on profiles. - Routing — add to
Index.tsxredirect map usingclientIndustry. - Layout — create
<Industry>Layout+Sidebar+MobileSidebar. - Pipeline — read stages dynamically from
client_pipeline_stages(no hardcoded'new_inquiry'). - Calls — add
analyze-<industry>-call-transcriptanalyzer withai_response_cacheshort-circuit. - i18n — every string via
react-i18next; ship EN + ES. - Design — semantic tokens only; pure black bg, primary
#9164E5, Inter font-light, pill buttons, glassmorphism. - Confirmations — never
confirm(), alwaysAlertDialog. - Notifications — push fan-out via
send-push-notification+ in-appnotificationsrealtime. - Billing — route to legal entity by currency (EU EUR / UK GBP / Americas USD).
- Public URLs — hardcode
https://portal.xpandagent.io(or WL-resolved domain). - Demo / soft-delete — respect
statusinterception inAuthContext. - API keys — use 3-tier hashed system; never store plaintext.
- AI cost — default
gemini-2.5-flash-lite; escalate togemini-2.5-flashonly for medical/critical reasoning. - 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.