An open-source React library providing solution-agnostic modules for B2B lead generation experiences. Ships production-ready flows for live webinar registration, onβdemand webinar, quiz funnels, onβdemand demos, and gated resources, plus an Experience Index.
- Webinar Registration: Live and on-demand webinar experiences
- Interactive Demos: Scheduled and self-service demo flows
- Quiz Funnels: Assessment and lead qualification quizzes
- Gated Resources: Content downloads with progressive profiling
- Experience Index: Searchable catalog of all experiences
- First/Last Touch Attribution: Comprehensive UTM and click ID tracking
- Progressive Profiling: Smart form field hiding based on known data
- Event Streaming: Real-time events to GA4, PostHog, Meta, Google Ads, TikTok, Segment
- Cross-Domain Tracking: Visitor and session continuity across subdomains
- De-Anonymization: Company and contact resolution from IP/device signals
- Lead Enrichment: Firmographic and person-level data enhancement
- Confidence Scoring: Quality metrics for identity and enrichment data
- Async Processing: Non-blocking enrichment with retry logic
- Slack Integration: Real-time alerts with rich formatting
- Rules Engine: Flexible conditions for triggering notifications
- Throttling: Prevent alert spam with intelligent deduplication
- Templates: Customizable message formats with variable interpolation
- Consent Management: GDPR/CCPA compliant consent handling
- Regional Controls: EU data residency and processing rules
- Row Level Security: Supabase RLS for data protection
- PII Hashing: Secure server-side forwarding to ad platforms
- Frontend: Next.js 15+ with TypeScript and App Router
- Database: Supabase (Postgres + Auth + Realtime + Edge Functions)
- UI: Tailwind CSS + shadcn/ui components
- Error Tracking: Sentry for comprehensive monitoring
- Testing: Vitest + Playwright for unit and E2E testing
- EventBus: Offline-capable event system with retry logic
- Adapter Pattern: Pluggable integrations for analytics, alerts, and storage
- Attribution Tracker: First/last touch attribution with click ID preservation
- Progressive Profiling: TTL-based field hiding with cross-domain support
- Node.js 18+
- npm or yarn
- Supabase account (for database)
- Sentry account (for error tracking, optional)
-
Clone the repository
git clone https://github.com/ejwhite7/growth-toolkit.git cd growth-toolkit/apps/web -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localwith your configuration:# Supabase Configuration NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key # Sentry Configuration (optional) NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn # App Configuration NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Set up database
# Run Supabase migrations (when you have Supabase CLI setup) # npx supabase db reset
-
Start development server
npm run dev
Visit http://localhost:3000 to see the application.
The toolkit uses a comprehensive Postgres schema optimized for lead generation:
- experiences: Webinars, demos, quizzes, resources
- visitors: Anonymous visitor tracking
- sessions: User sessions with timeout handling
- profiles: Progressive profile data
- attributions: First/last touch attribution
- events: All user interactions and system events
- identities: De-anonymization results
- enrichments: Enhanced profile data
- rules: Slack alert configuration
- slack_alerts: Alert delivery tracking
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
# Quality Assurance
npm run type-check # TypeScript type checking
npm run lint # ESLint code analysis
npm run test # Run unit tests
npm run test:e2e # Run E2E tests# Unit tests with Vitest
npm run test
npm run test:watch
# E2E tests with Playwright
npm run test:e2e
npm run test:e2e:uiimport { getEventBus } from '@/lib/events/event-bus'
import { GA4Adapter } from '@/lib/adapters/analytics/ga4-adapter'
// Initialize event bus with adapters
const eventBus = getEventBus()
eventBus.addAdapter(new GA4Adapter({
measurementId: 'G-XXXXXXXXXX'
}))
// Track page views
await eventBus.pageView({
experience_id: 'webinar-demo-2024',
experience_type: 'webinar_live'
})
// Track form submissions
await eventBus.formSubmit({
experience_id: 'lead-magnet-ebook',
profile_id: 'profile_123',
payload: {
lead_score: 85,
utm_campaign: 'q4-promotion'
}
})import { useAttribution } from '@/lib/attribution/attribution-tracker'
function MyComponent() {
const {
visitorId,
sessionId,
firstTouch,
lastTouch,
updateLastTouch
} = useAttribution()
// Attribution data automatically captured from:
// - UTM parameters (utm_source, utm_medium, etc.)
// - Click IDs (gclid, fbclid, etc.)
// - Referrer information
// - Cross-domain visitor tracking
return (
<div>
<p>Visitor: {visitorId}</p>
<p>First Touch: {firstTouch?.source}</p>
<p>Last Touch: {lastTouch?.source}</p>
</div>
)
}- Event Processing: <100ms p95 client-side adapter dispatch
- API Response: <250ms p95 server response time
- Event Delivery: 99.5%+ success rate within 2 minutes
- Attribution Accuracy: Cross-domain visitor linking with 99%+ accuracy
- Offline event queue with retry logic
- Batch processing for high-volume events
- Efficient database indexing strategy
- Progressive profiling reduces form abandonment by 40%
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
npm run test) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js and React
- Database powered by Supabase
- UI components from shadcn/ui
- Error tracking by Sentry
- Inspired by modern growth engineering practices
- π Documentation
- π Issue Tracker
- π¬ Discussions
Built with β€οΈ for the growth engineering community