-
Notifications
You must be signed in to change notification settings - Fork 0
[CI] (a283762) react-router/saas-template #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Now I have read all the key changed files. Let me compile my evaluation report. PR Evaluation ReportSummaryThis PR adds PostHog analytics integration to a React Router 7 SaaS template. The implementation includes client-side initialization with PostHogProvider, server-side middleware for context propagation, error boundary exception capture, user identification on auth flows, and comprehensive event tracking across authentication, billing, onboarding, and organization management features.
Confidence score: 4/5 👍
File changes
App sanity check: 4/5 ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js ^1.324.1, posthog-node ^5.21.0, @posthog/react ^1.5.2 |
| PostHog client initialized | Yes | Initialized in entry.client.tsx with PostHogProvider wrapping the app, uses defaults: "2025-11-30" preset |
| capture() | Yes | 15+ custom events captured across auth, billing, onboarding, and org management flows |
| identify() | Partial | Called on email login/signup with email as distinct ID; no post-auth identify with stable user ID |
| Error tracking | Yes | ErrorBoundary in root.tsx calls posthog?.captureException(error) |
| Reverse proxy | No | No reverse proxy configured; events sent directly to PostHog API host |
Issues
- No reverse proxy implementation: The integration sends events directly to PostHog's API host without a reverse proxy. This means ad blockers will likely block a significant portion of analytics data. A proxy route (e.g.,
/ingest/*) should be configured. [MEDIUM] - Server middleware not utilized: While posthog-node is installed and a middleware is created, the server-side PostHog instance in context is never used by any route. Server-side events are only captured in stripe.webhooks.ts by creating new PostHog instances. [MEDIUM]
- User identification timing: Users are identified by email during form submission before the request completes. If login fails, the user is still identified. Should identify after successful authentication. [LOW]
Other completed criteria
- API host configured via environment variable
- Tracing headers configured for localhost and current host
- PostHog reset() called on logout and account deletion
- SSR configuration properly handles PostHog packages
- Server-side PostHog instances properly shut down after use
PostHog insights and events: 4/5 ✅
| Filename | PostHog events | Description |
|---|---|---|
login.tsx |
login_form_submitted |
Tracks login attempts with method (email/google) and invite status |
register.tsx |
signup_form_submitted |
Tracks signup attempts with method and invite status |
nav-user.tsx |
logout_clicked |
Tracks user logout actions |
user-account.tsx |
onboarding_user_account_completed |
Tracks completion of user profile onboarding step |
organization.tsx |
onboarding_organization_completed |
Tracks completion of organization onboarding step |
create-organization-form-card.tsx |
organization_created |
Tracks new organization creation |
create-subscription-modal-content.tsx |
subscription_checkout_started |
Tracks checkout initiation with tier, interval, lookup_key |
cancel-or-modify-subscription-modal-content.tsx |
subscription_plan_changed, subscription_cancellation_initiated |
Tracks plan changes (upgrade/downgrade) and cancellation initiation |
contact-sales-team.tsx |
contact_sales_form_submitted |
Tracks enterprise sales inquiries |
invite-by-email-card.tsx |
team_member_invited |
Tracks team invitations with role |
accept-email-invite-page.tsx |
email_invite_accepted |
Tracks invite acceptance with org name |
danger-zone.tsx |
user_account_deleted |
Tracks account deletion |
stripe.webhooks.ts |
stripe_checkout_completed, stripe_subscription_created |
Server-side revenue events from Stripe |
root.tsx |
captureException |
Captures unhandled errors in error boundary |
Issues
- Missing pageview tracking verification: While PostHog's defaults preset should include automatic pageview tracking, this isn't explicitly verified or documented. Should confirm pageviews are being captured. [LOW]
- Missing paste/feature usage events: The core app feature (pastebin) has no tracking for paste creation, viewing, or deletion, which would be valuable for product analytics. [LOW]
Other completed criteria
- Events cover full user lifecycle (signup → onboarding → usage → billing → churn)
- Billing events include rich context for funnel analysis (tiers, intervals, upgrade/downgrade)
- Events use consistent naming convention (snake_case)
- Events enable key insights: conversion funnels, onboarding completion, subscription changes, churn
- Server-side Stripe events provide accurate revenue tracking independent of client-side blockers
Reviewed by wizard workbench PR evaluator
Automated wizard CI run
Source: manual
Trigger ID:
a283762App:
react-router/saas-templateApp directory:
apps/react-router/saas-templateWorkbench branch:
wizard-ci-a283762-react-router-saas-templateWizard branch:
mainExamples branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-01-15T22:43:08.507Z
Duration: 674.9s