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
- Host: GitHub
- URL: https://github.com/sanjidtalukder/share-the-meal
- Owner: sanjidtalukder
- Created: 2025-08-23T10:44:53.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-09-02T14:05:42.000Z (about 2 months ago)
- Last Synced: 2025-09-02T16:07:35.334Z (about 2 months ago)
- Topics: lottie-animation, mern-stack, react, tailwindcss
- Language: JavaScript
- Homepage: https://share-the-meal-fde40.web.app/
- Size: 185 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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