Giter VIP home page Giter VIP logo

clearspend-mobile's Introduction

Build status

1653862065-clearspend-home-desktop

Setup

Follow general React Native setup: (React Native CLI Quickstart): https://reactnative.dev/docs/environment-setup

  • Install Homebrew
  • Install node: brew install node
  • Install watchman: brew install watchman
  • Install Xcode and Xcode Command Line Tools
  • Install cocoapods: sudo gem install cocoapods
  • Install modules: yarn install
  • Install pods: yarn podinstall (Defined in package.json)
  • Start the metro bundler, in a dedicated terminal yarn start
  • Run the iOS app (remember to start a simulator or connect a device): yarn ios
    • Alternatively, open the workspace in Xcode and build & run the app from there
  • Run the Android app (remember to start a simulator or connect a device): yarn android

Set up .env files

The app is built for 3 different environments: DEV, UAT and PROD. Each of these variants sources its environment variables from files named .env.dev, .env.uat and .env.prod respectively.

Follow the instructions in .env.example to create each of these files, no env files or values should be committed to version control.

Values for different environments can be found in 1Password or App Center.

Each of the different variants has yarn command for each platform:

 yarn ios/android -> DEV
 yarn ios-uat/android-uat -> UAT
 yarn ios-prod/android-prod -> PROD 

Important: The yarn commands set up the correct environment file for each build. Running a build in XCode/Android studio or with react-native-cli directly will use variables from the .env file. This is how the variables are provided during App Center builds.

Feature Flags

See Feature Flags Document

Build Process

See Build Process Document

Setup Issues

M1 Macs:

Styling

Tailwind

This project uses tailwind-react-native-classnames for styling: https://github.com/jaredh159/tailwind-react-native-classnames/tree/master#readme

Search style names:

Edit/Customize Tailwind Styles:

  • Restart metro and rebuild project

Fonts

  • Fonts are located in the src/assets/fonts directory and linked in tailwind.config.js
  • Use custom fonts with e.g. 'font-montreal' or 'font-telegraf'
  • Set weight with e.g. 'font-bold'

Testing

Unit testing

  • Jest
  • React Native Testing Library
  • MSW for mocking requests

See @Helpers/testing for custom test helpers

Integration/Device testing

  • TBC

Snyk tests - Security checks

Test new packages that are added with snyk test packagename

Backend types mapping

Generate a new capital.ts file

  1. Terminal > yarn generate

Local Server

Setup

  1. Open terminal in restserver directory (cd restserver)
  2. Install modules with yarn install

Run local REST Server

(Assumes the setup steps have been done)

  1. Run the yarn restserver script from the main directory. Alternately, run node index.js from the restserver directory to start local server.
  2. You should see output REST server listening on port 8000!
  3. yarn restserver runs the server with nodemon so changes made in the restserver directory should cause the server to restart and reflect the changes.

clearspend-mobile's People

Contributors

roconnorr avatar spsaucier avatar nobbyclark avatar yashkaur30 avatar ekolesnik-cs avatar rmathias86 avatar

Stargazers

Pham Tuan Anh avatar  avatar Hulusi Kafalıer avatar Joseph silvester stallone R avatar Harish avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.