/uads-member-app

Project for UOA Dessert Society. Established in 2021.

Primary LanguageTypeScript

UOA Dessert Society's Members Mobile App.

Established in 2021.

Team Leadership

  • Kinzi Ceolin (Project Manager)
  • Avikash Naidu (Tech Lead)

How users can get started with the project

Windows:

  1. Remove all versions of node from device if it exists
  2. Utilise Node Version Manager and install npm and node

    Node Version Manager – nvm Install Guide

  3. If your node version is above 18 or below 16, switch to node version 16.14.2

    Some other versions not tested by the team may also work

  4. Install yarn

    Installation | Yarn

  5. Clone the repo
  6. Open a terminal, enter the client folder using cd client then run yarn install to install dependencies
  7. Create a file called ‘.env’ with the following content inside the client folder

    BASE_URL=http://localhost:9002
    *API_KEY='Ask WDCC/UADS for access'

  8. Open a new terminal, enter the server folder using cd server then run yarn install to install necessary packages
  9. In MongoDB, Security → Database Access, click + Add New Database User

    Choose ReadAndWriteAdmin in Built-in role
    Fill the other information and click Add User
    You will need to create a username and password

  10. Create a file called ‘.env’ with the following content inside the server folder
    (Replace UserName and Password with the actual username and password of the mongodb database user you have created in step 9)

MONGODB_URI = mongodb+srv://{UserName}:{Password}@uads-cluster.sw67y.mongodb.net/ > retryWrites=true&w=majority
PORT = 9002
NODE_ENV = development

  1. Run npm install mongodb
  2. Run yarn run dev to start on default port 9002
  3. Return to the client terminal and run yarn start
  4. Follow the expo instructions. Press w to start the webpack server

Mac:

  1. Remove all versions of node from device if it exists
  2. Utilise Node Version Manager and install npm and node

    Node Version Manager – nvm Install Guide

  3. Install yarn and check version by yarn --v

    Installation | Yarn
    If the version is not 1.22.4, run yarn set version 1.22.4 yarn set version
    Some other earlier versions not tested by the team may also work

  4. Clone the repo
  5. Open terminal, enter the client folder using cd client, and run yarn or yarn install to install dependencies (This step will take a while)
  6. Go inside client folder and create a file called ‘.env’ with the following content

    BASE_URL=http://localhost:9002
    *API_KEY='Ask WDCC/UADS for access'

  7. Open terminal under the server folder using cd servernd run yarn or yarn install to install dependencies (This step will take a while)
  8. In MongoDB, Security → Database Access, click + Add New Database User

    Choose ReadAndWriteAdmin in Built-in role
    Fill the other information and click Add User
    You will need to create a username and password

  9. Go inside server folder and create a file called ‘.env’ with the following content
    (Replace UserName and Password with the actual username and password of the mongodb database user you have created in step 8)

    MONGODB_URI = mongodb+srv://{UserName}:{Password}@uads-cluster.sw67y.mongodb.net/ retryWrites=true&w=majority
    PORT = 9002
    NODE_ENV = development

  10. Run npm install mongodb
  11. Run yarn run dev to start on default port 9002
  12. Go back to client folder terminal and run yarn start
  13. Follow expo instructions. Press w to open the web page

Node versions that have been tested working:

Above or equal to v12 and below or equal to v16, including 16.14.2, 16.16.0, 16.20.0

Troubleshooting:

  1. QR Code generated in terminal in client does not work
  2. Iphone mode does not work
  3. If some steps were redone and problems occurred running ‘yarn run dev’ or ‘yarn start’, try delete the mode_modules folder in both client and server, run ‘yarn cache clean’, and install all dependencies again
  4. If cleaning cache does not work, delete the repo and clone it again