Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fresh Connect Logo

πŸ₯¬ Fresh Connect

A Complete Food Marketplace & Restaurant Management Ecosystem

Features β€’ Tech Stack β€’ Installation β€’ Usage β€’ API β€’ Contributing

React Node.js MongoDB Express TailwindCSS

License PRs Welcome Maintained BCA Sem 6


πŸ“‹ Table of Contents


🌟 About The Project

Fresh Connect is a comprehensive full-stack web application designed to bridge the gap between food sellers, restaurants, and consumers. This platform promotes sustainable food consumption by featuring urgent sales for near-expiry products and free food listings to reduce food waste.

🎯 Problem Statement

  • Food waste is a major global issue with millions of tons wasted annually
  • Small restaurants and sellers lack digital presence for reaching customers
  • Consumers miss out on good deals due to lack of a unified platform
  • No proper system exists for managing leftover food distribution

πŸ’‘ Our Solution

Fresh Connect provides a unified ecosystem where:

  • Restaurants can manage their operations, menus, and reduce food waste
  • Sellers can list products with special urgent sales features
  • Consumers can discover deals, track orders, and access free food listings
  • Admins can oversee the entire platform efficiently

πŸš€ Key Features

πŸ‘€ Customer Portal

Feature Description
πŸ” Authentication Secure JWT-based login/registration
πŸ›’ Shopping Cart Add, remove, and manage products
πŸ’ Wishlist Save favorite items for later
πŸ“ Order Tracking Real-time order status updates
πŸ’³ Payment Gateway Secure payment processing
πŸ” Product Search Advanced search with filters
⭐ Reviews & Ratings Rate and review products/restaurants
πŸ†“ Free Food Listings Access surplus food distributions
⚑ Urgent Sales Grab discounted near-expiry products
βœ… Verified Restaurants Browse trusted verified establishments

πŸͺ Seller Dashboard

Feature Description
πŸ“Š Analytics Dashboard Sales insights and statistics
πŸ“¦ Product Management Add, edit, categorize products
πŸ›οΈ Order Management Process and track orders
πŸ’° Payment Management View earnings and payment history
πŸ“ Review Management Respond to customer reviews
⚑ Urgent Sales Create time-sensitive deals
βœ… Verification System Get verified seller badge
πŸ“ž Support System Access customer support

🏨 Hotel Owner Portal

Feature Description
πŸ“ˆ Analytics Dashboard Comprehensive business analytics
🍽️ Menu Management Digital menu creation and updates
πŸ“¦ Inventory Management Track stock levels
πŸ‘₯ Staff Management Manage team members
πŸ›’ Order Management Handle incoming orders
πŸ• Leftover Food List surplus food for distribution
⚑ Urgent Sales Quick sale for excess inventory
πŸ’¬ Customer Feedback View and respond to feedback
πŸ“œ Purchase History Track all purchases
βœ… Verification Badge Display verified status

πŸ›‘οΈ Admin Panel

Feature Description
πŸ‘₯ User Management Manage all platform users
βœ… Hotel Verification Verify restaurant authenticity
βœ… Seller Verification Verify seller accounts
πŸ“‹ Order Monitoring Oversee all platform orders
πŸ’³ Payment Management Handle payment disputes
πŸ“Š Analytics Platform-wide statistics
πŸ“ Content Management Manage platform content
🚨 Complaint Handling Resolve user complaints
πŸ“„ Report Generation Generate business reports
βš™οΈ System Settings Configure platform settings

πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        FRESH CONNECT                             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   Customer   β”‚  β”‚    Seller    β”‚  β”‚ Hotel Owner  β”‚           β”‚
β”‚  β”‚   Portal     β”‚  β”‚   Dashboard  β”‚  β”‚   Portal     β”‚           β”‚
β”‚  β”‚  (React.js)  β”‚  β”‚  (React.js)  β”‚  β”‚  (React.js)  β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚         β”‚                 β”‚                 β”‚                    β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β”‚
β”‚                          β”‚                                       β”‚
β”‚                   β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”                               β”‚
β”‚                   β”‚   Admin      β”‚                               β”‚
β”‚                   β”‚   Panel      β”‚                               β”‚
β”‚                   β”‚  (React.js)  β”‚                               β”‚
β”‚                   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜                               β”‚
β”‚                          β”‚                                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                    REST API Layer                          β”‚ β”‚
β”‚  β”‚                   (Express.js + Node.js)                   β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚ β”‚
β”‚  β”‚  β”‚  Auth   β”‚ β”‚ Orders  β”‚ β”‚Products β”‚ β”‚   Analytics     β”‚  β”‚ β”‚
β”‚  β”‚  β”‚ Routes  β”‚ β”‚ Routes  β”‚ β”‚ Routes  β”‚ β”‚    Routes       β”‚  β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                           β”‚                                      β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚                    β”‚   MongoDB    β”‚                              β”‚
β”‚                    β”‚   Database   β”‚                              β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’» Tech Stack

Frontend

Technology Purpose
React UI Library
Vite Build Tool
TailwindCSS Styling
React Router Navigation
Axios HTTP Client
Chart.js Data Visualization

Backend

Technology Purpose
Node.js Runtime Environment
Express Web Framework
MongoDB Database
Mongoose ODM
JWT Authentication
Bcrypt Password Hashing

DevOps & Tools

Technology Purpose
Git Version Control
npm Package Manager
Postman API Testing
VS Code IDE

πŸ“ Project Structure

Fresh-Connect/
β”‚
β”œβ”€β”€ πŸ“‚ admin/                      # Admin Panel (React)
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/         # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/              # Admin pages
β”‚   β”‚   β”‚   β”œβ”€β”€ Analytics.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ComplaintHandling.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ContentManagement.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ HotelVerification.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ OrderMonitoring.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PaymentManagement.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ReportGeneration.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SellerVerification.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SystemSettings.jsx
β”‚   β”‚   β”‚   └── UserManagement.jsx
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ contexts/           # React Context providers
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ services/           # API services
β”‚   β”‚   └── πŸ“‚ api/                # API routes
β”‚   └── πŸ“„ package.json
β”‚
β”œβ”€β”€ πŸ“‚ Major-Project-main/         # Main Application
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ frontend/               # Customer & Seller Frontend (React + Vite)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ user/       # Customer pages
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ShoppingCart.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ OrderTracking.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PaymentGateway.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProductSearch.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UrgentSales.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ FreeFoodListings.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ seller/     # Seller pages
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Products.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Orders.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Analytics.jsx
β”‚   β”‚   β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”‚   β”‚   └── πŸ“‚ hotelOwner/ # Hotel owner pages
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ MenuManagement.jsx
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ Inventory.jsx
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ LeftoverFood.jsx
β”‚   β”‚   β”‚   β”‚       └── ...
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/     # Shared components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ context/        # State management
β”‚   β”‚   β”‚   └── πŸ“‚ utils/          # Utility functions
β”‚   β”‚   └── πŸ“„ package.json
β”‚   β”‚
β”‚   └── πŸ“‚ backend/                # Backend API (Node.js + Express)
β”‚       β”œβ”€β”€ πŸ“‚ controllers/        # Request handlers
β”‚       β”œβ”€β”€ πŸ“‚ models/             # MongoDB schemas
β”‚       β”œβ”€β”€ πŸ“‚ routes/             # API routes
β”‚       β”œβ”€β”€ πŸ“‚ middleware/         # Custom middleware
β”‚       β”œβ”€β”€ πŸ“‚ config/             # Configuration files
β”‚       β”œβ”€β”€ πŸ“‚ utils/              # Utility functions
β”‚       └── πŸ“„ package.json
β”‚
β”œβ”€β”€ πŸ“‚ database-data/              # Sample database data
β”œβ”€β”€ πŸ“„ README.md                   # This file
β”œβ”€β”€ πŸ“„ LICENSE                     # MIT License
β”œβ”€β”€ πŸ“„ CONTRIBUTING.md             # Contribution guidelines
└── πŸ“„ .gitignore                  # Git ignore rules

⚑ Installation

Prerequisites

Before you begin, ensure you have the following installed:

πŸ”§ Step-by-Step Setup

1️⃣ Clone the Repository

git clone https://github.com/VivekGhantiwala/Fresh-Connect.git
cd Fresh-Connect

2️⃣ Backend Setup

# Navigate to backend directory
cd Major-Project-main/backend

# Install dependencies
npm install

# Create environment file
cp .env.example .env

# Edit .env with your configurations
# MONGODB_URI=mongodb://localhost:27017/freshconnect
# JWT_SECRET=your_super_secret_key
# PORT=5001

# Start the backend server
npm run dev

3️⃣ Frontend Setup

# Open a new terminal
# Navigate to frontend directory
cd Major-Project-main/frontend

