/disciple-tools-mobile-app

The React Native code base for the Disciple.Tools mobile app

Primary LanguageJavaScript

Disciple Tools Mobile App

The React Native code base for the Disciple Tools mobile app.

Download the App

AppStore PlayStore

Latest status

Production Development

Team

Dependent Repo

Offline Usage

Offline Usage Guide

Basic Design Idea

Basic Design Idea

Installation (Development)

npm install
npm start
  • Run in Simulator:

  • Run on device (phone) via Expo:

    • Scan the QR code above with Expo Go (Android) or the Camera app (iOS), or
    • or, manually open Expo app on phone and select appropriate option from under "Development servers"
    • (NOTE: Your phone must be on the same local network as the development computer)
  • Recently tested with the following library versions:

    • Node v14 or v16 (or should work with latest)
    • Expo CLI v5+

DataStore

Information on the redux setup for managing data: Data Store

Tests

Run all tests:

npm run test

Design Decisions

General:

  • Offline-First (via dispatch to Redux onAppBackground & persistent FIFO request queue for API writes)
  • Aggressive data fetching, preferring to get all vs. pagination (so that data is available offline)
  • CNonce: PIN (3 sec)
  • (Coming soon) Accessibility (double as Test IDs?)

UI/Framework-specific:

  • Functional Components vs. Class
  • Modular component design to mirror D.T Post Types and Fields, and dynamically respond to API changes, and support plugins
  • Custom Hooks - map well to REST endpoints
  • SWR (stale-while-revalidate), also meets requirement for background fetching, onFocus fetching (prevent stale data on refocus of app)
  • Redux AND Context - Redux handles any persisted state, and Context is in-memory, runtime app state
  • Prefer Skeletons to Spinners, except for Button Actions
  • Minimize 3rd party dependencies where possible (eg, implement own Login form validation vs. something like Formik). Purpose: long-term maintenance (since this is an OSS project with volunteers), fewer library preference debates, less app bloat
  • SecureStore - use as much as practical
  • Component Library: N/A (removed Native Base)
  • Abstract service libraries (ie, Expo, SWR, Axios) via Hooks, in case we want to swap for something else later

Contributing

Contributing Guide