Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updated setup instructions to use MongoDB Atlas
  • Loading branch information
Anjula Karunarathne authored and ThatUdeshUK committed Feb 22, 2020
1 parent 7f8721c commit 73f85c5
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![License](https://img.shields.io/badge/API-16%2B-green.svg)](https://android-arsenal.com/api?level=16)

LabelLab is an image analyzing and classification platform. The application should allow users to upload batches of images and classify them with labels. It will also have the features to run classifications against a trained model. LabelLab also has a user project management component as well as an image analyzing component.
LabelLab is an image analyzing and classification platform. It allows users to upload batches of images and classify them with labels. It also has the features to run classifications against a trained model. LabelLab also has a user project management component as well as an image analyzing component.

#### Apache 2.0 Licence

Apache 2.0. See the [LICENSE](https://github.com/scorelab/LabelLab/blob/master/LICENSE) file for details.
See the [LICENSE](https://github.com/scorelab/LabelLab/blob/master/LICENSE) file for details.

## User Guide

Expand All @@ -17,18 +17,18 @@ Clone the repository.

`git clone https://github.com/scorelab/Labellab.git`

#### Set up react server
#### Set up React server

Run npm install in labellab-client folder.
Run `npm install` in `labellab-client` folder.

```
cd labellab-client/
npm install
```

#### Set up MongoDB Backend
#### Set up MongoDB backend

Run npm install in labellab-server folder.
Run `npm install` in `labellab-server` folder.

```
cd labellab-server/
Expand All @@ -37,20 +37,31 @@ Run npm install in labellab-server folder.

#### How to Use

First you need to create a `.env` file in both labellab-server folder and labellab-client folder and fill it with the template provided in the file `.env.example` which is present in both the folders.<br/> <br/>
For client side `.env` file:
First you need to create a `.env` file in both `labellab-server` folder and `labellab-client` folder following the template provided in the file `.env.example` which is present in both the folders.<br/> <br/>

For client-side `.env` file:
```
REACT_APP_HOST=localhost
REACT_APP_SERVER_ENVIORNMENT=dev
REACT_APP_SERVER_PORT=4000
```
For server side `.env` file:

For server-side `.env` file:
```
HOST=localhost
PORT=4000
```
`JWT_SECRET` can be any word your choice. For the next 5 fields visit `mlab.com` and create a MongoDB database and find a URI of your database and fill the values accordingly.<br/><br/>
Both the front-end and the back-end can be run from the __labellab-server__ folder using the terminal:
`JWT_SECRET` can be any word your choice.

To create a free MongoDB Atlas cloud database, follow the guide at [https://docs.atlas.mongodb.com/getting-started/](https://docs.atlas.mongodb.com/getting-started/). After setting up, find the conection string to your database. It should look like this:
```
{{DB_HOST}}://{{DB_USERNAME}}:{{DB_PASSWORD}}@{{DB_CLUSTER}}/{{DB_NAME}}
```
You should fill in these values in their relevent fields in the `.env` file.

> **NOTE**: Your IP address may change if you've been disconnected from the internet and reconnected. If that happens, it means that your internet connection doesn't have a static IP. You may no longer be able to access the database if you've whitelisted only your previous IP address. You can allow access from any IP address from the Atlas control panel to overcome this issue.
Both the front-end and the back-end can be run from the `labellab-server` folder using the terminal:

1. To run both the client and server with a single command, run the following:
`$ npm run dev`
Expand All @@ -66,39 +77,38 @@ Both the front-end and the back-end can be run from the __labellab-server__ fold

> **NOTE**: Before starting the server create a file named `.env` same as `.env.example` and add your **OAUTH** and **DATABASE** credentials in the file.
And use [localhost:3000](https://) to browse.
To enable ForgotPassword feature allow Less Secure App Access to your Gmail account.
Visit [localhost:3000](http://localhost:3000) to browse.

> **NOTE**: This version is only supporting for Chrome and Firefox browser. And make sure to instal the extension -> Redux Dev Tools in chrome extension library.
> **NOTE**: This version only supports Google Chrome and Mozilla Firefox browsers. Make sure to instal the extension [Redux Dev Tools](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd) if you're using Google Chrome.
#### How to Use (Mobile)
Run the Node server in the labellab-server directory (if not already done):
Run the Node server in the `labellab-server` directory (if not already done):

`npm start`

In a new terminal navigate to `labellab_mobile` directory.

Configure the `lib/config.dart` using the format provided in `lib/config_example.dart`.
<br><br>
Application needs `google-services.json` issue from firebase to run google sign in option.To obtain the file,
The application needs `google-services.json` file issued from Firebase to operate Google Sign in option. To obtain this file,

1. Sign in to https://console.firebase.google.com/.
2. Click **Add Project** and necessary information about the project.
3. Agree to the terms and click **Create Project**.
4. After creating the project, click **Add Firebase to your android app**.
5. Go to project location and open `android/app/src/main/AndroidManifest.xml`.Copy the package name(**org.scorelab.labellab_mobile**) and paste in the package name field
5. Go to project location and open `android/app/src/main/AndroidManifest.xml`. Copy the package name(**org.scorelab.labellab_mobile**) and paste in the package name field
6. Get the **SHA1 fingerprint** by following the instruction and paste it in the SHA1 fingerprint field.
7. click next and download the `google-services.json`.
8. paste the file in location `android/app/` folder.
7. Click next and download the `google-services.json`.
8. Paste the file in location `android/app/` folder.

Build flutter the application
Build the Flutter application,

`flutter build apk`

> **NOTE**: Use 'ios' instead of 'apk' to build for iOS
> **NOTE**: Use 'ios' instead of 'apk' to build for iOS.
or run the flutter application
or run the Flutter application.

`flutter run`

> **NOTE**: A device with USB debugging enabled or virtual device is required
> **NOTE**: A device with USB debugging enabled or virtual device is required.

0 comments on commit 73f85c5

Please sign in to comment.