Skip to content

electric-crouton/farmConnect

Repository files navigation

Farm Connect

Farm Connect is a marketplace application that allows small farmers to sell locally grown produce to the public at large. When farmer lists an item to sell, it becomes available for purchase, and users can buy directly from those farms.

Development Team

Table of Contents

  1. Installation
    1. PostgreSQL
  2. Requirements
  3. File Structure: Directory Layout
  4. Setup
    1. Installing Dependencies
  5. Usage
  6. Roadmap
  7. Contributing

##Installation

###PostgreSQL

PostgreSQL supports Mac OS X, Ubuntu, and Windows. To install postgres with Homebrew, run the following command from terminal or any command line interface:

brew install postgres

If using Mac OS X, install the Postgres App by following this link. On Mac, Postgres runs best if you run it using the app, as opposed to running it from the terminal.

Requirements

  • Node 4.4.4
  • PostgreSQL 9.5.3

File Structure: Directory Layout

client/                                     #client entry point, imports all client code
  app/                                      
    assets/
      css/
        style.css
      img/
        grass-field.jpg
        shopping-cart.png
    controllers/                            
      AddProductsCtrl.js                    #controls addition of products to the marketplace
      AuthCtrl.js                           #controls client side authentication
      CartCtrl.js                           #controls addition and removal for items in shopping cart
      CheckoutCtrl.js                       #controls payment functionality
      ProductsCtrl.js                       #controls item addition to cart
    views/                                  #entry point for all presentational components
      about.html                            #about page
      addProductForm.html                   #form for the addition of products to the marketplace
      cart.html                             #shopping cart summary page
      checkoutModal.html                    #payment pop up modal in checkout of cart summary page 
      navBar.html                           #navigation bar
      signin.html                           #sign in page
      signup.html                           #sign up page
    app.js                                  #initializes and loads all angular modules on clientside
    index.html                              
    routes.js                               #client side routing
    services.js                                                    
server/                                     #entry point for all server code
  auth/                                     #entry point for authentication control
    authController.js                       #controls authentication
  config/
    routes.js                               #server-side routing
    middlewares/                            
      initialization.js                     #initializes server connection with client
  db/                                       #entry point for database and connection
    connection.js                           #establishes connection between server and database
    postsData.js                            #dummy data for posts
    schema.sql                              #defines all tables and relations within the database
    seedDB.js                               #seeds the database with dummy data
  products/
    productsCollection.js                   #controls addition of products to the database
  server.js                                 #entry point file for running the server

Setup

Installing Dependencies

Clone this repo to your local work station and from within the root directory:

./install

This will install all the necessary dependencies in the client and serverside directories

To seed your database with dummy data, run:

node server/db/seedDB.js

Usage

Once the dependencies are installed, you can start the application with the following commands. Both the database and the server must be running properly in order for the app to run. First, within the postgres app:

psql < ABSOLUTE_PATH_ON_YOUR_MACHINE_TO_/Farm-Connect/server/db/schema.sql;

And then in a separate tab in your terminal, run this command in the root directory:

node server/server.js

Open your web browser and go to http://localhost:1337 to see the app running.

##Roadmap

View the project roadmap here

Contributing

See CONTRIBUTING.md for contribution guidelines.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published