/Food-Portal

Excessive food listing portal for avoiding food wastage

Primary LanguageSCSS

Food-Portal

About

The goal of this project is to create an excessive food listing portal for avoiding food wastage.

People can list the availability of excessive food on the website.

Needed people or organizations can log into the website to get the food for old age homes, orphanages or needy ones

This project was made for hackinUTU hackathon.

Getting Started

Prerequisites

Installing

Get the project up and running locally in just 3 easy steps.

  1. Clone the repo with HTTPS, using your local terminal to a preferred location, and cd into the project.
git clone https://github.com/hackinutu-CAVE/Food-Portal.git
cd Food-Portal
  1. Run docker-compose
docker-compose up -d

Website Home page will be at localhost:8080

phpMyAdmin page will be at localhost:5000

  1. Visit phpMyAdmin page and create database named 'food-portal'

  2. If you are accessing the database through mysql command line interface then use the command :

mysql -h 127.0.0.1 -P 3406 -u root -p

and then enter the password

  1. Create table markers for donor's details :
CREATE TABLE markers (
  mid INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  food_name VARCHAR( 30 ) NOT NULL ,
  donor_name VARCHAR( 50 ) NOT NULL ,
  address VARCHAR( 80 ) NOT NULL ,
  lat FLOAT( 10, 6 ) NOT NULL ,
  lng FLOAT( 10, 6 ) NOT NULL
)

ALTER TABLE `markers` ADD `donor_email` VARCHAR(50) NOT NULL AFTER `donor_name`,
   ADD `date` VARCHAR(20) NOT NULL AFTER `address`,
   ADD `time` VARCHAR(10) NOT NULL AFTER `date`,
   ADD `food_expiry_date` VARCHAR(20) NOT NULL AFTER `time`,
   ADD `food_expiry_time` VARCHAR(10) NOT NULL AFTER `food_expiry_date`,

CREATE TABLE contact(
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(50) NOT NULL,
    email VARCHAR(20) NOT NULL,
    message VARCHAR(300) NOT NULL
)

That's it.

To solve blank screen error:

  1. Delete vendor/composer folder and vendor/autoload.php file

  2. Run bash inside container

docker exec -it foodportal bash
  1. Install composer
php composer install

Exit container using Ctrl + D

Built With

  • php:7.4.3-apache - This image contains Debian's Apache httpd in conjunction with PHP (as mod_php) and uses mpm_prefork by default

  • mysql:8.0.19 - MySQL is a open-source relational database management system (RDBMS)

  • phpmyadmin:5.0.1 - A web interface for MySQL and MariaDB