Skip to content

Uni Project: React Native app for accessing shared workspaces

License

Notifications You must be signed in to change notification settings

jwoods02/uni-remote-working

Repository files navigation

Remote Working - React Native with Firebase

This application is a React Native app with a Node.JS backend.

This application depends on the following third party services:

  • Firebase
  • Stripe

Running the app (Front End)

  1. Make sure you're in the remote-working/ directory:

    $ cd remote-working/
  2. Run the following command to install all the required node nodules:

    $ npm install
  3. (Optional) To connect to a local middle tier services, change the following:

    axios.defaults.baseURL = "http://xx.xxx.xxx.xx:4000";

    To your local IP address, or the address of the Firebase hosting url (if running)

  4. Run the following command to start the app:

    $ npm start
  1. Follow the instructions in the terminal to run the app on a physical or virtual device.

Running the middle tier locally OR deploying a new version

The app's Node JS based middle tier should be running via Firebase hosting on the URL https://remoteruralworking.firebaseapp.com. These are the steps to run this locally or deploy to this domain.

  1. Install firebase-tools globally.

    $ npm i -g firebase-tools
  2. Make sure you're in the server directory:

$ cd remote-working/server
  1. Run the following command to install all the required node nodules for the functions:

    $ cd functions
    $ npm install
    $ cd ..
  2. Run the following command to build locally NOTE: Lock API functions will not work locally unless you build a publicly accessible proxy using ngrok.

    $ firebase serve --only functions,hosting

    OR

    To deploy to the server:

    $ firebase deploy --only functions,hosting
  3. Provide authorisation for the middle tier to connect to the lock API by copying line 5 of server/functions/index.js into a web browser and following the instructions to log in.

Packaging as an app

The app could be packaged and published with the concole command expo build:ios or expo build:android and following the instructions (although this is untested). More explaination on this is at https://docs.expo.io/versions/latest/distribution/building-standalone-apps/#3-start-the-build

'Thanks to James for this'

Contributing

Please refer to CONTRIBUTING.MD

Acknowledgements

Used the following tutorials:

CRUD Operations: https://www.djamware.com/post/5bbcd38080aca7466989441b/react-native-firebase-tutorial-build-crud-firestore-app

Auth: https://medium.com/react-native-training/react-native-firebase-authentication-7652e1d2c8a2

Firebase Hosting: https://www.youtube.com/watch?v=LOeioOKUKI8

About

Uni Project: React Native app for accessing shared workspaces

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •