Commit 1488c6e
Add MixpanelStarter: Modern Sample App with TypeScript & Context API (#334)
* Add MixpanelStarter sample application
Create a modern, production-ready React Native sample app that demonstrates
Mixpanel SDK integration with TypeScript, Context API, and best practices.
This sample bridges the gap between SimpleMixpanel (too basic) and
MixpanelDemo (too complex), showcasing 80% of common Mixpanel use cases.
Features:
- Context API pattern with useMixpanel hook for app-wide access
- TypeScript strict mode for type safety
- React Navigation 7 with bottom tabs (3 screens)
- 8 core SDK capabilities demonstrated:
* User identification (identify, alias, anonymous-to-identified flow)
* User profiles (getPeople().set, setOnce)
* Event tracking with custom properties
* Timed events (timeEvent for duration tracking)
* Super properties (global context)
* Privacy controls (optIn/Out, GDPR compliance)
* Data management (reset for logout)
* Manual flush
Project structure:
- src/contexts/MixpanelContext.tsx - Context provider + hook
- src/screens/ - 3 educational screens (Onboarding, Home, Settings)
- src/components/ - Reusable components (ErrorBoundary, ActionButton, InfoCard)
- src/types/ - TypeScript definitions
- src/constants/tracking.ts - Event names & property constants
Documentation:
- README.md - Comprehensive guide with quick start, patterns, Q&A
- INTEGRATION_GUIDE.md - Step-by-step integration checklist
- CLAUDE.md - AI assistant context for development
Technical details:
- React Native 0.82.1 with React 19.1.1
- Metro config optimized for parent package symlink resolution
- iOS code signing disabled for simulator-only use
- All dependencies properly configured
- Tests passing (MixpanelContext unit tests)
- TypeScript compilation successful with strict mode
* bump test_android runner to macos-latest
* Fix Android emulator boot timeout in CI workflow (#335)
* Initial plan
* Fix Android emulator boot timeout with increased timeout and proper configuration
Co-authored-by: jaredmixpanel <10504508+jaredmixpanel@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jaredmixpanel <10504508+jaredmixpanel@users.noreply.github.com>
* change arch in test_arndroid to match runner
* change arch in test_arndroid to match runner
* use ubuntu for android test
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jaredmixpanel <10504508+jaredmixpanel@users.noreply.github.com>1 parent 36ce38f commit 1488c6e
File tree
70 files changed
+19795
-1
lines changed- .github/workflows
- Samples/MixpanelStarter
- .bundle
- __tests__
- android
- app
- src/main
- java/com/mixpanelstarter
- res
- drawable
- mipmap-hdpi
- mipmap-mdpi
- mipmap-xhdpi
- mipmap-xxhdpi
- mipmap-xxxhdpi
- values
- gradle/wrapper
- ios
- MixpanelStarter.xcodeproj
- MixpanelStarter.xcworkspace
- MixpanelStarter
- Images.xcassets
- AppIcon.appiconset
- src
- @types
- components
- constants
- contexts
- screens
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
70 files changed
+19795
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments