Most of our development are done on MacOS. We have not tested our application extensively on Windows or Linux.
Please make sure that you have docker running before proceeding further. Run the below command in your terminal upon loading up our application. Please also ensure that MAMP is running, and run the 2 sql files in src/data to create the Fairprice and ColdStorage schemas.
cd services
docker-compose build
docker-compose up
- Access Konga interface via localhost:1337
- Login with any credentials
- Click on dashboard on the left and create a new connection (Name = default, Kong Admin URL = http://kong:8001)
- Click on snapshots on the left
- Import from file
- Import Uchef Kong.json file in the main folder
- Click on details after file is imported
- Click restore
- Tick all the checkboxes
- Click Import Objects
Ensure that all dependencies are installed before running docker-compose build
Stripe CLI listener
This is for the stripe webhook to work. Please install the stripe CLI listener by following the steps below.
brew install stripe/stripe-cli/stripe
sudo stripe login --interactive
Use the following API key when prompted API key: sk_test_51MmDHTHHejWNjfqnvGdRbaOCNtclUwprKx9MZXPvtEuRwPnaXtQdXt9ROhbZ1yMhkUJHPhBjOwRLSoEW8ULlfsZM00TtyTrit9 Press 'Enter' when you see 'How would you like to identify this device in the Stripe Dashboard?'
Use the following command
sudo stripe listen --forward-to localhost:5001/stripe_webhook
If you do not have brew installed, then run the following command in your terminal.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- source: https://brew.sh/
Android Studio Device Emulator
This is to receive the push notification from the server (to simulate scenario 3). Please install Android Studio and use it to open the android project in the folder named android. You will need an apropriate emulator to run the application. In Android Studio, use Tools -> Device Manager -> Create Device to create a new emulator. The emulator must be running in order to receive the push notification. Our team used a Pixel 2 API Upside Down Cake to emulate the receipt of the push notification.
When running the application for the first time, a token will be generated by the emulator in the Android Studio terminal. Copy the token and paste it into services/fcm_cloud_messaging.py on line 13. This is to allow the server to send push notifications to the emulator.
Please make sure that you have node.js installed for this before proceeding further. Run the below command in your terminal upon loading up our application.
npm install
npm run serve
Then, use the following login credentials for testing:
Login: testuser1@gmail.com
Password: test123
Do not type in index.html into the address bar as it will not work. Just use the address given in the terminal (most likely localhost:8080) as the root is being intercepted by our App.vue. To terminate your session, simply press Ctrl + C on your terminal.
G2T2 - Douglas, Zhi Wei, Jaden, Joseph, Zu Yao