From 0db72bc4b9d86938962ee0767571eca100fc3869 Mon Sep 17 00:00:00 2001 From: Adrian Darian Date: Fri, 26 Dec 2025 20:10:51 -0800 Subject: [PATCH] Replace documents page with Resumier microfrontend --- docs/proposals/resumier-microfrontend.md | 41 + .../documents/ResumierMicrofrontend.tsx | 28 + src/routes/documents.tsx | 2681 +---------------- 3 files changed, 71 insertions(+), 2679 deletions(-) create mode 100644 docs/proposals/resumier-microfrontend.md create mode 100644 src/components/features/documents/ResumierMicrofrontend.tsx diff --git a/docs/proposals/resumier-microfrontend.md b/docs/proposals/resumier-microfrontend.md new file mode 100644 index 0000000..953180d --- /dev/null +++ b/docs/proposals/resumier-microfrontend.md @@ -0,0 +1,41 @@ +# Proposal: Embed Resumier as the Documents microfrontend + +## Summary +Replace the existing Documents page in THRIVE with the Resumier microfrontend so the documents workflow is powered by the Prosperis Resumier app. The microfrontend will run standalone for demos while also being embedded into THRIVE for production usage. + +## Goals +- Swap the `/documents` route in THRIVE to host the Resumier microfrontend. +- Support a standalone Resumier deployment that can also be embedded as an iframe/microfrontend. +- Keep the integration configurable via environment variables for local and production environments. + +## Non-goals +- Rewriting THRIVE document data stores or migrations in this PR. +- Designing cross-app data synchronization (handled in the Resumier microfrontend backlog). + +## Proposed Integration Approach +1. **Microfrontend Embed** + - Expose Resumier as an embeddable experience (microfrontend build or hosted app). + - THRIVE loads Resumier via an iframe (or later via module federation) so the Documents page fully delegates to Resumier. + +2. **Configuration** + - Add a `VITE_RESUMIER_URL` environment variable in THRIVE to point to the Resumier deployment. + - Local development can point to `http://localhost:` when running Resumier standalone. + +3. **Progressive Enhancement** + - Short term: iframe-based embed for quick validation. + - Medium term: switch to a first-class microfrontend (module federation or web component) once Resumier publishes a stable remote entry. + +## Open Questions / Follow-ups +- What is the canonical deployment URL for Resumier in each environment (dev/staging/prod)? +- Does Resumier need SSO or token handoff from THRIVE for access control? +- Should THRIVE retain a fallback Documents view in case Resumier is unreachable? + +## Rollout Plan +1. Merge the embed-only integration in THRIVE. +2. Deploy Resumier standalone and confirm embedding works in THRIVE. +3. Iterate on shared auth/session and data contract if needed. + +## Acceptance Criteria +- Navigating to `/documents` shows the Resumier microfrontend. +- The embed URL is configurable via `VITE_RESUMIER_URL`. +- THRIVE builds without requiring the old Documents page implementation. diff --git a/src/components/features/documents/ResumierMicrofrontend.tsx b/src/components/features/documents/ResumierMicrofrontend.tsx new file mode 100644 index 0000000..e9f072a --- /dev/null +++ b/src/components/features/documents/ResumierMicrofrontend.tsx @@ -0,0 +1,28 @@ +export function ResumierMicrofrontend() { + const resumierUrl = import.meta.env.VITE_RESUMIER_URL as string | undefined; + + if (!resumierUrl) { + return ( +
+
+

Resumier microfrontend

+

+ Set VITE_RESUMIER_URL to + load the Resumier microfrontend in the documents page. +

+
+
+ ); + } + + return ( +
+