Coder Social home page Coder Social logo

gikkkkkk / react-native-template-obytes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from obytes/react-native-template-obytes

0.0 0.0 0.0 4.01 MB

๐Ÿ“ฑ 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: MIT License

JavaScript 2.72% TypeScript 41.47% Starlark 1.04% Java 27.16% Objective-C 4.11% Ruby 2.19% Shell 0.25% Makefile 2.63% C++ 11.99% Objective-C++ 6.44%

react-native-template-obytes's Introduction

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.

react-native-template-obytes's People

Contributors

yjose avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.