An open API service indexing awesome lists of open source software.

https://github.com/sanjidtalukder/share-the-meal

Share The Meal is a full-stack MERN application designed to reduce food waste by connecting Restaurants, Charities, and Users
https://github.com/sanjidtalukder/share-the-meal

lottie-animation mern-stack react tailwindcss

Last synced: about 2 months ago
JSON representation

Share The Meal is a full-stack MERN application designed to reduce food waste by connecting Restaurants, Charities, and Users

Awesome Lists containing this project

README

          

# 🍽️ Share The Meal

**Share The Meal ** is a full-stack MERN application designed to reduce food waste by connecting **Restaurants**, **Charities**, and **Users**. Restaurants can donate surplus food, charities can request and pick it up, and users can browse and save food listings. Admins have full control over donations, users, roles, transactions, and more.

πŸ” All sensitive operations are secured using **JWT Authentication**, and **Stripe** is used to handle secure payments for Charity role requests.

---

## πŸ”— Live Website

🌐 **Live Site**: [https://share-the-meal-fde40.web.app/](https://share-the-meal-fde40.web.app/)

## 🍴 User Credentials

- **Email**: `your_Email_id@gmail.com`
- **Password**: `1Aa...`

---

---

## πŸ› οΈ Admin Credentials

- **Email**: `sakib789@gmail.com`
- **Password**: `123San`

---

---

## βœ… Charity Credentials

- **Email**: `kabir34@gmail.com`
- **Password**: `123San`

---

## βœ… Restaurant Credentials

- **Email**: `sanrize@gmail.com`
- **Password**: `123San`

---

---

## πŸš€ Key Features

1. πŸ” Secure authentication with Email/Password and Google Login.
2. πŸ’³ Stripe payment integration for Charity role requests.
3. 🍱 Restaurants can add, edit, and delete food donations.
4. 🎯 Charities can request, confirm pickup, and review donations.
5. ❀️ Users can save donations to Favorites and add Reviews.
6. 🧾 Admin Dashboard to manage users, donations, roles, and transactions.
7. πŸ“Š Donation analytics using Recharts.
8. 🌐 Mapbox integration for visualizing donation locations.
9. πŸ” Search and sort donations by location, quantity, and time.
10. πŸ”” SweetAlert2 and React Toastify used for all user notifications.

---

## πŸ–ΌοΈ Pages Overview

### Public Routes
- `/` β€” Home (Banner, Featured Donations, Stats, Community Stories)
- `/login` β€” Login/Register (with social login)
- `*` β€” 404 Not Found Page

### Protected Routes
- `/alldonations` β€” Verified donations with filters
- `/donation/:id` β€” Donation Details with request and review options
- `/dashboard` β€” Role-based dashboard (User, Charity, Restaurant, Admin)

---

## πŸ“‚ Project Structure

client/

β”‚
β”œβ”€β”€ src/

β”‚ β”œβ”€β”€ components/ # Navbar, cards, buttons, modals, etc.

β”‚ β”œβ”€β”€ layouts/ # Page layout files (MainLayout, DashboardLayout)

β”‚ β”œβ”€β”€ pages/ # All main page components

β”‚ β”œβ”€β”€ routes/ # Protected and role-based route logic

β”‚ β”œβ”€β”€ context/ # Authentication and TanStack Query providers

β”‚ β”œβ”€β”€ hooks/ # Custom hooks (e.g., useAuth, useAxiosSecure)

β”‚ β”œβ”€β”€ services/ # API services (Axios instance)

β”‚ β”œβ”€β”€ utils/ # Utility/helper functions

β”‚ └── App.jsx # Main entry point
β”‚
β”œβ”€β”€ .env # Environment variables (API URL, Stripe Key)

β”œβ”€β”€ README.md # This file

└── ...

---

## βš™οΈ Tech Stack

- **React.js (Vite)**
- **Tailwind CSS + DaisyUI** β€” UI styling
- **Firebase** β€” Authentication (Email & Google)
- **React Hook Form** β€” Form validation and handling
- **Tanstack React Query** β€” Data fetching and mutation
- **SweetAlert2 + React Toastify** β€” Alerts and toasts
- **Stripe Checkout** β€” Secure payments
- **Mapbox** β€” Location mapping
- **JWT** β€” Secure route protection
- **Recharts** β€” Charts and statistics

---

## πŸ” Authentication & Security

- JWT tokens are stored in `localStorage`.
- Custom Axios interceptor handles expired or unauthorized tokens.
- Firebase’s `onAuthStateChanged()` maintains session persistence across reloads.

---

## πŸ’‘ Unique Functionalities

- ♻️ Real-world food donation workflow simulation.
- ⭐ Admin can feature verified donations on Home Page.
- πŸ’Έ Payment history and transaction tracking via Stripe.
- 🌍 Filter donations based on city, zip code, or pickup time.
- 🧾 Role-based dashboards for each type of user.

---

## πŸ§ͺ Development Summary

- βœ… 20+ meaningful commits on the client-side
- βœ… Complete CRUD operations for all user roles
- βœ… Fully responsive across all devices
- βœ… Tested thoroughly with all demo accounts

---

πŸ‘€ Author

Sanjid Talukder

πŸŽ“ CSE Student, Dhaka International University

πŸ’Ό Junior Web Developer

πŸ“ Dhaka, Bangladesh

πŸ“§ Email: sanjidtalukder02@gmail.com