Skip to content

Return Prime integration (adapter module) — consolidated - #35

Open
prima-nilesh wants to merge 1 commit into
main-pre-return-primefrom
feature/return-prime-consolidated
Open

Return Prime integration (adapter module) — consolidated#35
prima-nilesh wants to merge 1 commit into
main-pre-return-primefrom
feature/return-prime-consolidated

Conversation

@prima-nilesh

Copy link
Copy Markdown
Collaborator

Consolidates PRs #17-#34 (feature/return-prime-adapter and follow-on fix/diag/feat branches) into a single clean changeset for review, squashed on top of main as of just before this work began (PR #18).

Adds the Return Prime (RP) returns/exchanges Shopify-compatibility adapter:

  • apps/backend/src/modules/rp/ — OAuth install, merchant/order/product/ customer/refund/discount proxying to OS services, webhooks (inbound from OS, outbound to RP), self-hosted portal + health-checked redirect, own id-mapping table for hashed-id reversal (replaces an earlier RP-Mongo dependency)
  • packages/rp-sdk/ — drop-in storefront script: enable/disable check, return button (auto-injected on order list/detail pages), the chrome-wrapped customer portal page, self-heal against React hydration wiping the mount
  • apps/admin-rp/ — standalone admin SPA scaffold
  • New DB migrations (return_prime_merchants, return_exchange_enabled flag, rp_id_mappings reverse-lookup table)
  • Shared touchpoints: OAuth service (JWT merchant-id extraction), module registry, env schema, ratio client, app config

Full history (individual commits/PRs) remains on main; this branch exists purely to give a single, reviewable diff of the whole feature.

Consolidates PRs #17-#34 (feature/return-prime-adapter and follow-on
fix/diag/feat branches) into a single clean changeset for review,
squashed on top of main as of just before this work began (PR #18).

Adds the Return Prime (RP) returns/exchanges Shopify-compatibility
adapter:
- apps/backend/src/modules/rp/ — OAuth install, merchant/order/product/
  customer/refund/discount proxying to OS services, webhooks (inbound
  from OS, outbound to RP), self-hosted portal + health-checked
  redirect, own id-mapping table for hashed-id reversal (replaces an
  earlier RP-Mongo dependency)
- packages/rp-sdk/ — drop-in storefront script: enable/disable check,
  return button (auto-injected on order list/detail pages), the
  chrome-wrapped customer portal page, self-heal against React
  hydration wiping the mount
- apps/admin-rp/ — standalone admin SPA scaffold
- New DB migrations (return_prime_merchants, return_exchange_enabled
  flag, rp_id_mappings reverse-lookup table)
- Shared touchpoints: OAuth service (JWT merchant-id extraction),
  module registry, env schema, ratio client, app config

Full history (individual commits/PRs) remains on main; this branch
exists purely to give a single, reviewable diff of the whole feature.
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