0.1.19 • Published 10 months ago

@neur0base/app-sdk v0.1.19

Weekly downloads
-
License
Neurobase
Repository
github
Last release
10 months ago

ECHOPF-App-SDK

Directory

/src/data/

data formatters are contained in this directory. A data formatter for each data types is in /src/data/types/.

/src/form/

form elements are contained in this directory. A form element for each data types is in /src/form/types/.

/src/languages/

The dictionary file for each language is in this directory. They are loaded at /src/provider/EPFProvider via /src/utils/usei18n.

The dictionary file must follow the below rule. If you'd like to add new rule, please consult with the code owner.

  • Error/{ModuleName}/{ErrorCode} : Define message per module per error code.
  • UI/{UIName}/{LabelName} : Define label for each UI module.
  • Model/{ModelName}/{FieldId} : Define label for each model field.
  • Format/{FormatType} : Define formats.
  • Common/{LabelName} : Define common labels.

/src/layout/

abbrev.

/src/plugin/

The plugin directory must follow the below directory sturucture.

  • /plugin/{PluginName}/data/ : Store data formatter related only to the plugin.
  • /plugin/{PluginName}/form/ : Store form elements related only to the plugin.
  • /plugin/{PluginName}/languages/ : Store dictionary file for each language related only to the plugin.
  • /plugin/{PluginName}/view/: Store view components. The view component is used by the user of this framework (used at DynamicLayoutBuilder, /example/ or imported project).
  • /plugin/{PluginName}/widget/ : Store widget components.

/src/provider/

Store global variables.

  • AppProvider : Combines other providers. The user of this framework calls this provider initially.
  • EPAProvider : Store config file related to this framework.
  • InstancesProvider : Store schema of all EPJ instances used in this framework.
  • UserProvider : Store & manage user's credentials.

/src/ui/

The UI elements are in this directory. An UI element is used in the other UI elements or View components or Widget components or Form elements. The JSX must be defined in /theme/ui/.

/utils/

abbrev.

/theme/

The JSX or stylesheet files must be defined in this directory in order to separate between logic and visual.

/example/

The example directory is for debugging this framework.

Prerequisites:

  • Nodejs (v12.18.3):
  • React Native(0.63.2):
  • Yarn (1.22.5)

For iOS build:

For android development:

  • Android Studio

Build and run the app

  1. Clone this repository by this command

    git clone git@github.com:neur0base/ECHOPF-App-SDK.git
  2. Navigate to the project root directory run

    yarn install
  3. If you're on a Mac and developing for iOS, you need to install the pods (via Cocoapods) to complete the linking
    cd ios && pod install
    If you're on a Mac and developing for Android, you need install JDK using Homebrew
    brew cask install adoptopenjdk/openjdk/adoptopenjdk8
  4. Start your application

    • IOS
      yarn ios
      You should see your new app running in the iOS Simulator shortly.
    • Android
     yarn android

    If everything is set up correctly, you should see your new app running in your Android emulator shortly.

Install package

  1. Install
    yarn add @neur0base/app-sk @echopf/sdk @echopf/frontend-model
    or
    npm install @neur0base/app-sdk @echopf/sdk @echopf/frontend-model
  2. Install peerDependencies

    Package includes other dependencies as: @react-native-community/push-notification-ios, react-native-maps, @react-native-community/datetimepicker, ...

    Run the command below to install all the dependencies

      yarn add react-native-maps @react-native-community/checkbox @react-native-community/datetimepicker @react-native-community/masked-view @react-native-community/picker native-base react-native-date-picker react-native-document-picker react-native-vector-icons react-native-localize @react-native-picker/picker react-native-reanimated react-native-safe-area-context react-native-screens @react-native-community/push-notification-ios @react-navigation/bottom-tabs @react-navigation/drawer @react-navigation/native @react-navigation/stack react-native-gesture-handler react-native-push-notification react-native-svg react-navigation i18next react-i18next
  3. Link the dependency with iOS

      cd ios && pod install

    or

      npx pod-install

    and rebuild your project

  4. General Usage

    • Config App, Layout ( i18n, theme, client, ...)
    <EPAProvider client={yourClient} i18n={yourI18n} style={yourThemeStyle}>
          <DynamicLayoutBuilder
            screens={screens}
            language={'en-US'}
            common={commonConfig}
            layout={layoutConfig}
            theme={themeConfig}
          />
    </EPAProvider>
    • Setup react-native-vector-icons follow doc

Refer

https://reactnative.dev/docs/environment-setup

@babel/preset-env@babel/preset-react@babel/preset-typescript@echopf/frontend-model@echopf/sdk@expo/react-native-action-sheet@gorhom/bottom-sheet@jridgewell/gen-mapping@react-native-async-storage/async-storage@react-native-community/checkbox@react-native-community/datetimepicker@react-native-community/eslint-config@react-native-community/hooks@react-native-community/masked-view@react-native-community/netinfo@react-native-community/picker@react-native-community/push-notification-ios@react-native-community/slider@react-native-firebase/app@react-native-firebase/messaging@react-navigation/bottom-tabs@react-navigation/drawer@react-navigation/native@react-navigation/stackantdaxiosbase64-arraybuffercolorcss-loaderdebugformiki18nexti18next-http-backendintllodashlodash.debouncelodash.getlodash.isequallodash.uniqlodash.uniqbymomentmoment-timezonenative-baseradiumreactreact-content-loaderreact-datetimereact-doc-viewerreact-domreact-i18nextreact-nativereact-native-date-pickerreact-native-dialogreact-native-document-pickerreact-native-elementsreact-native-file-viewerreact-native-fsreact-native-gesture-handlerreact-native-get-random-valuesreact-native-gifted-chatreact-native-hyperlinkreact-native-image-pickerreact-native-keychainreact-native-loading-spinner-overlayreact-native-localizereact-native-mapsreact-native-modalreact-native-modal-datetime-pickerreact-native-modal-selectorreact-native-permissionsreact-native-picker-selectreact-native-push-notificationreact-native-qrcode-svgreact-native-raw-bottom-sheetreact-native-reanimatedreact-native-safe-area-contextreact-native-screensreact-native-snap-carouselreact-native-splash-screenreact-native-svgreact-native-twilio-video-webrtcreact-native-vector-iconsreact-native-webreact-navigationreact-responsive-carouselreact-router-domrn-sliding-up-panelstyle-loaderurl-loaderuse-file-pickeruuidyup
0.1.19

10 months ago

0.1.10

12 months ago

0.1.11

12 months ago

0.1.12

11 months ago

0.1.13

11 months ago

0.1.14

11 months ago

0.1.15

11 months ago

0.1.16

11 months ago

0.1.8

12 months ago

0.1.17

10 months ago

0.1.9

12 months ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago