Skip to content

Commit

Permalink
refactor: move template folder to root
Browse files Browse the repository at this point in the history
  • Loading branch information
yjose committed Nov 9, 2022
1 parent 27e147d commit d03a3b5
Show file tree
Hide file tree
Showing 241 changed files with 10,971 additions and 13,377 deletions.
2 changes: 2 additions & 0 deletions template/.eslintignore → .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ coverage/
ios/
.expo
.expo-shared
docs/
cli/
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion template/.github/dependabot.yml → .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
interval: weekly
open-pull-requests-limit: 10
labels:
- type:dependencies
Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
node_modules/
.DS_Store
.expo/
dist/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
yarn-error.log

# macOS
.DS_Store
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
158 changes: 158 additions & 0 deletions README-old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<p align="center">
<img alt="React Native Template Obytes" src="https://user-images.githubusercontent.com/11137944/93101697-808bc580-f6a2-11ea-8ce3-482be6ca456a.png" width="200" />

</p>
<h1 align="center">
React Native Template Obytes
</h1>

📱 A template for your next React Native project 🚀, Made with developer experience and performance first: Expo,TypeScript,tailwindcss, Husky, Lint-Staged, react-navigation, react-query, react-hook-form, I18n.

🚀 Use the template to start your next project or navigate to [code source](https://github.com/obytes/react-native-template-obytes/tree/master/template) to get some inspiration 😉

### ⭐ Features

- ✅ Last Expo SDK + Costume Dev client
- 🎉 Type checking [TypeScript](https://www.typescriptlang.org/)
- 💅 Minimal UI kit using [tailwindcss](https://www.nativewind.dev/) with theming.
- ⚙️ Support multiple environnement builds [Production, Staging, Development] using Expo configuration.
- 🦊 Husky for Git Hooks
- 💡 Clean project structure with Absolute Imports
- 🚫 Lint-staged for running linters + typescript checking on Git staged files
- 🗂 VSCode recommended extensions configuration, settings and snippets for a better developer experience
- ☂️ [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 [zod](https://github.com/colinhacks/zod) for validation
- 🎯 Localization with [i18next](https://www.i18next.com/) + validation using Eslint.

### 🎤 Philosophy

- 🚀 Production-ready
- 🥷 Developer experience + Productivity
- 🧩 Minimal code and dependencies
- ⚠️ well maintained third-party libraries

## 🔗 Requirements

- [Node.js LTS release](https://nodejs.org/en/)
- [Git](https://git-scm.com/)
- [Watchman](https://facebook.github.io/watchman/docs/install#buildinstall), required only for macOS or Linux users
- [Yarn](https://classic.yarnpkg.com/en/docs/install)
- [Expo Cli](https://docs.expo.dev/workflow/expo-cli/)
- [VS Code Editor](https://code.visualstudio.com/download)

### 🤖 Getting started

Start your project by running the following command:

```bash
npx create-obytes-app MyApp

```

Run the app

```bash
yarn ios

yarn android
```

### Project structure

```bash
src
├── api
│   ├── common
│   │   ├── api-provider.tsx
│   │   ├── client.tsx
│   │   ├── index.tsx
│   │   └── utils.tsx
│   ├── index.tsx
│   ├── posts
│   │   ├── index.tsx
│   │   └── use-posts.ts
│   └── types.ts
├── core
│   ├── auth
│   │   ├── index.tsx
│   │   └── utils.tsx
│   ├── i18n
│   │   ├── index.tsx
│   │   ├── react-i18next.d.ts
│   │   ├── resources.ts
│   │   ├── types.ts
│   │   └── utils.tsx
│   ├── index.tsx
│   └── utils.ts
├── index.tsx
├── navigation
│   ├── auth-navigator.tsx
│   ├── index.tsx
│   ├── navigation-container.tsx
│   ├── root-navigator.tsx
│   ├── tab-navigator.tsx
│   ├── types.tsx
│   └── utils.tsx
├── screens
│   ├── feed
│   │   ├── card.tsx
│   │   └── index.tsx
│   ├── index.tsx
│   ├── login
│   │   └── index.tsx
│   ├── settings
│   └── style
├── translations
│   ├── ar.json
│   └── en.json
├── types
│   └── index.ts
└── ui
├── core
│   ├── activity-indicator.tsx
│   ├── bottom-sheet
│   ├── button.tsx
│   ├── image.tsx
│   ├── index.tsx
│   ├── input
│   ├── list
│   ├── pressable.tsx
│   ├── scroll-view.tsx
│   ├── select-input
│   ├── text.tsx
│   ├── touchable-opacity.tsx
│   └── view.tsx
├── error-handler
│   ├── error-fallback.tsx
│   └── index.tsx
├── icons
├── index.tsx
├── screen.tsx
├── theme
│   ├── colors.js
│   ├── constants.tsx
│   └── index.ts
└── utils.tsx
```

### 🧩 Customization

#### 📲 Update App Icon & Splash screen

Replace App icons template with your icons under `assets` folder

Run the following command to generate App icons assets :

```
yarn prebuild
yarn ios
```

### 🔖 License

This project is MIT licensed.
161 changes: 34 additions & 127 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,8 @@
<p align="center">
<img alt="React Native Template Obytes" src="https://user-images.githubusercontent.com/11137944/93101697-808bc580-f6a2-11ea-8ce3-482be6ca456a.png" width="200" />

</p>
<h1 align="center">
React Native Template Obytes
</h1>

📱 A template for your next React Native project 🚀, Made with developer experience and performance first: Expo,TypeScript,tailwindcss, Husky, Lint-Staged, react-navigation, react-query, react-hook-form, I18n.

🚀 Use the template to start your next project or navigate to [code source](https://github.com/obytes/react-native-template-obytes/tree/master/template) to get some inspiration 😉

### ⭐ Features
<img alt="Obytesapp logo" src="./assets/icon.jpeg" width="124px" style="border-radius:10px"/><br/>
ObytesApp Mobile App </h1>

- ✅ Last Expo SDK + Costume Dev client
- 🎉 Type checking [TypeScript](https://www.typescriptlang.org/)
- 💅 Minimal UI kit using [tailwindcss](https://www.nativewind.dev/) with theming.
- ⚙️ Support multiple environnement builds [Production, Staging, Development] using Expo configuration.
- 🦊 Husky for Git Hooks
- 💡 Clean project structure with Absolute Imports
- 🚫 Lint-staged for running linters + typescript checking on Git staged files
- 🗂 VSCode recommended extensions configuration, settings and snippets for a better developer experience
- ☂️ [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 [zod](https://github.com/colinhacks/zod) for validation
- 🎯 Localization with [i18next](https://www.i18next.com/) + validation using Eslint.

### 🎤 Philosophy

- 🚀 Production-ready
- 🥷 Developer experience + Productivity
- 🧩 Minimal code and dependencies
- ⚠️ well maintained third-party libraries
Due to the fact that this project is based on [`expo-dev-client` ](https://docs.expo.dev/development/getting-started/), we are able to add our own native libraries as well as utilize the entire Expo ecosystem.

## 🔗 Requirements

Expand All @@ -41,118 +11,55 @@
- [Watchman](https://facebook.github.io/watchman/docs/install#buildinstall), required only for macOS or Linux users
- [Yarn](https://classic.yarnpkg.com/en/docs/install)
- [Expo Cli](https://docs.expo.dev/workflow/expo-cli/)
- [VS Code Editor](https://code.visualstudio.com/download)
- [VS Code Editor](https://code.visualstudio.com/download) ⚠️ Make sure to install all recommended extension from `.vscode/extensions.json`

## 👋 Quick start

### 🤖 Getting started
Clone the repo to your machine and install deps :

Start your project by running the following command:
```sh
git clone https://github.com/user/obytesapp.git

```bash
npx create-obytes-app MyApp
cd ./obytesapp

yarn
```

Run the app
To run the app on ios

```bash
```sh
yarn ios
```

To run the app on Android

```sh
yarn android
```

### Project structure

```bash
src
├── api
│   ├── common
│   │   ├── api-provider.tsx
│   │   ├── client.tsx
│   │   ├── index.tsx
│   │   └── utils.tsx
│   ├── index.tsx
│   ├── posts
│   │   ├── index.tsx
│   │   └── use-posts.ts
│   └── types.ts
├── core
│   ├── auth
│   │   ├── index.tsx
│   │   └── utils.tsx
│   ├── i18n
│   │   ├── index.tsx
│   │   ├── react-i18next.d.ts
│   │   ├── resources.ts
│   │   ├── types.ts
│   │   └── utils.tsx
│   ├── index.tsx
│   └── utils.ts
├── index.tsx
├── navigation
│   ├── auth-navigator.tsx
│   ├── index.tsx
│   ├── navigation-container.tsx
│   ├── root-navigator.tsx
│   ├── tab-navigator.tsx
│   ├── types.tsx
│   └── utils.tsx
├── screens
│   ├── feed
│   │   ├── card.tsx
│   │   └── index.tsx
│   ├── index.tsx
│   ├── login
│   │   └── index.tsx
│   ├── settings
│   └── style
├── translations
│   ├── ar.json
│   └── en.json
├── types
│   └── index.ts
└── ui
├── core
│   ├── activity-indicator.tsx
│   ├── bottom-sheet
│   ├── button.tsx
│   ├── image.tsx
│   ├── index.tsx
│   ├── input
│   ├── list
│   ├── pressable.tsx
│   ├── scroll-view.tsx
│   ├── select-input
│   ├── text.tsx
│   ├── touchable-opacity.tsx
│   └── view.tsx
├── error-handler
│   ├── error-fallback.tsx
│   └── index.tsx
├── icons
├── index.tsx
├── screen.tsx
├── theme
│   ├── colors.js
│   ├── constants.tsx
│   └── index.ts
└── utils.tsx
```
## Project setup

### 🧩 Customization
The project use `husky` and `lint-staged` to manage the project. We will run `yarn lint` before your commit for all the files that are added or modified to make sure that the project is linted and your code respects the best practices.

#### 📲 Update App Icon & Splash screen
we are also enforcing a conventional git commit message format based on the [conventional-commits](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) guidelines.

Replace App icons template with your icons under `assets` folder
If you set up VsCode correctly and install all the recommended extensions, you will be able to see all the linting errors in the editor.

Run the following command to generate App icons assets :
You can always run `yarn lint` in your terminal if you have trouble setting up eslint.

```
yarn prebuild
If you had trouble setting up vs code, try updating to the last version and turning off other extensions for the project. If it still doesn't work, please make a problem report on github.

yarn ios
## Built with

```
The project is built with the following libraries :

### 🔖 License
- [expo](https://expo.dev)
- [react-query](https://tanstack.com/query/v4/)
- [zustand](https://zustand-demo.pmnd.rs/)
- [nativewind](https://nativewind.dev/)
- [react-navigation](https://reactnavigation.org/)
- [react-hook-form](https://react-hook-form.com/)
- [@shopify/flash-list](https://shopify.github.io/flash-list/)
- [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv)

This project is MIT licensed.
> Its always a good idea to check out those libraries and see how they work.😉
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Loading

0 comments on commit d03a3b5

Please sign in to comment.