Skip to content

πŸ“± A template for your next React Native project πŸš€, Made with developer experience and performance first: TypeScript, Husky, Lint-Staged, react-navigation, react-query, restyle, react-hook-form, AppIcon, Splash Screen.

License

Notifications You must be signed in to change notification settings

fiorelosLaconics/react-native-template-obytes

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React Native Template Obytes

React Native Template Obytes

πŸ“± A template for your next React Native project πŸš€, Made with developer experience and performance first: TypeScript, Husky, Lint-Staged, react-navigation, react-query, restyle, react-hook-form, AppIcon, Splash Screen.

πŸš€ Use the template to start your next project or navigate to code source to get some inspiration πŸ˜‰

⭐ Features

  • βœ… Last React Native version
  • πŸŽ‰ Type checking TypeScript
  • πŸ’… Minimal UI kit using @shopify/restyle with theming
  • πŸ€– Auto generate App Icon using react-native-make and Splash screen using react-native-bootsplash
  • 🦊 Husky for Git Hooks
  • πŸ’‘ Clean project structure with Absolute Imports
  • 🚫 Lint-staged for running linters on Git staged files
  • πŸ—‚ VSCode recommended extensions configuration
  • β˜‚οΈ React Navigation pre-installed with examples
  • πŸ’« Auth flow with zustand and react-native-mmkv as a storage to save sensitive data.
  • πŸ›  A simple workflow to build, release and distribute your application using Github action
  • πŸ”₯ React Query & axios to fetch Data
  • 🧡 A good approach with example to handle forms based on react-hook-form and yup for validation
  • βš™οΈ Handel environment variables with react-native-env
  • 🎯 Localization

🎀 Philosophy

  • πŸš€ Production-ready
  • 🧩 Minimal code
  • ⚠️ well maintained third-party libraries

πŸ›  Requirements

πŸ€– Getting started

Start your project using obytes template by running:

npx react-native init MyApp --template https://github.com/obytes/react-native-template-obytes

Open the project on your favorite IDE (vscode πŸ˜‰)

src
β”œβ”€β”€ api                    #axios client and api hooks using react-query
β”‚Β Β  β”œβ”€β”€ APIProvider.tsx
β”‚Β Β  β”œβ”€β”€ client.tsx
β”‚Β Β  β”œβ”€β”€ index.tsx
β”‚Β Β  β”œβ”€β”€ useAddTask.tsx
β”‚Β Β  └── useTasks.tsx
β”œβ”€β”€ core                   # core functionalities:authentication, storage, localization
β”‚Β Β  β”œβ”€β”€ Auth
β”‚Β Β  β”œβ”€β”€ I18n
β”‚Β Β  └── index.tsx
β”œβ”€β”€ index.tsx
β”œβ”€β”€ navigation             # Navigation, stacks and tabs
β”‚Β Β  β”œβ”€β”€ AuthNavigator.tsx
β”‚Β Β  β”œβ”€β”€ RootNavigator.tsx
β”‚Β Β  β”œβ”€β”€ TabNavigator.tsx
β”‚Β Β  β”œβ”€β”€ index.tsx
β”‚Β Β  β”œβ”€β”€ types.tsx
β”‚Β Β  └── utils.tsx
β”œβ”€β”€ screens                # App screens
β”‚Β Β  β”œβ”€β”€ Home
β”‚Β Β  β”œβ”€β”€ Login
β”‚Β Β  β”œβ”€β”€ Style
β”‚Β Β  └── index.tsx
β”œβ”€β”€ translations          # translation files
β”‚Β Β  └── en.json
└── ui                    # ui component with theming
    β”œβ”€β”€ Button.tsx
    β”œβ”€β”€ ErrorHandler
    β”œβ”€β”€ Input.tsx
    β”œβ”€β”€ Pressable.tsx
    β”œβ”€β”€ SafeAreaView.tsx
    β”œβ”€β”€ Screen.tsx
    β”œβ”€β”€ Text.tsx
    β”œβ”€β”€ View.tsx
    β”œβ”€β”€ constants.tsx
    β”œβ”€β”€ icons
    β”œβ”€β”€ index.tsx
    β”œβ”€β”€ theme
    └── utils.tsx

Enable husky Git pre-hooks by adding the following script to your packages.json and reinstall dependencies to enable husky pre-commit using yarn install

   "scripts": {
      "postinstall": "husky install",
    },

🧩 Customization

πŸ“² Update App Icon & Splash screen

Replace App logo template logo.png with your logo under assets folder

Run the following command to generate App icons assets :

yarn react-native set-icon  --path ./assets/logo.png --background "#FFF"

For android icon, make sure to provide a logo with more padding and generate a new app icon for android :

yarn react-native set-icon  --platform android  --path ./assets/android_logo.png --background "#FFF"

To generate a standard splash screen using bootsplash package.

yarn react-native generate-bootsplash assets/logo.png \
  --background-color=FFFFFF \
  --logo-width=150 \
  --assets-path=assets

✏️ Custom fonts

Replace Inter.ttf font file with your fonts under assets/fonts folder

Run the following command to generate App icons assets :

yarn react-native link

More details how to customize App Icon and Splash screen

πŸ“š Read More About Modules

πŸ‘‰ https://handbook.obytes.com/docs/mobile/get-started

Releasing and building the app with Github action

πŸ‘‰ https://handbook.obytes.com/docs/mobile/ci-cd/github-action-build

πŸ”– License

This project is MIT licensed.

About

πŸ“± A template for your next React Native project πŸš€, Made with developer experience and performance first: TypeScript, Husky, Lint-Staged, react-navigation, react-query, restyle, react-hook-form, AppIcon, Splash Screen.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 41.4%
  • Java 27.2%
  • C++ 12.0%
  • Objective-C++ 6.4%
  • Objective-C 4.1%
  • JavaScript 2.8%
  • Other 6.1%