Practitionist / Practitionist/elluminar_web
Regional/PPP pricing + multi-currency GA
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 17h 2m
- Merged PRs (30d)
- 18
Description
Why / Context
PRD §7.2E / §8.6: regional/PPP-adjusted pricing is the mechanism for international expansion (Udemy's existing playbook). Combined with Dodo as Merchant of Record (issue #1), it opens non-India revenue without tax-compliance drag. Schema was built multi-currency from day one precisely so this is activation, not migration.
Schema already in place — NO migration required
Price.currency+Price.region(nullable = default) on every sellable, including plan interval pricesOrder.currency+ BigInt minor units everywhere;Cart.currencySubscriptionPlan.providerRefsholds per-currency provider plan idsPaymentProviderKind.DODOrouting (issue #1)
Implementation plan
- Region model: define pricing regions (e.g., IN, US, EU, SEA, LATAM, ROW) + geo-detection service (IP header on Netlify → region cookie, user-overridable currency switcher).
- Pricing engine extension (
src/lib/commerce/pricing.ts): resolution order = (currency, region) → (currency, null) → default currency conversion fallback DISABLED (only explicit prices sell — no FX surprises). - Studio pricing UI: per-region price rows for courses/projects (bulk "suggest from PPP index" helper using a maintained multiplier table in PlatformConfig); platform sets plan prices per region.
- Cart/checkout: single-currency cart enforcement (mixed-currency add prompts a switch), provider routing INR→Razorpay / else→Dodo.
- Subscriptions: create per-currency provider plans; store in providerRefs; upgrade/downgrade stays within currency.
- Anti-arbitrage: region locked at purchase to detected region unless override + revalidation; VPN-shopping policy documented (soft enforcement: region-mismatch flag on orders).
- Display: localized currency formatting (Intl), tax-inclusive display per region policy, compareAt strikethroughs per region.
- Reporting: ledger and payout views group by currency (accounts are already per-currency); FX-normalized revenue reporting for admin (rates table, reporting-only).
Acceptance criteria
- US visitor sees USD prices where defined; items without USD prices show as unavailable-in-region (not FX-converted)
- Checkout in USD routes to Dodo, INR to Razorpay; fulfillment identical
- Region price rows manageable in studio; PPP suggester fills drafts
- Mixed-currency cart is impossible; switcher migrates the cart
- Ledger accounts split by currency reconcile per provider
Dependencies / sequencing
- Requires issue #1 (Dodo MoR). Enhances plans/checkout from MVP M7/M8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/lib/commerce/pricing.ts, then trace the existing Price, Order, Cart, and SubscriptionPlan providerRefs paths before reading the studio, checkout, and reporting entry points. The work is done when regional prices, currency-specific routing and subscriptions, mixed-currency cart handling, PPP drafts, and the listed ledger and display acceptance criteria are covered without FX fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, frontend, payments
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100