Skip to content

GxPChat Suite Architecture

Overview

GxPChat (gxpchat/) is the central operational interface uniting all Life Sciences compliance applications under a single cohesive deployment.

GxPChat Unified Interface

Technology Stack

  • Framework: Next.js 16 (App Router, Turbopack)
  • UI Runtime: React 19
  • Design System: Tailwind CSS v4 and shadcn/ui
  • AI Streaming: Vercel AI SDK (ai package) with Server-Sent Events (SSE)
  • Protocol Protocol: Model Context Protocol (FastMCP) over SSE (/mcp/sse)
  • Knowledge Graph Visualizer: Cytoscape.js with automated Cypher traversal

Application Routes Inventory

RouteSubsystemFunctional Scope
/GxPChat Conversational AssistantInteractive prompt composer, streaming tool calls, multi-agent dispatch
/qmsEnterprise QMSControlled document vault, deviations, GAMP 5 change controls, ALCOA+ audit trails
/assetsPhysical Asset ManagementMaster asset register (202 items), NIST calibrations, software-to-hardware links
/helpdeskIT Help Desk & Service DeskDual-track ticketing, Part 11 account lockouts, GxP incident escalation
/validationComputer System Validation (CSV/CSA)V-Model traceability matrix (RTM), CSA risk hub, test execution, automated VSRs
/backup-restoreBackup & Disaster RecoverySOP-IT-018/019 policy catalog, Qualified Person ledger, sandbox restoration dry-runs
/it-qmsLegacy Route ForwarderRedirects to /qms for backward compatibility

Architectural Features

1. Dynamic Runtime Reverse Proxy

GxPChat incorporates a server-side route handler at app/api/[...path]/route.ts. This handler transparently proxies browser HTTP requests to the backend API (http://api:8000 in Docker or http://localhost:8090 in local development). This eliminates Cross-Origin Resource Sharing (CORS) complications and avoids baking container hostnames into client-side JavaScript bundles.

2. Host and Protocol Resolution

All external developer console links (FastAPI Docs, Memgraph Lab, Qdrant Dashboard, RustFS Console, Langfuse) dynamically compute their destination URLs at runtime using React.useSyncExternalStore. Links automatically match the client browser’s origin IP address (for example, remote VPN or intranet IP addresses) rather than failing on hardcoded localhost references.

3. Unified Navigation Sidebar

The collapsible shadcn/ui sidebar (components/app-sidebar.tsx) offers:

  • Seamless switching between all six enterprise modules without losing authentication or session states.
  • Active route detection powered by Next.js usePathname().
  • Quick-launch links to infrastructure management consoles.
  • Direct link to this System Wiki Documentation.