@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.
- package/.github/workflows/ci.yml +187 -184
- package/.github/workflows/eas-build.yml +55 -55
- package/.github/workflows/eas-update.yml +50 -50
- package/CHANGELOG.md +106 -106
- package/CONTRIBUTING.md +377 -377
- package/README.md +399 -399
- package/__tests__/components/snapshots.test.tsx +131 -0
- package/__tests__/integration/auth-api.test.tsx +227 -0
- package/__tests__/performance/VirtualizedList.perf.test.tsx +362 -0
- package/app/(public)/onboarding.tsx +5 -5
- package/app.config.ts +45 -2
- package/assets/images/.gitkeep +7 -7
- package/components/onboarding/OnboardingScreen.tsx +370 -370
- package/components/onboarding/index.ts +2 -2
- package/components/providers/SuspenseBoundary.tsx +357 -0
- package/components/providers/index.ts +21 -0
- package/components/ui/Avatar.tsx +316 -316
- package/components/ui/Badge.tsx +416 -416
- package/components/ui/BottomSheet.tsx +307 -307
- package/components/ui/Checkbox.tsx +261 -261
- package/components/ui/OptimizedImage.tsx +369 -369
- package/components/ui/Select.tsx +240 -240
- package/components/ui/VirtualizedList.tsx +285 -0
- package/components/ui/index.ts +23 -18
- package/constants/config.ts +97 -54
- package/docs/adr/001-state-management.md +79 -79
- package/docs/adr/002-styling-approach.md +130 -130
- package/docs/adr/003-data-fetching.md +155 -155
- package/docs/adr/004-auth-adapter-pattern.md +144 -144
- package/docs/adr/README.md +78 -78
- package/hooks/index.ts +27 -25
- package/hooks/useApi.ts +102 -5
- package/hooks/useAuth.tsx +82 -0
- package/hooks/useBiometrics.ts +295 -295
- package/hooks/useDeepLinking.ts +256 -256
- package/hooks/useMFA.ts +499 -0
- package/hooks/useNotifications.ts +39 -0
- package/hooks/useOffline.ts +60 -6
- package/hooks/usePerformance.ts +434 -434
- package/hooks/useTheme.tsx +76 -0
- package/hooks/useUpdates.ts +358 -358
- package/i18n/index.ts +194 -77
- package/i18n/locales/ar.json +101 -0
- package/i18n/locales/de.json +101 -0
- package/i18n/locales/en.json +101 -101
- package/i18n/locales/es.json +101 -0
- package/i18n/locales/fr.json +101 -101
- package/jest.config.js +4 -4
- package/maestro/README.md +113 -113
- package/maestro/config.yaml +35 -35
- package/maestro/flows/login.yaml +62 -62
- package/maestro/flows/mfa-login.yaml +92 -0
- package/maestro/flows/mfa-setup.yaml +86 -0
- package/maestro/flows/navigation.yaml +68 -68
- package/maestro/flows/offline-conflict.yaml +101 -0
- package/maestro/flows/offline-sync.yaml +128 -0
- package/maestro/flows/offline.yaml +60 -60
- package/maestro/flows/register.yaml +94 -94
- package/package.json +175 -170
- package/services/analytics.ts +428 -428
- package/services/api.ts +340 -340
- package/services/authAdapter.ts +333 -333
- package/services/backgroundSync.ts +626 -0
- package/services/index.ts +54 -22
- package/services/security.ts +286 -0
- package/tailwind.config.js +47 -47
- package/utils/accessibility.ts +446 -446
- package/utils/index.ts +52 -43
- package/utils/validation.ts +2 -1
- package/utils/withAccessibility.tsx +272 -0
package/package.json
CHANGED
|
@@ -1,170 +1,175 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@croacroa/react-native-template",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Production-ready React Native template with Expo, authentication, i18n, offline support, and more",
|
|
5
|
-
"main": "expo-router/entry",
|
|
6
|
-
"author": "Croacroa <contact@croacroa.dev>",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"homepage": "https://github.com/croacroa-dev-team/template-react-native#readme",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/croacroa-dev-team/template-react-native.git"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/croacroa-dev-team/template-react-native/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"react-native",
|
|
18
|
-
"expo",
|
|
19
|
-
"template",
|
|
20
|
-
"typescript",
|
|
21
|
-
"nativewind",
|
|
22
|
-
"tailwind",
|
|
23
|
-
"zustand",
|
|
24
|
-
"react-query",
|
|
25
|
-
"authentication",
|
|
26
|
-
"i18n",
|
|
27
|
-
"offline",
|
|
28
|
-
"biometrics",
|
|
29
|
-
"push-notifications",
|
|
30
|
-
"sentry",
|
|
31
|
-
"production-ready"
|
|
32
|
-
],
|
|
33
|
-
"scripts": {
|
|
34
|
-
"start": "expo start",
|
|
35
|
-
"dev": "expo start --dev-client",
|
|
36
|
-
"android": "expo run:android",
|
|
37
|
-
"ios": "expo run:ios",
|
|
38
|
-
"web": "expo start --web",
|
|
39
|
-
"build:dev": "eas build --profile development",
|
|
40
|
-
"build:preview": "eas build --profile preview",
|
|
41
|
-
"build:prod": "eas build --profile production",
|
|
42
|
-
"submit:ios": "eas submit --platform ios",
|
|
43
|
-
"submit:android": "eas submit --platform android",
|
|
44
|
-
"test": "jest",
|
|
45
|
-
"test:watch": "jest --watch",
|
|
46
|
-
"test:coverage": "jest --coverage",
|
|
47
|
-
"storybook": "storybook dev -p 6006",
|
|
48
|
-
"storybook:build": "storybook build",
|
|
49
|
-
"lint": "eslint . --ext .ts,.tsx",
|
|
50
|
-
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
51
|
-
"format": "prettier --write \"**/*.{ts,tsx,json,md}\"",
|
|
52
|
-
"typecheck": "tsc --noEmit",
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"expo
|
|
72
|
-
"expo-
|
|
73
|
-
"expo-
|
|
74
|
-
"expo-
|
|
75
|
-
"expo-
|
|
76
|
-
"expo-
|
|
77
|
-
"expo-
|
|
78
|
-
"expo-
|
|
79
|
-
"expo-
|
|
80
|
-
"expo-
|
|
81
|
-
"expo-
|
|
82
|
-
"expo-
|
|
83
|
-
"expo-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"react
|
|
92
|
-
"react-
|
|
93
|
-
"react-
|
|
94
|
-
"react-native
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"@
|
|
106
|
-
"@
|
|
107
|
-
"@
|
|
108
|
-
"@
|
|
109
|
-
"@
|
|
110
|
-
"@
|
|
111
|
-
"@
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"eslint-
|
|
115
|
-
"eslint
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
".
|
|
160
|
-
".
|
|
161
|
-
".
|
|
162
|
-
".
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@croacroa/react-native-template",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Production-ready React Native template with Expo, authentication, i18n, offline support, and more",
|
|
5
|
+
"main": "expo-router/entry",
|
|
6
|
+
"author": "Croacroa <contact@croacroa.dev>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/croacroa-dev-team/template-react-native#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/croacroa-dev-team/template-react-native.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/croacroa-dev-team/template-react-native/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react-native",
|
|
18
|
+
"expo",
|
|
19
|
+
"template",
|
|
20
|
+
"typescript",
|
|
21
|
+
"nativewind",
|
|
22
|
+
"tailwind",
|
|
23
|
+
"zustand",
|
|
24
|
+
"react-query",
|
|
25
|
+
"authentication",
|
|
26
|
+
"i18n",
|
|
27
|
+
"offline",
|
|
28
|
+
"biometrics",
|
|
29
|
+
"push-notifications",
|
|
30
|
+
"sentry",
|
|
31
|
+
"production-ready"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"start": "expo start",
|
|
35
|
+
"dev": "expo start --dev-client",
|
|
36
|
+
"android": "expo run:android",
|
|
37
|
+
"ios": "expo run:ios",
|
|
38
|
+
"web": "expo start --web",
|
|
39
|
+
"build:dev": "eas build --profile development",
|
|
40
|
+
"build:preview": "eas build --profile preview",
|
|
41
|
+
"build:prod": "eas build --profile production",
|
|
42
|
+
"submit:ios": "eas submit --platform ios",
|
|
43
|
+
"submit:android": "eas submit --platform android",
|
|
44
|
+
"test": "jest",
|
|
45
|
+
"test:watch": "jest --watch",
|
|
46
|
+
"test:coverage": "jest --coverage",
|
|
47
|
+
"storybook": "storybook dev -p 6006",
|
|
48
|
+
"storybook:build": "storybook build",
|
|
49
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
50
|
+
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
51
|
+
"format": "prettier --write \"**/*.{ts,tsx,json,md}\"",
|
|
52
|
+
"typecheck": "tsc --noEmit",
|
|
53
|
+
"docs": "typedoc",
|
|
54
|
+
"docs:watch": "typedoc --watch",
|
|
55
|
+
"prepare": "husky"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@expo/vector-icons": "^14.0.4",
|
|
59
|
+
"@gorhom/bottom-sheet": "^5.0.6",
|
|
60
|
+
"@hookform/resolvers": "^3.9.1",
|
|
61
|
+
"@react-native-async-storage/async-storage": "^2.1.0",
|
|
62
|
+
"@react-native-community/netinfo": "^11.4.1",
|
|
63
|
+
"@sentry/react-native": "^6.5.0",
|
|
64
|
+
"@shopify/flash-list": "^1.7.3",
|
|
65
|
+
"@tanstack/query-async-storage-persister": "^5.66.0",
|
|
66
|
+
"@tanstack/react-query": "^5.66.0",
|
|
67
|
+
"@tanstack/react-query-persist-client": "^5.66.0",
|
|
68
|
+
"bottleneck": "^2.19.5",
|
|
69
|
+
"burnt": "^0.12.2",
|
|
70
|
+
"clsx": "^2.1.1",
|
|
71
|
+
"expo": "~52.0.0",
|
|
72
|
+
"expo-background-fetch": "~13.0.3",
|
|
73
|
+
"expo-constants": "~17.0.3",
|
|
74
|
+
"expo-dev-client": "~5.0.8",
|
|
75
|
+
"expo-device": "~7.0.1",
|
|
76
|
+
"expo-font": "~13.0.2",
|
|
77
|
+
"expo-image": "~2.0.4",
|
|
78
|
+
"expo-linking": "~7.0.4",
|
|
79
|
+
"expo-local-authentication": "~15.0.1",
|
|
80
|
+
"expo-localization": "~16.0.0",
|
|
81
|
+
"expo-notifications": "~0.29.12",
|
|
82
|
+
"expo-router": "~4.0.15",
|
|
83
|
+
"expo-secure-store": "~14.0.1",
|
|
84
|
+
"expo-splash-screen": "~0.29.20",
|
|
85
|
+
"expo-status-bar": "~2.0.1",
|
|
86
|
+
"expo-system-ui": "~4.0.6",
|
|
87
|
+
"expo-task-manager": "~12.0.3",
|
|
88
|
+
"expo-updates": "~0.26.12",
|
|
89
|
+
"i18next": "^24.2.1",
|
|
90
|
+
"nativewind": "^4.1.23",
|
|
91
|
+
"react": "18.3.1",
|
|
92
|
+
"react-hook-form": "^7.54.2",
|
|
93
|
+
"react-i18next": "^15.2.0",
|
|
94
|
+
"react-native": "0.76.6",
|
|
95
|
+
"react-native-gesture-handler": "~2.20.2",
|
|
96
|
+
"react-native-reanimated": "~3.16.7",
|
|
97
|
+
"react-native-safe-area-context": "^4.14.1",
|
|
98
|
+
"react-native-screens": "~4.4.0",
|
|
99
|
+
"tailwind-merge": "^2.6.0",
|
|
100
|
+
"tailwindcss": "^3.4.17",
|
|
101
|
+
"zod": "^3.24.1",
|
|
102
|
+
"zustand": "^5.0.3"
|
|
103
|
+
},
|
|
104
|
+
"devDependencies": {
|
|
105
|
+
"@babel/core": "^7.26.0",
|
|
106
|
+
"@storybook/addon-essentials": "^8.5.0",
|
|
107
|
+
"@storybook/addon-react-native-web": "^0.0.24",
|
|
108
|
+
"@storybook/react": "^8.5.0",
|
|
109
|
+
"@storybook/react-webpack5": "^8.5.0",
|
|
110
|
+
"@testing-library/jest-native": "^5.4.3",
|
|
111
|
+
"@testing-library/react-native": "^12.9.0",
|
|
112
|
+
"@types/jest": "^29.5.14",
|
|
113
|
+
"@types/react": "~18.3.18",
|
|
114
|
+
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
115
|
+
"@typescript-eslint/parser": "^8.21.0",
|
|
116
|
+
"eslint": "^8.57.1",
|
|
117
|
+
"eslint-config-expo": "^8.0.1",
|
|
118
|
+
"eslint-config-prettier": "^9.1.0",
|
|
119
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
120
|
+
"husky": "^9.1.7",
|
|
121
|
+
"jest": "^29.7.0",
|
|
122
|
+
"jest-expo": "~52.0.3",
|
|
123
|
+
"lint-staged": "^15.3.0",
|
|
124
|
+
"prettier": "^3.4.2",
|
|
125
|
+
"storybook": "^8.5.0",
|
|
126
|
+
"typedoc": "^0.27.6",
|
|
127
|
+
"typescript": "^5.7.3"
|
|
128
|
+
},
|
|
129
|
+
"lint-staged": {
|
|
130
|
+
"*.{ts,tsx}": [
|
|
131
|
+
"eslint --fix",
|
|
132
|
+
"prettier --write"
|
|
133
|
+
],
|
|
134
|
+
"*.{json,md}": [
|
|
135
|
+
"prettier --write"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"files": [
|
|
139
|
+
"app",
|
|
140
|
+
"assets",
|
|
141
|
+
"components",
|
|
142
|
+
"constants",
|
|
143
|
+
"hooks",
|
|
144
|
+
"i18n",
|
|
145
|
+
"services",
|
|
146
|
+
"stores",
|
|
147
|
+
"types",
|
|
148
|
+
"utils",
|
|
149
|
+
"scripts",
|
|
150
|
+
"maestro",
|
|
151
|
+
"docs",
|
|
152
|
+
".storybook",
|
|
153
|
+
".github",
|
|
154
|
+
"__tests__",
|
|
155
|
+
"app.config.ts",
|
|
156
|
+
"babel.config.js",
|
|
157
|
+
"eas.json",
|
|
158
|
+
"global.css",
|
|
159
|
+
"jest.config.js",
|
|
160
|
+
"metro.config.js",
|
|
161
|
+
"nativewind-env.d.ts",
|
|
162
|
+
"tailwind.config.js",
|
|
163
|
+
"tsconfig.json",
|
|
164
|
+
".env.example",
|
|
165
|
+
".eslintrc.js",
|
|
166
|
+
".prettierrc",
|
|
167
|
+
".gitignore",
|
|
168
|
+
"CHANGELOG.md",
|
|
169
|
+
"CONTRIBUTING.md",
|
|
170
|
+
"README.md"
|
|
171
|
+
],
|
|
172
|
+
"publishConfig": {
|
|
173
|
+
"access": "public"
|
|
174
|
+
}
|
|
175
|
+
}
|