Skip to content

Olindo09/Food-Clearance-Ecom-MySQL-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ Food Clearance – Save Food, Save Money, Save the Planet 🌍

The Story Behind the Project

Every day, tons of perfectly edible food goes to waste simply because it’s close to its expiry date. Grocery stores and restaurants often struggle to manage this inventory, while people in the community are searching for affordable meals.

Food Clearance was born from that challenge:
πŸ‘‰ A platform where businesses can upload their soon-to-expire food,
πŸ‘‰ Customers can discover discounts, and
πŸ‘‰ Admins can oversee the entire ecosystem to make sure it’s fair and transparent.

It’s more than just software β€” it’s an effort to reduce waste, cut costs, and make food accessible.


πŸš€ Features

  • Customers: browse discounted food, search by expiry/category, add to cart
  • Companies: upload food items, manage inventory, track transactions
  • Admins: manage users, foods, companies, transactions, reports
  • Reports: track expired vs sold items, generate audits

πŸ—οΈ Project Structure

Food-Clearance-Ecom-MySQL-database/
β”œβ”€ app/ # Controllers, Models, Middleware
β”œβ”€ bootstrap/ # Laravel bootstrap files
β”œβ”€ config/ # Configuration (auth, DB, mail, etc.)
β”œβ”€ database/ # Migrations & Seeders
β”œβ”€ public/ # Frontend entry (index.php, assets)
β”œβ”€ resources/ # Views (Blade templates), JS, CSS
β”œβ”€ routes/ # Web & API routes
β”œβ”€ storage/ # Logs, cache, uploads
β”œβ”€ tests/ # PHPUnit tests
β”œβ”€ artisan # Laravel CLI
β”œβ”€ composer.json # PHP dependencies
β”œβ”€ package.json # JS dependencies
└─ .env.example # Example environment variables


πŸ“Œ Key Routes

  • / β†’ Home page
  • /home β†’ Authenticated landing
  • Admin: /admin/users, /admin/foods, /admin/companies, /admin/transactions, /admin/reports
  • Company: /company/foods, /company/transactions, /company/companies
  • Customer: /cart, /search

πŸ› οΈ Tech Stack

  • Backend: Laravel (PHP 8+)
  • Frontend: Blade, Bootstrap, Mix (Webpack)
  • Database: MySQL
  • Auth: Multi-role (Admin, Company, Customer)
  • Testing: PHPUnit
  • Packages: Composer, NPM

πŸ§‘β€πŸ’» SQL & Data Skills Showcase

  • Schema Design: Users, Foods, Companies, Transactions, Reports
  • Joins & Queries: insights on discounts, sales, waste
  • Stored Procedures / Views: reusable logic for reporting
  • Transaction Logs: ensure atomic sales

Example SQL:
SELECT c.name AS company_name,
COUNT(CASE WHEN f.status = 'expired' THEN 1 END) * 100.0 / COUNT(*) AS expired_pct
FROM foods f
JOIN companies c ON f.company_id = c.id
GROUP BY c.name;


🏭 ETL, Warehousing & Analytics

  • ETL: extract sales data, transform discounts/expiry, load into warehouse
  • Warehouse: fact (transactions), dimensions (company, food, time, location)
  • Analytics: dashboards for saved vs wasted food, revenue recovery, adoption rate
  • Predictive: forecast unsold categories, recommend discounts by expiry

βš™οΈ Installation

git clone https://github.com//Food-Clearance-Ecom-MySQL-database.git
cd Food-Clearance-Ecom-MySQL-database
composer install
npm install && npm run dev
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
php artisan serve

Visit: http://localhost:8000


🎯 Usage Flow

  1. Admin sets up companies
  2. Companies upload expiring food
  3. Customers browse & buy
  4. Transactions logged β†’ Reports generated
  5. ETL β†’ Warehouse β†’ Analytics dashboards

🌱 Roadmap

  • Mobile app (Flutter/React Native)
  • AI-powered discount engine
  • Notifications for new deals
  • Multi-language & multi-currency
  • Delivery service integration
  • Automated pipelines (Airflow/dbt)

❀️ Mission

This project isn’t just about code β€” it’s about impact.
By making food redistribution efficient and accessible, we aim to cut waste, feed more people, and support businesses.

"Save food, save money, save the planet." 🌍✨

About

Food Clearance is a Laravel (PHP) web application with a MySQL database, built using Blade templates, Bootstrap, Composer, and NPM. It helps reduce food waste by allowing companies to upload near-expiry food, customers to buy at discounts, and admins to manage users, reports, and transactions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors