Skip to content

Commit

Permalink
update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
yjose committed Jan 31, 2022
1 parent 590cc76 commit 7595697
Showing 1 changed file with 90 additions and 31 deletions.
121 changes: 90 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,101 @@
React Native Template Obytes
</h1>

A simple React Native Template based on Obytes Mobile tribe best practices.

## ⭐ Features

- ✅ Typescript by default based on official Typescript template
- ✅ A simple workflow to release and build new version using Github action.
- ✅ Auto Generate App Icon and Splash screen
- ✅ React Navigation Pre-installed
- ✅ React Query to fetch Data
- ✅ Auth flow with react-native-mmkv to secure tokens
- ✅ A clean project structure based on our experience with React Native
- ✅ Minimal UI kit setup using restyle and configurable theme & icons using react-native-svg
- ✅ A good approach to handle forms based on react-hook-form
- ✅ A complete setup to Handle Errors
- ✅ Handel environment variables with react-native-env
- ✅ Localization
- More ...

## ▶️ Usage
📱 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 just navigate to [code source](https://github.com/obytes/react-native-template-obytes/tree/master/template) to get some inspiration 😉

### ⭐ Features

- ✅ Last React Native version
- 🎉 Type checking [TypeScript](https://www.typescriptlang.org/)
- 💅 Minimal UI kit using [@shopify/restyle](https://github.com/Shopify/restyle) with theming
- 🤖 Auto generate App Icon using [react-native-make](https://github.com/bamlab/react-native-make) and Splash screen using [react-native-bootsplash](https://github.com/zoontek/react-native-bootsplash/)
- 🦊 Husky for Git Hooks
- 💡 Clean project structure with Absolute Imports
- 🚫 Lint-staged for running linters on Git staged files
- ☂️ [React Navigation](https://reactnavigation.org/) pre-installed with examples
- 💫 Auth flow with [zustand](https://github.com/pmndrs/zustand) and [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv) as a storage to save sensitive data.
- 🛠 A simple workflow to build, release and distribute your application using [Github action](https://github.com/features/actions)
- 🔥 [React Query](https://react-query.tanstack.com/) & [axios](https://github.com/axios/axios) to fetch Data
- 🧵 A good approach with example to handle forms based on [react-hook-form](https://react-hook-form.com/) and [yup](https://github.com/jquense/yup) for validation
- ⚙️ Handel environment variables with [react-native-env](https://github.com/goatandsheep/react-native-dotenv)
- 🎯 Localization

### 🎤 Philosophy

- 🚀 Production-ready
- 🧩 Minimal code
- ⚠️ well maintained third-party libraries

### Requirements

- [Setting up the development environment](https://reactnative.dev/docs/environment-setup)

### Getting started

Start your project using obytes template by running:

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

## ⚙️ Enable husky Git pre-hooks
Open the project on your favorite IDE (vscode 😉)

Add the following script to your `packages.json` and reinstall dependencies to enable husky pre-commit using `yarn install`
```sh
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
```

```json
"scripts": {
"postinstall": "husky install",
},
Enable husky Git prehooks by adding the following script to your `packages.json` and reinstall dependencies to enable husky pre-commit using `yarn install`

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

## 📲 Update App Icon & Splash screen
### Customization

#### 📲 Update App Icon & Splash screen

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

Expand All @@ -68,9 +127,9 @@ yarn react-native generate-bootsplash assets/logo.png \
--assets-path=assets
```

## ✏️ Custom fonts
#### ✏️ Custom fonts

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

Run the following command to generate App icons assets :

Expand All @@ -80,14 +139,14 @@ yarn react-native link

More details [how to customize App Icon and Splash screen](https://handbook.obytes.com/docs/mobile/generate-app-icon)

## 📚 Read More About Modules
### 📚 Read More About Modules

👉 https://handbook.obytes.com/docs/mobile/get-started

## Releasing and building the app with Github action
### Releasing and building the app with Github action

👉 https://handbook.obytes.com/docs/mobile/ci-cd/github-action-build

## 🔖 License
### 🔖 License

This project is MIT licensed.

0 comments on commit 7595697

Please sign in to comment.