go - #312
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8189f48. Configure here.
|
Visit the preview URL for this PR (updated for commit 868e29b): https://hacklytics2027--pr-312-stee4103.web.app (expires Wed, 12 Aug 2026 12:33:00 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c48ba34db61581e25fe2978355160b5eefe0e83f |
|
| Filename | Overview |
|---|---|
| packages/api/src/routers/stripe.ts | Adds centralized pricing, explicit development mock mode, bootcamp metadata propagation, and shared membership writes across payment and recovery paths. |
| packages/db/src/services/membership.ts | Adds shared name parsing and payment-metadata parsing while making paid bootcamp access sticky across membership renewals. |
| sites/mainweb/app/(portal)/api/webhooks/stripe/route.ts | Completes the prior name-parsing fix by using the shared whitespace parser in all webhook membership-writing branches and propagates bootcamp entitlement. |
| packages/db/src/schemas/members.ts | Adds the non-null bootcamp_member membership entitlement field with a false default. |
| sites/mainweb/components/portal/LinkStripeAccount.tsx | Adds bootcamp selection and derives displayed and requested payment totals from shared pricing. |
| sites/mainweb/components/portal/StripePaymentModal.tsx | Displays the selected server-aligned payment amount throughout the embedded payment modal. |
Sequence Diagram
sequenceDiagram
participant U as Portal User
participant API as Stripe tRPC Router
participant S as Stripe
participant W as Stripe Webhook
participant M as Membership Service
participant DB as Database
U->>API: Request payment (bootcamp optional)
API->>S: Create PaymentIntent/Checkout with price and metadata
S-->>W: Successful payment event
W->>W: Parse customer name with shared splitName
W->>M: createOrUpdateMembership(bootcampMember)
M->>DB: Insert or renew membership
M->>DB: Preserve existing bootcamp access or upgrade it
Reviews (2): Last reviewed commit: "another one" | Re-trigger Greptile

Note
High Risk
Changes authentication-adjacent payment flows, webhook verification, and who gets paid memberships—including mock-mode behavior in production—plus a schema field for bootcamp access.
Overview
This PR aligns membership pricing across hosted Checkout, Payment Intents, and portal copy via a shared
pricingmodule ($25/year membership, optional $10 bootcamp add-on), and adds an optional bootcamp flag on checkout/intent APIs that flows through payment metadata into membership grants.Stripe mock mode no longer keys off invented
mk_secret keys (which could ship to production and grant free memberships). It now requiresSTRIPE_MOCK_MODE=trueand is ignored whenNODE_ENVis production; the webhook’s unsigned-body path follows the same rule.Membership writes are centralized in
@query/db/services/membership(removed duplicate logic from the Stripe router and webhook), with a stickybootcampMemberfield on members, sharedsplitName(fixes a webhook bug that mangled names containing “s”), andpaidForBootcampwhen linking older payments. Portal UI adds a bootcamp checkbox and dynamic pay amounts in the payment modal.Reviewed by Cursor Bugbot for commit 868e29b. Bugbot is set up for automated code reviews on this repo. Configure here.