Skip to content

vsingh2201/2311-Project-Team1

Repository files navigation

Farmers Hub App

An app that allows farmers to connect with customers. Farmers can upload Produce or Machine Listings to the App. Customers can browse through the lisings and buy items directly from farmers.

Run Locally

Clone the project

  git clone https://github.com/vsingh2201/2311-Project-Team1.git

Go to the project directory

  cd 2311-Project-Team1

Build the Project

  ./gradlew build

Run the Project

  ./gradlew run

Setting up Database

You can either use the Mock database or the Local Postgres Database.

To set up the database, go to the DB config.java file at the following location:

<your_project_dir>/app/src/main/java/statics/DbConfig.java

To use Mock Database, set IS_MOCK boolean variable to true. App Screenshot

To use Local Postgres Database, set IS_MOCK boolean variable to false. App Screenshot Set the name of your local database to farmerhub.
Set DB_USER to the username for your localhost postgres database.
Set DB_PASSWORD to the password for your localhost postgres database.

Running Tests

To run Junit tests, run the following command

  ./gradlew test

Test Results for Junit tests are available in the following directory:

<your_project_dir>/app/my-reports/tests/test/index.html

Open the index.html in a web browser to see Junit Test Results.

To run Integration test, run the following command

  ./gradlew integrationTest

Test Results for Integration tests are available in the following directory:

<your_project_dir>/app/my-reports/tests/integrationTest/index.html

Debugging

To debug the app, set up a new debug configuration in Eclipse IDE as shown in the image below. App Screenshot

Put a breakpoint in the code and then run the gradle debug task.

    ./gradlew debug

Screenshots

Login and Registration Page

App Screenshot

Farmer Landing Page and Customer Landing Page

App Screenshot

Junit Test Report (generated by Gradle)

App Screenshot

Integration Test Report (generated by Gradle)

App Screenshot