Skip to content

Conversation

gabrielseco
Copy link
Collaborator

@gabrielseco gabrielseco commented Oct 16, 2025

Contractor Onboarding: Contract Preview and Signing Functionality

Summary

This PR adds a new step to the contractor onboarding flow that enables users to preview and sign contracts. It implements a PDF viewer component and integrates contract signing capabilities into the existing flow.

Key Changes

  • Added a new "Contract Preview" step to the contractor onboarding flow between Contract Details and Pricing Plan steps
  • Implemented a reusable PDF preview component with navigation controls
  • Added contract document signature schema and API integration for contract signing
  • Integrated PDF viewer libraries (react-pdf and pdfjs-dist) for rendering contract documents

Technical Details

  • Used react-pdf and pdfjs-dist for PDF rendering functionality
  • Created a PDFPreview component that supports base64-encoded PDF data
  • Added signature validation schema to capture legal signatures
  • Updated step navigation flow to include the new contract preview step
  • Extended API integration to support fetching contract documents and submitting signatures

This enhancement allows users to review their contract and provide a legally binding signature before proceeding to the pricing plan selection.

Caveats

  • The PDFViewer could be enhanced later in case users want to customize it
  • The signature is saved into the BE but is never retrieved if you have done so before

@gabrielseco gabrielseco self-assigned this Oct 16, 2025
Copy link
Contributor

Deploy preview for remote-flows ready!

✅ Preview
https://remote-flows-jk1kchpcw-remotecom.vercel.app

Built with commit 630129f.
This pull request is being automatically deployed with vercel-action

Copy link
Contributor

Deploy preview for remote-flows-example-app ready!

✅ Preview
https://remote-flows-example-oi256o3yq-remotecom.vercel.app

Built with commit 630129f.
This pull request is being automatically deployed with vercel-action

@gabrielseco gabrielseco requested a review from cammellos October 16, 2025 15:16
@gabrielseco gabrielseco marked this pull request as ready for review October 16, 2025 15:16
@cammellos
Copy link
Collaborator

I suppose we will want to add a e2e test covering the full flow eventually @gabrielseco , but I take you'd like to do that after it's all complete

@gabrielseco gabrielseco merged commit 50ed402 into main Oct 20, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants