VFMCS / web-app

This is the repository for webapp
MIT License
1 stars 2 forks source link

FarmFresh (previously Virtual Farmers Market)

About the Project

FarmFresh is a Web Application to allow farmers to post fresh produce they have recently harvested to be purchased by consumers online. We hope that this product gives consumers a platform to purchase directly from farmers, as opposed to having to purchase from a large-chain grocery store. With this in mind, we anticipate that this will allow our customers to get better quality produce that is in season, build relationships with local farmers, and get a better picture of where and how their food is produced.

For this project, our frontend is coded in ReactJS, our backend is coded in NodeJS, our database has been made using PostgreSQL, and our server is hosted on Google Cloud Platform.

Installation

Our frontend is dependent upon ReactJS and its libraries. Therefore, you will need to install npm and run the following commands once you have cloned the repository and navigated to the web-app directory. Our backend is dependent upon NodeJS and some of its libraries. Click this link for more information on how to install npm. Once you have npm installed, go to the web-app directory and run the following command:

npm install

Once all dependencies are installed, run the following command to start both the server and front end locally:

npm start

We use concurrently to build and run both the client and the server using a single command (npm start). For more information about the commands that run under the hood, check out the package.json file under scripts.

Open http://localhost:3000 to view it in your browser.

We recommend using Google Chrome as the Inspect Element feature makes development smoother (easier to view console, network data, etc)

It is also possible to run only the React frontend application locally, without the server or database. More information about how to run the frontend application locally (without the server) can be found in the README in the vfm-react-app directory.

All dependencies necessary for running this application can be found within the package.json file.

Our server is hosted on Google Cloud Platform and is available at vfmcs.com

Bug Tracking

Bug tracking will be done with the Github Issues section of this repository. There are both Bug Templates and Feature Templates for our developers to document bugs and features requests as they are necessary.

Database Access

Access Database from Local psql Client with Cloud SQL Proxy (recommended)

This method requires the google account being used to access the database be given permissions ahead of time.

You should now be connected and able to query the database. An example query:

This returns users that are vendors.

Access Database with Google Cloud Console

This method is for developers with access to the Cloud Console.

Access Database from Local psql Client without Cloud SQL Proxy

Our database is built with PostgreSQL. PostgreSQL can be installed here. Once installed, run the command:

Enter 'guestpass' when prompted for the password. You should now be connected and able to query the database.