React Native Structure
npm install rn-global-structureA powerful and scalable custom template for initializing new React Native projects with a clean architecture, built-in localization, and splash screen integration. Perfect for rapid development with a well-organized structure and essential tooling.
This template uses the latest stable version of React Native:
React Native 0.79.x
> Stay up-to-date with official React Native releases
---
- ๐ Components: Reusable UI components
โ MButton, MIcons, MInput, MText
- ๐งฉ Constants: Global constants used across the app
- ๐ i18n: Internationalization via i18next
โ Integrated with Google Sheets for dynamic translation loading
- ๐ Splash Screen: Built-in splash screen support for Android and iOS
โ Just replace the image assets (details below)
- ๐ฆ Navigation: Pre-configured React Navigation
โ Stack and Tab navigators
- ๐ฑ Screens: Feature layers
โ AppLayer, AuthLayer
- ๐ Services: Business logic and shared services
โ API, Navigation
- ๐จ Styles: Global design system (colors, fonts, spacing)
- โ๏ธ Utils: Helpful utility functions
โ DeviceInfo, Endpoint, Normalize
---
Create a new app using this template:
``bash`
npx @react-native-community/cli@latest init YourAppName --template rn-global-structure
โ
To Customize:
- Android
Replace images in:
`bash`
android/app/src/main/res/
โโโ mipmap-mdpi/splash.png
โโโ mipmap-hdpi/splash.png
โโโ mipmap-xhdpi/splash.png
โโโ mipmap-xxhdpi/splash.png
โโโ mipmap-xxxhdpi/splash.png
- iOS
Replace images in:
`swift`
ios/YourAppName/Images.xcassets/Splash.imageset
No extra configuration needed โ just swap the images and rebuild the app.
`bash`
src/
โ
โโโ api/ # API configuration and calls
โโโ assets/ # Images, fonts, icons
โโโ components/ # Reusable UI components
โโโ constants/ # Global constants (colors, fonts, etc.)
โโโ hooks/ # Custom React hooks
โโโ i18n/ # Localization setup
โโโ navigation/ # React Navigation config
โโโ screens/ # App screens by layers (AppLayer, AuthLayer)
โโโ services/ # Shared services (e.g., API, Navigation)
โโโ styles/ # Theming and style tokens
โโโ utils/ # Utility functions
โโโ main/index.js # App entry point๐ค Author
- Vardges Avetisyan
GitHub: @avetisyanvardges
MIT โ free to use, modify, and distribute.
`yaml
---
Let me know if you want this saved as a file or want badges like npm, MIT, or Made with โค๏ธ.``