GithubHelp home page GithubHelp logo

giantspacemonster / farmhousefresh.com Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 20.66 MB

https://giantspacemonster.github.io/farmhousefresh.com/

CSS 32.05% HTML 15.03% JavaScript 3.57% PHP 49.35%
college-project e-commerce

farmhousefresh.com's Introduction

farmhousefresh.com

visit here for the static home page(just to get a feel of what it looks like): https://giantspacemonster.github.io/farmhousefresh.com/

Welcome to the college project on a e-commercial site built on html,js,css,php,psql and runs on an apache2 server.

Setting up a local copy of the website

Dependencies:
  • php 7.2
  • psql 10.14
  • Server Version: Apache/2.4.29
Ubuntu Installation Guide:
We use the LAPP(Linux, Apache, PostgreSQL, PHP) stack to develope the website. We start by installing the dependent sofwares
  1. Install Apache Server
    sudo apt update
    sudo apt install apache2
  2. By default, Apache comes with a basic site enabled. We can modify its content in /var/www/html
    Start by creating a directory in /var/www/college-project/.
    Inside of the directory created, clone this project:
    sudo git clone https://github.com/giantspacemonster/farmhousefresh.com.git
    Or
    gh repo clone giantspacemonster/farmhousefresh.com

    Create a Virtual host in apache2, enable the college-project site, and (optional) disable default apache site. Use the following tutorial to do so: https://ubuntu.com/tutorials/install-and-configure-apache#3-creating-your-own-website

  3. Install PostgreSQL
    sudo apt install postgresql postgresql-contrib
    1. Start PostgreSQL as root user #postgres. sudo psql -U postgres
    2. Create new user CREATE USER username WITH LOGIN PASSWORD'secretpassword'; Also set the user as superuser:
      ALTER USER username WITH SUPERUSER;
    3. Create new Database Also set the owner to the created username:
      CREATE DATABASE databasename WITH OWNER=username;
      Note that the username used in the project is farmhousefreshdb and the database used is farmhousefreshdb and the password used is 'secretpassword'
    4. Create the tables required
      Table reg:
      CREATE TABLE public.reg
      (
      first_name character varying(40),
      last_name character varying(40),
      gen character varying(10),
      dob timestamp without time zone,
      addr character varying(150),
      email character varying(40),
      password character varying(30),
      mno bigint,
      CONSTRAINT reg_email_key UNIQUE (email),
      CONSTRAINT reg_mno_key UNIQUE (mno),
      CONSTRAINT reg_password_key UNIQUE (password)
      )
      WITH ( OIDS=FALSE ); ALTER TABLE public.reg OWNER TO farmhousefreshdb;
      Table login:
      CREATE TABLE public.login ( email character varying(40), password character varying(30), CONSTRAINT login_email_fkey FOREIGN KEY (email) REFERENCES public.reg (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT login_password_fkey FOREIGN KEY (password) REFERENCES public.reg (password) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL ) WITH ( OIDS=FALSE ); ALTER TABLE public.login OWNER TO farmhousefreshdb;
      Table Cart: CREATE TABLE public.cart ( sr_no integer NOT NULL DEFAULT nextval('cart_sr_no_seq'::regclass), productname character varying(40), quantity integer, price integer, CONSTRAINT cart_pkey PRIMARY KEY (sr_no) ) WITH ( OIDS=FALSE ); ALTER TABLE public.cart OWNER TO farmhousefreshdb;
      Table feedback:
      CREATE TABLE public.feedback ( mno bigint, message character varying(250), email character varying(40), CONSTRAINT feedback_email_fkey FOREIGN KEY (email) REFERENCES public.reg (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT feedback_mno_fkey FOREIGN KEY (mno) REFERENCES public.reg (mno) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITH ( OIDS=FALSE ); ALTER TABLE public.feedback OWNER TO farmhousefreshdb;

farmhousefresh.com's People

Contributors

giantspacemonster avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.