@highbeek/create-rnstarterkit 1.0.0 → 1.0.1-beta.0

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 (121) hide show
  1. package/dist/bin/create-rnstarterkit.js +21 -7
  2. package/dist/src/generators/appGenerator.js +976 -60
  3. package/dist/templates/cli-base/.bundle/config +2 -0
  4. package/dist/templates/cli-base/.eslintrc.js +4 -0
  5. package/dist/templates/cli-base/.prettierrc.js +5 -0
  6. package/dist/templates/cli-base/.watchmanconfig +1 -0
  7. package/dist/templates/cli-base/App.tsx +45 -0
  8. package/dist/templates/cli-base/Gemfile +16 -0
  9. package/dist/templates/cli-base/Gemfile.lock +169 -0
  10. package/dist/templates/cli-base/README.md +97 -0
  11. package/dist/templates/cli-base/__tests__/App.test.tsx +13 -0
  12. package/dist/templates/cli-base/android/app/build.gradle +119 -0
  13. package/dist/templates/cli-base/android/app/debug.keystore +0 -0
  14. package/dist/templates/cli-base/android/app/proguard-rules.pro +10 -0
  15. package/dist/templates/cli-base/android/app/src/main/AndroidManifest.xml +27 -0
  16. package/dist/templates/cli-base/android/app/src/main/java/com/baseapp/MainActivity.kt +22 -0
  17. package/dist/templates/cli-base/android/app/src/main/java/com/baseapp/MainApplication.kt +27 -0
  18. package/dist/templates/cli-base/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  19. package/dist/templates/cli-base/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  20. package/dist/templates/cli-base/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  21. package/dist/templates/cli-base/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  22. package/dist/templates/cli-base/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  23. package/dist/templates/cli-base/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  24. package/dist/templates/cli-base/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  25. package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  26. package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  27. package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  28. package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  29. package/dist/templates/cli-base/android/app/src/main/res/values/strings.xml +3 -0
  30. package/dist/templates/cli-base/android/app/src/main/res/values/styles.xml +9 -0
  31. package/dist/templates/cli-base/android/build.gradle +21 -0
  32. package/dist/templates/cli-base/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  33. package/dist/templates/cli-base/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  34. package/dist/templates/cli-base/android/gradle.properties +44 -0
  35. package/dist/templates/cli-base/android/gradlew +251 -0
  36. package/dist/templates/cli-base/android/gradlew.bat +99 -0
  37. package/dist/templates/cli-base/android/settings.gradle +6 -0
  38. package/dist/templates/cli-base/app.json +4 -0
  39. package/dist/templates/cli-base/babel.config.js +3 -0
  40. package/dist/templates/cli-base/index.js +9 -0
  41. package/dist/templates/cli-base/ios/.xcode.env +11 -0
  42. package/dist/templates/cli-base/ios/BaseApp/AppDelegate.swift +48 -0
  43. package/dist/templates/cli-base/ios/BaseApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  44. package/dist/templates/cli-base/ios/BaseApp/Images.xcassets/Contents.json +6 -0
  45. package/dist/templates/cli-base/ios/BaseApp/Info.plist +60 -0
  46. package/dist/templates/cli-base/ios/BaseApp/LaunchScreen.storyboard +47 -0
  47. package/dist/templates/cli-base/ios/BaseApp/PrivacyInfo.xcprivacy +37 -0
  48. package/dist/templates/cli-base/ios/BaseApp.xcodeproj/project.pbxproj +494 -0
  49. package/dist/templates/cli-base/ios/BaseApp.xcodeproj/xcshareddata/xcschemes/BaseApp.xcscheme +88 -0
  50. package/dist/templates/cli-base/ios/BaseApp.xcworkspace/contents.xcworkspacedata +10 -0
  51. package/dist/templates/cli-base/ios/Podfile +34 -0
  52. package/dist/templates/cli-base/ios/Podfile.lock +2165 -0
  53. package/dist/templates/cli-base/jest.config.js +3 -0
  54. package/dist/templates/cli-base/metro.config.js +11 -0
  55. package/dist/templates/cli-base/package-lock.json +11859 -0
  56. package/dist/templates/cli-base/package.json +41 -0
  57. package/dist/templates/cli-base/tsconfig.json +8 -0
  58. package/dist/templates/expo-base/.vscode/extensions.json +1 -0
  59. package/dist/templates/expo-base/.vscode/settings.json +7 -0
  60. package/dist/templates/expo-base/README.md +50 -0
  61. package/dist/templates/expo-base/app/_layout.tsx +12 -0
  62. package/dist/templates/expo-base/app/index.tsx +9 -0
  63. package/dist/templates/expo-base/app.json +48 -0
  64. package/dist/templates/expo-base/assets/images/android-icon-background.png +0 -0
  65. package/dist/templates/expo-base/assets/images/android-icon-foreground.png +0 -0
  66. package/dist/templates/expo-base/assets/images/android-icon-monochrome.png +0 -0
  67. package/dist/templates/expo-base/assets/images/favicon.png +0 -0
  68. package/dist/templates/expo-base/assets/images/icon.png +0 -0
  69. package/dist/templates/expo-base/assets/images/partial-react-logo.png +0 -0
  70. package/dist/templates/expo-base/assets/images/react-logo.png +0 -0
  71. package/dist/templates/expo-base/assets/images/react-logo@2x.png +0 -0
  72. package/dist/templates/expo-base/assets/images/react-logo@3x.png +0 -0
  73. package/dist/templates/expo-base/assets/images/splash-icon.png +0 -0
  74. package/dist/templates/expo-base/components/ui/collapsible.tsx +45 -0
  75. package/dist/templates/expo-base/components/ui/icon-symbol.ios.tsx +32 -0
  76. package/dist/templates/expo-base/components/ui/icon-symbol.tsx +41 -0
  77. package/dist/templates/expo-base/eslint.config.js +10 -0
  78. package/dist/templates/expo-base/package-lock.json +12916 -0
  79. package/dist/templates/expo-base/package.json +46 -0
  80. package/dist/templates/expo-base/tsconfig.json +17 -0
  81. package/dist/templates/optional/apiClient/api/client.ts +142 -0
  82. package/dist/templates/optional/apiClient/api/index.ts +1 -0
  83. package/dist/templates/optional/apiClient/config/env.cli.ts +5 -0
  84. package/dist/templates/optional/apiClient/config/env.expo.ts +4 -0
  85. package/dist/templates/optional/apiClient/config/env.ts +1 -0
  86. package/dist/templates/optional/apiClient/env.d.ts +3 -0
  87. package/dist/templates/optional/auth-context/api/endpoints/auth.ts +14 -0
  88. package/dist/templates/optional/auth-context/context/AuthContext.tsx +47 -0
  89. package/dist/templates/optional/auth-context/navigation/ProtectedStack.tsx +38 -0
  90. package/dist/templates/optional/auth-context/navigation/cli/BottomTabs.tsx +17 -0
  91. package/dist/templates/optional/auth-context/navigation/expo/BottomTabs.tsx +29 -0
  92. package/dist/templates/optional/auth-context/screens/HomeScreen.tsx +15 -0
  93. package/dist/templates/optional/auth-context/screens/LoginScreen.tsx +63 -0
  94. package/dist/templates/optional/auth-context/screens/ProfileScreen.tsx +11 -0
  95. package/dist/templates/optional/auth-context/screens/RegisterScreen.tsx +63 -0
  96. package/dist/templates/optional/auth-context/screens/SettingsScreen.tsx +11 -0
  97. package/dist/templates/optional/auth-context/utils/storage.ts +13 -0
  98. package/dist/templates/optional/auth-redux/api/endpoints/auth.ts +14 -0
  99. package/dist/templates/optional/auth-redux/navigation/ProtectedStack.tsx +30 -0
  100. package/dist/templates/optional/auth-redux/navigation/cli/BottomTabs.tsx +17 -0
  101. package/dist/templates/optional/auth-redux/navigation/expo/BottomTabs.tsx +31 -0
  102. package/dist/templates/optional/auth-redux/screens/HomeScreen.tsx +16 -0
  103. package/dist/templates/optional/auth-redux/screens/LoginScreen.tsx +64 -0
  104. package/dist/templates/optional/auth-redux/screens/ProfileScreen.tsx +15 -0
  105. package/dist/templates/optional/auth-redux/screens/RegisterScreen.tsx +64 -0
  106. package/dist/templates/optional/auth-redux/screens/SettingsScreen.tsx +15 -0
  107. package/dist/templates/optional/auth-redux/store/authSlice.ts +25 -0
  108. package/dist/templates/optional/auth-redux/store/store.ts +11 -0
  109. package/dist/templates/optional/auth-zustand/api/endpoints/auth.ts +14 -0
  110. package/dist/templates/optional/auth-zustand/navigation/BottomTabs.tsx +1 -0
  111. package/dist/templates/optional/auth-zustand/navigation/ProtectedStack.tsx +44 -0
  112. package/dist/templates/optional/auth-zustand/navigation/cli/BottomTabs.tsx +17 -0
  113. package/dist/templates/optional/auth-zustand/navigation/expo/BottomTabs.tsx +31 -0
  114. package/dist/templates/optional/auth-zustand/screens/HomeScreen.tsx +15 -0
  115. package/dist/templates/optional/auth-zustand/screens/LoginScreen.tsx +63 -0
  116. package/dist/templates/optional/auth-zustand/screens/ProfileScreen.tsx +11 -0
  117. package/dist/templates/optional/auth-zustand/screens/RegisterScreen.tsx +63 -0
  118. package/dist/templates/optional/auth-zustand/screens/SettingsScreen.tsx +11 -0
  119. package/dist/templates/optional/auth-zustand/store/authStore.ts +30 -0
  120. package/dist/templates/optional/auth-zustand/utils/storage.ts +13 -0
  121. package/package.json +2 -2
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "scripts": {
6
+ "android": "react-native run-android",
7
+ "ios": "react-native run-ios",
8
+ "lint": "eslint .",
9
+ "start": "react-native start",
10
+ "test": "jest"
11
+ },
12
+ "dependencies": {
13
+ "react": "19.2.3",
14
+ "react-native": "0.84.0",
15
+ "@react-native/new-app-screen": "0.84.0",
16
+ "react-native-safe-area-context": "^5.5.2"
17
+ },
18
+ "devDependencies": {
19
+ "@babel/core": "^7.25.2",
20
+ "@babel/preset-env": "^7.25.3",
21
+ "@babel/runtime": "^7.25.0",
22
+ "@react-native-community/cli": "20.1.0",
23
+ "@react-native-community/cli-platform-android": "20.1.0",
24
+ "@react-native-community/cli-platform-ios": "20.1.0",
25
+ "@react-native/babel-preset": "0.84.0",
26
+ "@react-native/eslint-config": "0.84.0",
27
+ "@react-native/metro-config": "0.84.0",
28
+ "@react-native/typescript-config": "0.84.0",
29
+ "@types/jest": "^29.5.13",
30
+ "@types/react": "^19.2.0",
31
+ "@types/react-test-renderer": "^19.1.0",
32
+ "eslint": "^8.19.0",
33
+ "jest": "^29.6.3",
34
+ "prettier": "2.8.8",
35
+ "react-test-renderer": "19.2.3",
36
+ "typescript": "^5.8.3"
37
+ },
38
+ "engines": {
39
+ "node": ">= 22.11.0"
40
+ }
41
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "@react-native/typescript-config",
3
+ "compilerOptions": {
4
+ "types": ["jest"]
5
+ },
6
+ "include": ["**/*.ts", "**/*.tsx"],
7
+ "exclude": ["**/node_modules", "**/Pods"]
8
+ }
@@ -0,0 +1 @@
1
+ { "recommendations": ["expo.vscode-expo-tools"] }
@@ -0,0 +1,7 @@
1
+ {
2
+ "editor.codeActionsOnSave": {
3
+ "source.fixAll": "explicit",
4
+ "source.organizeImports": "explicit",
5
+ "source.sortMembers": "explicit"
6
+ }
7
+ }
@@ -0,0 +1,50 @@
1
+ # Welcome to your Expo app 👋
2
+
3
+ This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
4
+
5
+ ## Get started
6
+
7
+ 1. Install dependencies
8
+
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ 2. Start the app
14
+
15
+ ```bash
16
+ npx expo start
17
+ ```
18
+
19
+ In the output, you'll find options to open the app in a
20
+
21
+ - [development build](https://docs.expo.dev/develop/development-builds/introduction/)
22
+ - [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
23
+ - [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
24
+ - [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
25
+
26
+ You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
27
+
28
+ ## Get a fresh project
29
+
30
+ When you're ready, run:
31
+
32
+ ```bash
33
+ npm run reset-project
34
+ ```
35
+
36
+ This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
37
+
38
+ ## Learn more
39
+
40
+ To learn more about developing your project with Expo, look at the following resources:
41
+
42
+ - [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
43
+ - [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
44
+
45
+ ## Join the community
46
+
47
+ Join our community of developers creating universal apps.
48
+
49
+ - [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
50
+ - [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
@@ -0,0 +1,12 @@
1
+ import { Stack } from "expo-router";
2
+ import { SafeAreaProvider } from "react-native-safe-area-context";
3
+
4
+ export default function RootLayout() {
5
+ return (
6
+ <SafeAreaProvider>
7
+ <Stack>
8
+ <Stack.Screen name="index" options={{ title: "Home" }} />
9
+ </Stack>
10
+ </SafeAreaProvider>
11
+ );
12
+ }
@@ -0,0 +1,9 @@
1
+ import { Text, View } from "react-native";
2
+
3
+ export default function HomeScreen() {
4
+ return (
5
+ <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
6
+ <Text>Welcome to RN Starter Kit</Text>
7
+ </View>
8
+ );
9
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "expo": {
3
+ "name": "{{projectName}}",
4
+ "slug": "{{projectName}}",
5
+ "version": "1.0.0",
6
+ "orientation": "portrait",
7
+ "icon": "./assets/images/icon.png",
8
+ "scheme": "expobase",
9
+ "userInterfaceStyle": "automatic",
10
+ "newArchEnabled": true,
11
+ "ios": {
12
+ "supportsTablet": true
13
+ },
14
+ "android": {
15
+ "adaptiveIcon": {
16
+ "backgroundColor": "#E6F4FE",
17
+ "foregroundImage": "./assets/images/android-icon-foreground.png",
18
+ "backgroundImage": "./assets/images/android-icon-background.png",
19
+ "monochromeImage": "./assets/images/android-icon-monochrome.png"
20
+ },
21
+ "edgeToEdgeEnabled": true,
22
+ "predictiveBackGestureEnabled": false
23
+ },
24
+ "web": {
25
+ "output": "static",
26
+ "favicon": "./assets/images/favicon.png"
27
+ },
28
+ "plugins": [
29
+ "expo-router",
30
+ [
31
+ "expo-splash-screen",
32
+ {
33
+ "image": "./assets/images/splash-icon.png",
34
+ "imageWidth": 200,
35
+ "resizeMode": "contain",
36
+ "backgroundColor": "#ffffff",
37
+ "dark": {
38
+ "backgroundColor": "#000000"
39
+ }
40
+ }
41
+ ]
42
+ ],
43
+ "experiments": {
44
+ "typedRoutes": true,
45
+ "reactCompiler": true
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,45 @@
1
+ import { PropsWithChildren, useState } from 'react';
2
+ import { StyleSheet, TouchableOpacity } from 'react-native';
3
+
4
+ import { ThemedText } from '@/components/themed-text';
5
+ import { ThemedView } from '@/components/themed-view';
6
+ import { IconSymbol } from '@/components/ui/icon-symbol';
7
+ import { Colors } from '@/constants/theme';
8
+ import { useColorScheme } from '@/hooks/use-color-scheme';
9
+
10
+ export function Collapsible({ children, title }: PropsWithChildren & { title: string }) {
11
+ const [isOpen, setIsOpen] = useState(false);
12
+ const theme = useColorScheme() ?? 'light';
13
+
14
+ return (
15
+ <ThemedView>
16
+ <TouchableOpacity
17
+ style={styles.heading}
18
+ onPress={() => setIsOpen((value) => !value)}
19
+ activeOpacity={0.8}>
20
+ <IconSymbol
21
+ name="chevron.right"
22
+ size={18}
23
+ weight="medium"
24
+ color={theme === 'light' ? Colors.light.icon : Colors.dark.icon}
25
+ style={{ transform: [{ rotate: isOpen ? '90deg' : '0deg' }] }}
26
+ />
27
+
28
+ <ThemedText type="defaultSemiBold">{title}</ThemedText>
29
+ </TouchableOpacity>
30
+ {isOpen && <ThemedView style={styles.content}>{children}</ThemedView>}
31
+ </ThemedView>
32
+ );
33
+ }
34
+
35
+ const styles = StyleSheet.create({
36
+ heading: {
37
+ flexDirection: 'row',
38
+ alignItems: 'center',
39
+ gap: 6,
40
+ },
41
+ content: {
42
+ marginTop: 6,
43
+ marginLeft: 24,
44
+ },
45
+ });
@@ -0,0 +1,32 @@
1
+ import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+
4
+ export function IconSymbol({
5
+ name,
6
+ size = 24,
7
+ color,
8
+ style,
9
+ weight = 'regular',
10
+ }: {
11
+ name: SymbolViewProps['name'];
12
+ size?: number;
13
+ color: string;
14
+ style?: StyleProp<ViewStyle>;
15
+ weight?: SymbolWeight;
16
+ }) {
17
+ return (
18
+ <SymbolView
19
+ weight={weight}
20
+ tintColor={color}
21
+ resizeMode="scaleAspectFit"
22
+ name={name}
23
+ style={[
24
+ {
25
+ width: size,
26
+ height: size,
27
+ },
28
+ style,
29
+ ]}
30
+ />
31
+ );
32
+ }
@@ -0,0 +1,41 @@
1
+ // Fallback for using MaterialIcons on Android and web.
2
+
3
+ import MaterialIcons from '@expo/vector-icons/MaterialIcons';
4
+ import { SymbolWeight, SymbolViewProps } from 'expo-symbols';
5
+ import { ComponentProps } from 'react';
6
+ import { OpaqueColorValue, type StyleProp, type TextStyle } from 'react-native';
7
+
8
+ type IconMapping = Record<SymbolViewProps['name'], ComponentProps<typeof MaterialIcons>['name']>;
9
+ type IconSymbolName = keyof typeof MAPPING;
10
+
11
+ /**
12
+ * Add your SF Symbols to Material Icons mappings here.
13
+ * - see Material Icons in the [Icons Directory](https://icons.expo.fyi).
14
+ * - see SF Symbols in the [SF Symbols](https://developer.apple.com/sf-symbols/) app.
15
+ */
16
+ const MAPPING = {
17
+ 'house.fill': 'home',
18
+ 'paperplane.fill': 'send',
19
+ 'chevron.left.forwardslash.chevron.right': 'code',
20
+ 'chevron.right': 'chevron-right',
21
+ } as IconMapping;
22
+
23
+ /**
24
+ * An icon component that uses native SF Symbols on iOS, and Material Icons on Android and web.
25
+ * This ensures a consistent look across platforms, and optimal resource usage.
26
+ * Icon `name`s are based on SF Symbols and require manual mapping to Material Icons.
27
+ */
28
+ export function IconSymbol({
29
+ name,
30
+ size = 24,
31
+ color,
32
+ style,
33
+ }: {
34
+ name: IconSymbolName;
35
+ size?: number;
36
+ color: string | OpaqueColorValue;
37
+ style?: StyleProp<TextStyle>;
38
+ weight?: SymbolWeight;
39
+ }) {
40
+ return <MaterialIcons color={color} size={size} name={MAPPING[name]} style={style} />;
41
+ }
@@ -0,0 +1,10 @@
1
+ // https://docs.expo.dev/guides/using-eslint/
2
+ const { defineConfig } = require('eslint/config');
3
+ const expoConfig = require('eslint-config-expo/flat');
4
+
5
+ module.exports = defineConfig([
6
+ expoConfig,
7
+ {
8
+ ignores: ['dist/*'],
9
+ },
10
+ ]);