# Install dependencies
npm install

# Create environment file
echo "VITE_BASE_URL=http://localhost:5001/api" > .env

# Start the frontend development server
npm run dev

4️⃣ Admin Panel Setup

# Open a new terminal
# Navigate to admin directory
cd admin

# Install dependencies
npm install

# Start the admin panel
npm start

5️⃣ Seed Database (Optional)

cd Major-Project-main/backend
npm run seed

🌐 Access the Application

Portal URL
πŸ‘€ Customer Frontend http://localhost:5173
πŸ›‘οΈ Admin Panel http://localhost:3000
πŸ”Œ Backend API http://localhost:5001

πŸ“– Usage

Customer Flow

  1. Register/Login to the platform
  2. Browse Products or search for specific items
  3. Add to Cart and manage your shopping cart
  4. Checkout with secure payment
  5. Track Orders in real-time
  6. Rate & Review products/restaurants

Seller Flow

  1. Register as a seller
  2. Complete Verification for trust badge
  3. Add Products to your store
  4. Manage Orders and shipments
  5. View Analytics and grow your business

Hotel Owner Flow

  1. Register your restaurant
  2. Get Verified for authenticity badge
  3. Manage Menu items digitally
  4. Track Inventory and orders
  5. List Leftover Food to reduce waste

πŸ“š API Documentation

Authentication Endpoints

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login User login
GET /api/auth/profile Get user profile
PUT /api/auth/profile Update profile

Product Endpoints

Method Endpoint Description
GET /api/products Get all products
GET /api/products/:id Get single product
POST /api/products Create product
PUT /api/products/:id Update product
DELETE /api/products/:id Delete product

Order Endpoints

Method Endpoint Description
GET /api/orders Get user orders
POST /api/orders Create new order
GET /api/orders/:id Get order details
PUT /api/orders/:id/status Update order status
View All API Endpoints

Cart Endpoints

Method Endpoint Description
GET /api/cart Get user cart
POST /api/cart/add Add item to cart
DELETE /api/cart/:itemId Remove from cart

Hotel Endpoints

Method Endpoint Description
GET /api/hotels Get all hotels
GET /api/hotels/:id Get hotel details
POST /api/hotels Register hotel
GET /api/hotels/:id/menu Get hotel menu

Analytics Endpoints

Method Endpoint Description
GET /api/analytics/dashboard Dashboard stats
GET /api/analytics/sales Sales analytics
GET /api/analytics/orders Order analytics

πŸ“Έ Screenshots

Click to View Screenshots

🏠 Home Page

Customer landing page with featured products and restaurants

πŸ›’ Shopping Cart

Cart management with quantity controls

πŸ“Š Seller Dashboard

Analytics and order management for sellers

🍽️ Hotel Owner Dashboard

Comprehensive restaurant management interface

πŸ›‘οΈ Admin Panel

Platform administration and monitoring


πŸ—„οΈ Database Schema

User Collection

{
  _id: ObjectId,
  name: String,
  email: String,
  password: String (hashed),
  role: ['customer', 'seller', 'hotel_owner', 'admin'],
  isVerified: Boolean,
  createdAt: Date,
  updatedAt: Date
}

Product Collection

{
  _id: ObjectId,
  name: String,
  description: String,
  price: Number,
  category: String,
  seller: ObjectId (ref: User),
  images: [String],
  stock: Number,
  isUrgentSale: Boolean,
  urgentSaleDiscount: Number,
  createdAt: Date
}

Order Collection

{
  _id: ObjectId,
  customer: ObjectId (ref: User),
  items: [{
    product: ObjectId,
    quantity: Number,
    price: Number
  }],
  totalAmount: Number,
  status: ['pending', 'confirmed', 'shipped', 'delivered'],
  shippingAddress: Object,
  paymentStatus: String,
  createdAt: Date
}

🀝 Contributing

Contributions are what make the open source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.


πŸ“œ License

Distributed under the MIT License. See LICENSE for more information.


πŸ™ Acknowledgments


πŸ‘¨β€πŸ’» Author

BCA Semester 6 Major Project
Designed & Developed with passion

GitHub LinkedIn


⭐ Star this repository if you found it helpful! ⭐

About

πŸ₯¬ Fresh Connect - A comprehensive MERN stack food marketplace connecting farmers, sellers, hotels & consumers. Features real-time inventory, urgent sales, order tracking & admin dashboard. BCA Major Project.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages