Skip to content

Latest commit

 

History

History
242 lines (166 loc) · 6.05 KB

README.md

File metadata and controls

242 lines (166 loc) · 6.05 KB

⭐ React Native Boilerplate

My favorite React Native template for a quick start with TypeScript.

Dependencies

🎆 Features

Show features
🇻🇳 🔰 Status
Navigation
Login - Sign up
Authenticaion flows
Theme
Localization
Custom fonts
Localization

🍔 Getting Started

🔥 Firebase setup

image

Show instructions
  • iOS

    Add GoogleService-Info.plist for each environment

    ios/<project>/Firebase
  • Android

    Add google-service.json for each environment

    android/app/firebase

📮 Firestore setup for Chat function

image

Show instructions
  1. Structure
  • User

image

image

  • Conversations

image

image

  1. Firestore rules
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{user_id} {
      allow read: if request.auth != null;

      allow write: if request.auth.uid == user_id;

      match /conversations/{document=**} {
        allow read, write: if request.auth != null;
      }
    }

    match /conversations/{conversation_id} {
      allow read: if request.auth != null && request.auth.uid in get(/databases/$(database)/documents/conversations/$(conversation_id)).data.userIds;
      allow write: if request.auth != null && request.auth.uid in get(/databases/$(database)/documents/conversations/$(conversation_id)).data.userIds;

      match /messages/{document=**} {
      	allow read, write: if request.auth != null && request.auth.uid in get(/databases/$(database)/documents/conversations/$(conversation_id)).data.userIds;
    	}
    }
  }
}

🦄 Icomoon

image

Show instructions
  1. Get iconmoon font at https://icomoon.io/app/#/select
  2. Select icons you need for your project

image

  1. Download & extract font file

  2. Copy into src/components/Icon

    image

  3. Update icon types

yarn icons
  1. Update font on Android + iOS
npx react-native link

🥓 Fonts

image

Show instructions
  1. Add custom fonts you wish to use to
src/theme/fonts
  1. Update font on Android + iOS
npx react-native link
  1. Update your font family at
src/theme/fonts/index.tsx

📖 Storybook

image

Unmuted and enjoy 🤣🤣🤣 🇻🇳🇻🇳🇻🇳

storybook-demo.mp4
Show instructions 1. Storybook document - https://storybook.js.org/tutorials/intro-to-storybook/react-native/en/get-started/
  1. iOS
yarn istorybook
  1. Android
yarn astorybook
  1. Use Storybook server (Optional)
yarn storybook

Then reload your simulator or device

📖 React Hook Form

https://dev.to/sankhadeeproy007/using-react-hook-form-with-react-native-part-i-set-up-validation-31ca

Show instructions

📫 Contact

Thuong Nguyen - @mthuong - [email protected]