@croacroa/react-native-template 1.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.github/workflows/ci.yml +187 -184
  2. package/.github/workflows/eas-build.yml +55 -55
  3. package/.github/workflows/eas-update.yml +50 -50
  4. package/CHANGELOG.md +106 -106
  5. package/CONTRIBUTING.md +377 -377
  6. package/README.md +399 -399
  7. package/__tests__/components/snapshots.test.tsx +131 -0
  8. package/__tests__/integration/auth-api.test.tsx +227 -0
  9. package/__tests__/performance/VirtualizedList.perf.test.tsx +362 -0
  10. package/app/(public)/onboarding.tsx +5 -5
  11. package/app.config.ts +45 -2
  12. package/assets/images/.gitkeep +7 -7
  13. package/components/onboarding/OnboardingScreen.tsx +370 -370
  14. package/components/onboarding/index.ts +2 -2
  15. package/components/providers/SuspenseBoundary.tsx +357 -0
  16. package/components/providers/index.ts +21 -0
  17. package/components/ui/Avatar.tsx +316 -316
  18. package/components/ui/Badge.tsx +416 -416
  19. package/components/ui/BottomSheet.tsx +307 -307
  20. package/components/ui/Checkbox.tsx +261 -261
  21. package/components/ui/OptimizedImage.tsx +369 -369
  22. package/components/ui/Select.tsx +240 -240
  23. package/components/ui/VirtualizedList.tsx +285 -0
  24. package/components/ui/index.ts +23 -18
  25. package/constants/config.ts +97 -54
  26. package/docs/adr/001-state-management.md +79 -79
  27. package/docs/adr/002-styling-approach.md +130 -130
  28. package/docs/adr/003-data-fetching.md +155 -155
  29. package/docs/adr/004-auth-adapter-pattern.md +144 -144
  30. package/docs/adr/README.md +78 -78
  31. package/hooks/index.ts +27 -25
  32. package/hooks/useApi.ts +102 -5
  33. package/hooks/useAuth.tsx +82 -0
  34. package/hooks/useBiometrics.ts +295 -295
  35. package/hooks/useDeepLinking.ts +256 -256
  36. package/hooks/useMFA.ts +499 -0
  37. package/hooks/useNotifications.ts +39 -0
  38. package/hooks/useOffline.ts +60 -6
  39. package/hooks/usePerformance.ts +434 -434
  40. package/hooks/useTheme.tsx +76 -0
  41. package/hooks/useUpdates.ts +358 -358
  42. package/i18n/index.ts +194 -77
  43. package/i18n/locales/ar.json +101 -0
  44. package/i18n/locales/de.json +101 -0
  45. package/i18n/locales/en.json +101 -101
  46. package/i18n/locales/es.json +101 -0
  47. package/i18n/locales/fr.json +101 -101
  48. package/jest.config.js +4 -4
  49. package/maestro/README.md +113 -113
  50. package/maestro/config.yaml +35 -35
  51. package/maestro/flows/login.yaml +62 -62
  52. package/maestro/flows/mfa-login.yaml +92 -0
  53. package/maestro/flows/mfa-setup.yaml +86 -0
  54. package/maestro/flows/navigation.yaml +68 -68
  55. package/maestro/flows/offline-conflict.yaml +101 -0
  56. package/maestro/flows/offline-sync.yaml +128 -0
  57. package/maestro/flows/offline.yaml +60 -60
  58. package/maestro/flows/register.yaml +94 -94
  59. package/package.json +175 -170
  60. package/services/analytics.ts +428 -428
  61. package/services/api.ts +340 -340
  62. package/services/authAdapter.ts +333 -333
  63. package/services/backgroundSync.ts +626 -0
  64. package/services/index.ts +54 -22
  65. package/services/security.ts +286 -0
  66. package/tailwind.config.js +47 -47
  67. package/utils/accessibility.ts +446 -446
  68. package/utils/index.ts +52 -43
  69. package/utils/validation.ts +2 -1
  70. package/utils/withAccessibility.tsx +272 -0
