- Each set of endpoints has its own
Endpoints.yaml
file describing endpoints - The "Swagger Viewer" extension on VScode is an easy way to render these documents
- Download the docker-compose.yml file and .env file place it in the project root directory (the directory that contains all four layers)
- In
.env
add following to connect to the local database instances running locally in the container:
DB_CONNECTION_STRING="Server=mysql;Port=3306;Database=go-ride-share;UserID=testadmin;Password=SoftEng2db;"
MONGODB_ATLAS_URI="mongodb://testadmin:SoftEng2db@mongodb:27017/go_ride_share_db?authSource=admin"
- Open the project root directory in terminal and run
docker-compose up --build --force-recreate --remove-orphans
. This will start all three functions apps in both theDb Layer
,Logic Layer
and theReact Front End
. - To access the
React Front End
head to thehttp://localhost:3000
.
- WIP, follow the non-contrainerized instruction for now
Warning
Non containerized method is deprecated for DB layer. Please use containerized steps to run this locally.
- NOTE: You need to install Azure Functions Core Tools v4
- This can be done on mac using the following brew commands:
brew tap azure/functions brew install azure-functions-core-tools@4
- Or on windows using Azure Tools. Installation might need system restart.
- This can be done on mac using the following brew commands:
- Modify
sample.local.settings.json
to belocal.settings.json
in db-layer/DbAccessor and update the values to the following:
"DB_CONNECTION_STRING": "Server=\"test-data.mysql.database.azure.com\"; port=\"3306\";UserID=\"testadmin\";Password=\"Dbsofteng2\";Database=\"go-ride-share\";"
- In terminal navigate to
db-layer/DbAccessor/
then runfunc start -p 7073
Warning
Non containerized method is deprecated for AccountManager. Please use containerized steps to run this locally.
- Open logic-layer repo and navigate to AccountManager directory.
- Rename file
sample.local.settings.json
tolocal.settings.json
- In terminal, navigate to directory
logic-layer/AccountManager/
then runfunc start -p 7071
Warning
Non containerized method is deprecated for Logic layer. Please use containerized steps to run this locally.
- Open logic-layer repo, in terminal navigate to
logic-layer/Logic/
then runfunc start -p 7072
- run
npm install
to install all dependancies - In
.env
add:
REACT_APP_API_AUTH_URL=http://localhost:7071/api
REACT_APP_API_BASE_URL=http://localhost:7072/api
npm start
- The website will open in your browser
-
Requirement: Ensure you have launched an Android emulator or connected a physical device
-
Option 1: Start the emulator from command line (see installation instructions)
You can run
flutter emulators
to see a list of available emulators, then runflutter emulators --launch <emulator_name>
to start an emulator.OR, neat VSCode trick: CTRL+SHIFT+P, type "Select Devices" and select the emulator you want to launch.
-
Option 2: Launch Android studio and use its existing emulator.
In device manager, click green "Play" button to start an emulator (tip: if this doesn’t work, try cold booting).
If you do not have Android studio installed, see installation instructions.
-
-
Install Flutter on your machine
- MacOS: Use Homebrew in terminal, run
brew install --cask flutter
- Windows: installation instructions
- MacOS: Use Homebrew in terminal, run
-
Open the repo, uncomment the following lines in
mobile-client/lib/constants.dart
to run the app locally. Be sure to comment out the same variables below in the file to prevent errors:
// UNCOMMENT THE FOLLOWING 2 LINES TO USE LOCALHOST
static const String API_AUTH_URL = "http://localhost:7071/api";
static const String API_BASE_URL = "http://localhost:7072/api";
- Then navigate to root directory
mobile-client
and runflutter run
This diagram explains how the system handles user authentication, and how access to the logic and database is given to the user.