Connecting surplus food with those in need! π
- About the Project
- Getting Started
- Usage
- API Documentation
- Deployment
- Contributing
- License
- Contact
- Acknowledgments
SharePlate is a platform designed to reduce food waste by connecting restaurants with surplus food to NGOs and individuals who can utilize it. The platform focuses on real-time food listing, reservation management, and location-based search to ensure no food goes to waste.
- User Authentication: Secure login and registration with JWT tokens π
- Food Listings: Restaurants can create and manage food listings π
- Reservation System: NGOs/Individuals can reserve available food π
- Real-time Analytics: Charts and statistics for admin dashboard π
- Location-based Search: Google Maps integration for finding nearby listings πΊοΈ
- Image Upload: Cloudflare R2 integration for food listing photos πΈ
- Responsive Design: Mobile-friendly interface π±
- User Roles: Three user types (Restaurant, NGO/Individual, Admin) π₯
- React.js
- React Router
- Chart.js
- Google Maps API
- Framer Motion
- Notistack (Snackbars)
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT Authentication
- Nodemailer (OTP)
- Vercel (Deployment)
- Cloudflare R2 (Image Storage)
- MongoDB Atlas (Database)
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher)
- MongoDB Atlas account
- Google Maps API key
- Cloudflare R2 credentials
-
Clone the repositories:
git clone https://github.com/Shripad735/shareplate-frontend.git git clone https://github.com/Shripad735/shareplate-backend.git
-
Install dependencies:
- For Frontend:
cd shareplate-frontend npm install
- For Backend:
cd shareplate-backend npm install
- For Frontend:
-
Set up environment variables:
- Create
.env
files in bothshareplate-frontend
andshareplate-backend
directories. - Add the required environment variables (refer to the respective
.env.example
files).
- Create
-
Start the backend server:
cd shareplate-backend npm start
-
Start the frontend development server:
cd shareplate-frontend npm start
-
Open your browser and navigate to
http://localhost:3000
.
-
Restaurants:
- Create and manage food listings
- View reservations
- Manage active listings
- View statistics
-
NGOs/Individuals:
- Browse available food listings
- Make reservations
- Track pickup status
- View nearby listings on map
-
Admin:
- Manage all users
- View platform statistics
- Monitor all listings and reservations
The backend API follows RESTful principles and includes the following main endpoints:
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginPOST /api/auth/forgot-password
- Password reset initiationPOST /api/auth/validate-otp
- OTP validationPOST /api/auth/reset-password
- Password reset
GET /api/food-listings
- Get all listingsPOST /api/food-listings
- Create new listingPUT /api/food-listings/:id
- Update listingDELETE /api/food-listings/:id
- Delete listing
POST /api/reservations
- Create reservationGET /api/reservations
- Get all reservationsPUT /api/reservations/:id/pickup
- Mark reservation as picked upDELETE /api/reservations/:id
- Cancel reservation
GET /api/stats
- Get platform statistics
The project is deployed on Vercel with the following configuration:
-
Backend Deployment:
- Uses
vercel.json
configuration - Environment variables set in Vercel dashboard
- Automatic deployments from main branch
- Uses
-
Frontend Deployment:
- Separate Vercel project
- Environment variables for API endpoints
- Automatic deployments from main branch
Contributions are welcome! Please follow these steps:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please make sure to update tests as appropriate and follow the code style guidelines.
Distributed under the MIT License. See LICENSE
for more information.
Shripad Deshmukh
- Email: [email protected]
- GitHub: Shripad735
- LinkedIn: Shripad Khandare
- Vercel for hosting
- Cloudflare R2 for image storage
- Google Maps API for location-based features
- Chart.js for analytics
- Framer Motion for animations