package/CHANGELOG.md CHANGED
@@ -1,106 +1,106 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ### Added
11
-
12
- - Auth adapter pattern for easy provider switching (Supabase, Firebase, etc.)
13
- - Internationalization (i18n) support with expo-localization and i18next
14
- - English and French translations included
15
- - Language detection and persistence
16
- - New UI components:
17
- - `Select` - Dropdown/picker component
18
- - `Checkbox` and `CheckboxGroup` - Animated checkbox components
19
- - `BottomSheet` - Modal bottom sheet with @gorhom/bottom-sheet
20
- - `Avatar` and `AvatarGroup` - User avatar components
21
- - `Badge`, `Chip`, and `CountBadge` - Label/tag components
22
- - `OptimizedImage` - High-performance image component with expo-image
23
- - Deep linking support with `useDeepLinking` hook
24
- - Biometric authentication with `useBiometrics` hook
25
- - Analytics adapter for multiple providers (Mixpanel, Amplitude, etc.)
26
- - Rate limiting for API calls using Bottleneck
27
- - E2E testing setup with Maestro
28
- - Login, registration, navigation, and offline flow tests
29
- - Project documentation:
30
- - CONTRIBUTING.md
31
- - CHANGELOG.md
32
- - Architecture Decision Records (ADRs)
33
- - GitHub Actions CI/CD workflows:
34
- - Lint, test, and build checks
35
- - Maestro Cloud E2E tests
36
- - EAS Build workflow (manual trigger)
37
- - EAS Update workflow (OTA on push to main)
38
- - Onboarding screens with animated pagination
39
- - OTA updates support with `useUpdates` hook
40
- - Performance monitoring with `usePerformance` hook
41
- - Comprehensive accessibility utilities:
42
- - Builder functions for all UI patterns (button, input, toggle, etc.)
43
- - Hooks for screen reader, reduce motion, and bold text preferences
44
- - Utility functions for announcements and focus management
45
-
46
- ### Changed
47
-
48
- - Primary color changed from blue to emerald green (croacroa branding)
49
- - API client now includes rate limiting protection
50
-
51
- ### Dependencies Added
52
-
53
- - `@gorhom/bottom-sheet` ^4.6.0
54
- - `bottleneck` ^2.19.5
55
- - `expo-image` ~2.0.0
56
- - `expo-local-authentication` ~15.0.0
57
- - `expo-localization` ~15.0.0
58
- - `i18next` ^23.0.0
59
- - `react-i18next` ^14.0.0
60
-
61
- ## [1.0.0] - 2024-01-01
62
-
63
- ### Added
64
-
65
- - Initial release
66
- - Expo SDK 52 with React Native 0.76
67
- - Expo Router for file-based navigation
68
- - Authentication flow with secure token storage
69
- - React Query for data fetching with offline support
70
- - Zustand for state management
71
- - NativeWind (Tailwind CSS) for styling
72
- - React Hook Form with Zod validation
73
- - Push notifications with Expo Notifications
74
- - Error tracking with Sentry
75
- - Storybook for component documentation
76
- - Jest and Testing Library for unit tests
77
- - Dark mode support
78
- - Basic UI components (Button, Input, Card, Modal, Skeleton)
79
- - Animated components with Reanimated
80
- - Toast notifications with Burnt
81
-
82
- ### Infrastructure
83
-
84
- - EAS Build configuration for dev/preview/production
85
- - ESLint and Prettier setup
86
- - Husky pre-commit hooks
87
- - TypeScript strict mode
88
-
89
- ---
90
-
91
- ## Versioning Guide
92
-
93
- ### Version Format: MAJOR.MINOR.PATCH
94
-
95
- - **MAJOR**: Breaking changes
96
- - **MINOR**: New features (backwards compatible)
97
- - **PATCH**: Bug fixes (backwards compatible)
98
-
99
- ### Changelog Categories
100
-
101
- - **Added**: New features
102
- - **Changed**: Changes to existing functionality
103
- - **Deprecated**: Features to be removed
104
- - **Removed**: Removed features
105
- - **Fixed**: Bug fixes
106
- - **Security**: Security improvements
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Auth adapter pattern for easy provider switching (Supabase, Firebase, etc.)
13
+ - Internationalization (i18n) support with expo-localization and i18next
14
+ - English and French translations included
15
+ - Language detection and persistence
16
+ - New UI components:
17
+ - `Select` - Dropdown/picker component
18
+ - `Checkbox` and `CheckboxGroup` - Animated checkbox components
19
+ - `BottomSheet` - Modal bottom sheet with @gorhom/bottom-sheet
20
+ - `Avatar` and `AvatarGroup` - User avatar components
21
+ - `Badge`, `Chip`, and `CountBadge` - Label/tag components
22
+ - `OptimizedImage` - High-performance image component with expo-image
23
+ - Deep linking support with `useDeepLinking` hook
24
+ - Biometric authentication with `useBiometrics` hook
25
+ - Analytics adapter for multiple providers (Mixpanel, Amplitude, etc.)
26
+ - Rate limiting for API calls using Bottleneck
27
+ - E2E testing setup with Maestro
28
+ - Login, registration, navigation, and offline flow tests
29
+ - Project documentation:
30
+ - CONTRIBUTING.md
31
+ - CHANGELOG.md
32
+ - Architecture Decision Records (ADRs)
33
+ - GitHub Actions CI/CD workflows:
34
+ - Lint, test, and build checks
35
+ - Maestro Cloud E2E tests
36
+ - EAS Build workflow (manual trigger)
37
+ - EAS Update workflow (OTA on push to main)
38
+ - Onboarding screens with animated pagination
39
+ - OTA updates support with `useUpdates` hook
40
+ - Performance monitoring with `usePerformance` hook
41
+ - Comprehensive accessibility utilities:
42
+ - Builder functions for all UI patterns (button, input, toggle, etc.)
43
+ - Hooks for screen reader, reduce motion, and bold text preferences
44
+ - Utility functions for announcements and focus management
45
+
46
+ ### Changed
47
+
48
+ - Primary color changed from blue to emerald green (croacroa branding)
49
+ - API client now includes rate limiting protection
50
+
51
+ ### Dependencies Added
52
+
53
+ - `@gorhom/bottom-sheet` ^4.6.0
54
+ - `bottleneck` ^2.19.5
55
+ - `expo-image` ~2.0.0
56
+ - `expo-local-authentication` ~15.0.0
57
+ - `expo-localization` ~15.0.0
58
+ - `i18next` ^23.0.0
59
+ - `react-i18next` ^14.0.0
60
+
61
+ ## [1.0.0] - 2024-01-01
62
+
63
+ ### Added
64
+
65
+ - Initial release
66
+ - Expo SDK 52 with React Native 0.76
67
+ - Expo Router for file-based navigation
68
+ - Authentication flow with secure token storage
69
+ - React Query for data fetching with offline support
70
+ - Zustand for state management
71
+ - NativeWind (Tailwind CSS) for styling
72
+ - React Hook Form with Zod validation
73
+ - Push notifications with Expo Notifications
74
+ - Error tracking with Sentry
75
+ - Storybook for component documentation
76
+ - Jest and Testing Library for unit tests
77
+ - Dark mode support
78
+ - Basic UI components (Button, Input, Card, Modal, Skeleton)
79
+ - Animated components with Reanimated
80
+ - Toast notifications with Burnt
81
+
82
+ ### Infrastructure
83
+
84
+ - EAS Build configuration for dev/preview/production
85
+ - ESLint and Prettier setup
86
+ - Husky pre-commit hooks
87
+ - TypeScript strict mode
88
+
89
+ ---
90
+
91
+ ## Versioning Guide
92
+
93
+ ### Version Format: MAJOR.MINOR.PATCH
94
+
95
+ - **MAJOR**: Breaking changes
96
+ - **MINOR**: New features (backwards compatible)
97
+ - **PATCH**: Bug fixes (backwards compatible)
98
+
99
+ ### Changelog Categories
100
+
101
+ - **Added**: New features
102
+ - **Changed**: Changes to existing functionality
103
+ - **Deprecated**: Features to be removed
104
+ - **Removed**: Removed features
105
+ - **Fixed**: Bug fixes
106
+ - **Security**: Security improvements