JIIT CSE B.Tech 2nd Year β Data Structures Lab (PBL)
Department of Computer Science & Engineering and Information Technology
Jaypee Institute of Information Technology (JIIT), Noida Sector 62
Batch: B2 | Academic Year: 2026β2027
Faculty Mentors & Evaluators: Dr. Sherry Garg & Dr. Lalita Mishra
| Name | Enrollment Number | Role / Contributions |
|---|---|---|
| Pragya Ahlawat | 2501030121 |
UI/UX Design, Food Rescue Marketplace, Group Ordering Rooms |
| Ronak Jain | 2501030128 |
Algorithm Design, Graph Dijkstra, Heap Queues, Automated Test Harness |
| Rishabh Tyagi | 2501030130 |
Backend API Architecture, Doubly Linked List, LIFO Stack, Storage Engine |
| Shobhit Khatana | 2501030144 |
BST Menu Indexing, Segment Tree Decay, Bipartite Matching, Report Documentation |
Important
UNIVERSAL PASSWORD FOR ALL ACCOUNTS: password123
All 4 roles and all team member accounts are pre-loaded in the embedded database. On the Login Page, you can either click the 1-Click Autofill Buttons or log in manually with any email below.
| Team Member | Enrollment | Role / Portal | Login Email | Password |
|---|---|---|---|---|
| Ronak Jain | 2501030128 |
Platform Admin (/admin-dashboard) |
ronak@jiit.ac.in |
password123 |
| Pragya Ahlawat | 2501030121 |
Customer / Food Rescue (/) |
pragya@jiit.ac.in |
password123 |
| Rishabh Tyagi | 2501030130 |
Restaurant Owner (/restaurant-dashboard) |
rishabh@jiit.ac.in |
password123 |
| Shobhit Khatana | 2501030144 |
Delivery Partner (/delivery-dashboard) |
shobhit@jiit.ac.in |
password123 |
| Role | Portal / Destination | Password | What You Can Demo | |
|---|---|---|---|---|
| Customer | / (Home & Marketplace) |
customer@foodloop.com |
password123 |
Cart Undo/Redo, Food Rescue discount deals, Group order rooms (LOOP-XXXX), BST price filter |
| Restaurant Owner | /restaurant-dashboard |
greenbowl@foodloop.com |
password123 |
Live incoming kitchen FIFO queue, publishing surplus meals with Arrhenius decay pricing |
| Delivery Partner | /delivery-dashboard |
delivery@foodloop.com |
password123 |
Min-Heap priority queue assignment, live Dijkstra turn-by-turn routing with EV scooter |
| Platform Administrator | /admin-dashboard |
admin@foodloop.com |
password123 |
SDG 12 & SDG 9 analytics, orphanages & shelter emergency surplus dispatch via DSU & Bipartite Matching |
π Full 3-Minute Presentation Walkthrough & Model Viva Answers: See docs/PRESENTATION_CHEATSHEET.md
- Primary Goal β SDG 12: Responsible Consumption and Production:
- Prevents safe, prepared commercial food from ending up in municipal landfills via real-time Food Rescue discounting.
- Defaults to single-use plastic cutlery opt-out and 100% compostable sugarcane bagasse packaging with gamified Eco-Reward points.
- Secondary Goal β SDG 9: Industry, Innovation, and Infrastructure:
- Collaborative group ordering rooms (
LOOP-XXXX) consolidate multiple consumer orders into single low-carbon courier runs. - Multi-Modal Drone-to-EV delivery routing calculates lowest-emission transit corridors.
- Collaborative group ordering rooms (
- Humanitarian Impact β SDG 2: Zero Hunger:
- Automated emergency surplus dispatch routes unsold restaurant meals to orphanages and night shelters before expiration.
FoodLoop is a modern full-stack food delivery application that merges the smooth ordering experience of platforms like Zomato and Swiggy with environmental responsibility and rigorous Computer Science Data Structures & Algorithms.
Unlike standard delivery systems that discard surplus meals and send individual gas-powered motorbikes for every small order, FoodLoop integrates:
- A Food Rescue Marketplace where commercial kitchens list surplus meals at 50%β65% OFF.
- An Interactive DSA Lab Visualizer (
/dsa-lab) demonstrating 11 classical data structures and algorithmic models directly inside the web browser. - A Collaborative Group Order Hub with dynamic bill splitting (by items or equal split).
- 4 Role-Based Portals (Customer, Restaurant Owner, Delivery Partner, Administrator) with 1-click demo logins.
FoodLoop is configured for multi-cloud deployment with 1-click automated builds:
- Main Application:
https://594fc5b781cbca41-103-225-190-132.serveousercontent.com - Interactive DSA Visualizer:
https://594fc5b781cbca41-103-225-190-132.serveousercontent.com/dsa-lab - API Health Check:
https://594fc5b781cbca41-103-225-190-132.serveousercontent.com/api/health
FoodLoop includes a pre-configured render.yaml blueprint. Click below to deploy a permanent free cloud instance:
Manual Render Setup (60 Seconds):
- Go to Render Dashboard and click New β Web Service.
- Connect your GitHub repository:
https://github.com/Ronak1167/FoodLoop. - Configure settings:
- Environment:
Node - Build Command:
npm run render-build - Start Command:
npm start - Plan:
Free
- Environment:
- Click Deploy Web Service. Render will build the React frontend, start Express, and assign a permanent URL (e.g.
https://foodloop.onrender.com).
# Build the multi-stage production container
docker build -t foodloop .
# Run container on port 5000
docker run -d -p 5000:5000 --name foodloop-app foodloop- Connect
https://github.com/Ronak1167/FoodLoopto Railway or Koyeb. - Railway automatically detects the root
Dockerfileand deploys the full-stack container with SSL.
- Processor: Dual-Core 2.0 GHz or higher (Intel Core i3/i5/i7, AMD Ryzen, or Apple Silicon M-series).
- RAM: Minimum 4 GB (8 GB recommended).
- Disk Space: 500 MB free storage.
- Operating System: Windows 10/11, macOS, or Linux.
- Node.js: v18.0.0 or higher (v20+ recommended).
- npm: v9.0.0 or higher.
- Web Browser: Any modern browser (Google Chrome, Mozilla Firefox, Microsoft Edge, Safari).
FoodLoop includes an embedded resilient JSON storage engine in server/data/, meaning no MongoDB service or external database setup is required to run out of the box.
# 1. Clone the repository
git clone https://github.com/Ronak1167/FoodLoop.git
cd FoodLoop
# 2. Run the automated Data Structures Lab test suite (14/14 tests)
npm test
# 3. Start the unified application on port 5000
npm startOnce started, open your web browser and navigate to:
π http://localhost:5000
To jump straight into the Data Structures Lab Visualizer:
π http://localhost:5000/dsa-lab
If you wish to edit source code with live hot-reloading:
# Terminal 1 β Backend REST API (Port 5000):
cd server
npm start
# Terminal 2 β Frontend Vite Dev Server (Port 5173 with HMR):
cd client
npm run devOpen http://localhost:5173 for hot-reloading development.
FoodLoop includes a standalone automated test harness in server/test/dsa.test.js validating every data structure and algorithm:
npm test======================================================
FOODLOOP DATA STRUCTURES & OOP LAB TEST HARNESS
======================================================
--- 1. Road Network Graph (Adjacency List) ---
β PASS: Graph contains 16 sector nodes and bidirectional edges
--- 2. Dijkstra Shortest Path Algorithm ---
β PASS: Calculates valid shortest path between N1 and N7
--- 3. Min-Priority Queue (Binary Min-Heap) ---
β PASS: Maintains Min-Heap invariant across multiple inserts and extractions
--- 4. FIFO Queue & Urgency Queue ---
β PASS: FIFO queue enqueues and dequeues in exact chronological order
--- 5. Merge Sort (Divide & Conquer) ---
β PASS: Sorts restaurants by rating descending in O(N log N) time
--- 6. Binary Search vs Linear Search ---
β PASS: Binary search finds item in O(log N) while linear search takes O(N)
--- 7. Doubly Linked List (Order Status Lifecycle) ---
β PASS: Advances and reverts order stages via next and prev pointers in O(1)
--- 8. LIFO Stack (Cart Undo / Redo Engine) ---
β PASS: Stack records actions and performs rollback (Undo) and recovery (Redo) in O(1)
--- 9. Binary Search Tree (Menu Price Indexer) ---
β PASS: BST inserts nodes, performs in-order traversal and executes range query
--- 10. Object-Oriented Domain Hierarchy & Polymorphism ---
β PASS: Validates encapsulation, class inheritance and dynamic polymorphic method overrides
--- 11. Microbial Freshness Decay & Segment Tree ---
β PASS: Calculates Arrhenius microbial decay and executes Segment Tree range query in O(log N)
--- 12. Zero-Hunger Emergency Dispatch (DSU & Bipartite Matching) ---
β PASS: DSU clusters nodes and Bipartite Matching pairs kitchens to shelters
--- 13. Multi-Modal Drone-EV Relay Route Optimizer ---
β PASS: Computes multi-modal drone-locker-EV route and verifies carbon avoidance
--- 14. Eco-Nutrient Multi-Dimensional DP Knapsack ---
β PASS: Solves 0/1 knapsack maximizing protein within financial budget and carbon cap
======================================================
TEST SUMMARY: 14 PASSED, 0 FAILED (100% SUCCESS RATE)
======================================================
The application features instant 1-click role switcher buttons in the top navbar and login page:
| Role | Demo Email | Password | Key Features & Capabilities |
|---|---|---|---|
| Customer | customer@foodloop.com |
password123 |
Browse menus, buy surplus deals, cart with undo/redo stack, live order tracking, group ordering rooms, sustainability points. |
| Restaurant Owner | greenbowl@foodloop.com |
password123 |
Manage menu items, publish Food Rescue deals with countdown deadlines, update order preparation statuses, view revenue metrics. |
| Delivery Partner | delivery@foodloop.com |
password123 |
View assigned orders, road graph navigation, GPS waypoint simulation, step orders through lifecycle (Ready β Delivered). |
| Administrator | admin@foodloop.com |
password123 |
Platform GMV analytics, food rescue impact counter, approve/suspend restaurants, audit all transactions, category oversight. |
Located at http://localhost:5000/dsa-lab, this visualizer provides 11 interactive laboratory tabs specifically designed for university lab evaluation and viva examinations:
| # | Data Structure / Algorithm | Real-World FoodLoop Application | Time Complexity | Space Complexity |
|---|---|---|---|---|
| 1 | Graph (Adjacency List) | 16-node city road network model with weighted bidirectional edges | ||
| 2 | Dijkstra's Algorithm | Shortest path routing for EV couriers with priority queue relaxation | ||
| 3 | Doubly Linked List | 6-stage live order tracking with |
|
|
| 4 | LIFO Stack (Twin Stack) | Cart action Undo/Redo engine preventing accidental order losses |
|
|
| 5 | Binary Search Tree (BST) | Menu price indexing with sub-linear range queries |
|
|
| 6 | Binary Min-Heap | Urgency queue prioritizing surplus deals expiring soonest at root |
|
|
| 7 | Merge Sort | Stable divide-and-conquer restaurant catalog sorting by rating/time |
|
|
| 8 | Binary vs. Linear Search | Logarithmic search over sorted names vs. linear sequential search |
|
|
| 9 | OOP Architecture | Demonstrates private # encapsulation, inheritance, and polymorphism |
N/A | N/A |
| 10 | Segment Tree & Arrhenius Kinetics | Microbial spoilage decay modeling with dynamic asymptotic pricing |
|
|
| 11 | DSU & Bipartite Matching | Zero-Hunger emergency dispatch pairing surplus kitchens to shelters |
|
|
| 12 | Multi-Modal Relay DAG | Drone-to-EV courier handshake routing via smart solar lockers | ||
| 13 | DP 0/1 Knapsack | Multi-constraint meal synthesizer optimizing protein within budget & carbon |
These 4 innovations were engineered to address real-world problems unsolved by commercial food apps:
- Problem: Current apps treat food freshness as binary ("safe" vs "expired"). Edible food is dumped simply because a clock hits an arbitrary time.
-
Solution: Implements Arrhenius bacterial growth kinetics (
$k = A \cdot e^{-E_a/RT}$ ) estimating Colony Forming Units ($CFU/g$ ). FoodLoop uses an exponential asymptotic markdown curve:$$P(t) = P_{\text{floor}} + (P_{\text{base}} - P_{\text{floor}}) \cdot e^{-\lambda t}$$ ensuring meals are sold at decreasing prices before reaching critical thresholds. -
Data Structure: Segment Tree built over active batches for
$O(\log N)$ range queries.
- Problem: When surplus food enters the final 45 minutes before closing, commercial demand drops to zero, and kitchens dump food while nearby night shelters starve.
- Solution: Automatically transitions unsold surplus to Zero-Cost Emergency Humanitarian Dispatch.
-
Data Structure & Algorithm: Disjoint Set Union (DSU with Path Compression & Union by Rank) clusters local volunteer pods in near-constant
$O(\alpha(N))$ time, and Maximum-Weight Bipartite Graph Matching matches portions to shelter headcounts and dietary restrictions (e.g. pure veg).
-
Problem: Gas-powered delivery motorbikes generate 142g
$CO_2$ /km and get stuck in arterial traffic. -
Solution: Splits trips
$> 5\text{ km}$ into an express autonomous drone air corridor ($48\text{ km/h}$ , 0 street traffic), a smart solar locker automated carousel handshake, and last-mile EV scooter doorstep delivery. -
Data Structure: Multi-layer Directed Acyclic Graph (DAG) with synchronized transfer windows (
$|T_{\text{drone}} - T_{\text{courier}}| \le 2\text{ mins}$ ).
- Problem: Consumers have competing goals: staying within a financial budget, meeting protein targets, and minimizing environmental carbon footprints.
- Solution: Formulates meal selection as a Multi-Dimensional 0/1 Knapsack Problem solved via Dynamic Programming (DP) with memoization ($O(N \cdot B)$), constructing the optimal meal set on the Pareto frontier.
FoodLoop/
βββ client/ # React 18 Frontend
β βββ dist/ # Pre-built production bundle
β βββ src/
β β βββ components/ # Navbar, Footer, FoodCard, CartDrawer, SDGBadge
β β βββ context/ # AuthContext (RBAC), CartContext (State)
β β βββ pages/
β β β βββ Home.jsx # Hero, Highlights, Quick Demo
β β β βββ Restaurants.jsx # Catalog, Multi-criteria Sorting
β β β βββ FoodRescue.jsx # Surplus Deals, Dynamic Markdown Timers
β β β βββ GroupOrder.jsx # Collaborative Room Codes (LOOP-XXXX)
β β β βββ DsaLabVisualizer.jsx # 11-Tab Interactive DSA Visualizer
β β β βββ OrderTracking.jsx # Live Order Lifecycle Tracker
β β β βββ SustainabilityDashboard.jsx # Eco-Points, CO2 Metrics
β β β βββ ... (Role Dashboards for Restaurant, Courier, Admin)
β β βββ services/api.js # REST Client for all 25 Endpoints
β βββ package.json
β βββ vite.config.js
β
βββ server/ # Node.js + Express Backend
β βββ data/ # Persistent JSON Document Database
β β βββ users.json
β β βββ restaurants.json
β β βββ menuItems.json
β β βββ orders.json
β βββ src/
β β βββ algorithms/ # Custom Data Structures & Algorithms
β β β βββ roadGraph.js # Weighted Graph (Adjacency List - 16 Nodes)
β β β βββ dijkstra.js # Dijkstra Shortest Path with Min-Heap
β β β βββ doublyLinkedList.js # Order Lifecycle Doubly Linked List
β β β βββ stack.js # Cart Undo/Redo Twin Stack
β β β βββ binarySearchTree.js # Menu Price BST Indexer & Range Query
β β β βββ priorityQueue.js # Binary Min-Heap Priority Queue
β β β βββ orderQueue.js # FIFO Kitchen Preparation Queue
β β β βββ sortingSearching.js # Merge Sort & Binary Search
β β β βββ recommendationHash.js# Hash Map Frequency Recommender
β β β βββ freshnessKinetics.js # Arrhenius Decay & Segment Tree
β β β βββ zeroHungerDispatch.js# DSU & Bipartite Graph Matching
β β β βββ multimodalRelay.js # Multi-Modal Drone-EV Relay DAG
β β β βββ ecoKnapsack.js # Dynamic Programming 0/1 Knapsack
β β β βββ oopModels.js # Formal OOP Domain Hierarchy
β β βββ routes/ # Express REST Routes
β β β βββ dsaRoutes.js # All DSA Evaluation API Endpoints
β β β βββ ... (auth, restaurants, orders, rescue, delivery, admin)
β β βββ server.js # Server Entrypoint & Unified Static Host
β βββ test/
β β βββ dsa.test.js # 14-Module Automated Test Harness
β βββ package.json
β
βββ docs/ # Academic Submission Documents
β βββ PRESENTATION_CHEATSHEET.md # Presentation Guide & All Saved Passwords
β βββ PROJECT_REPORT.md # Official 8-Section Final Report
β βββ VIDEO_DEMO_SCRIPT.md # 2β3 Minute Video Submission Script
β βββ VIVA_PREPARATION_GUIDE.md # Top 20 Viva Questions & Formula Reference
β
βββ .gitignore # Clean Repository Ignore Rules
βββ package.json # Root Orchestration Scripts
βββ README.md # Master Documentation
All documentation required by the JIIT Data Structures Lab (PBL) Submission Guidelines has been prepared and formatted:
- Official 8-Section Project Report (
docs/PROJECT_REPORT.md):- Title Page with student names and enrollment numbers.
- Table of Contents, Problem Statement, Scope.
- UML Class Diagram (Mermaid & ASCII).
- Comprehensive Time/Space Complexity Table for all 14 algorithms.
- Numbered and captioned figures (Figures 5.1 through 5.11).
- Formal Academic References (Cormen et al., UN SDG, FSSAI).
- Video Submission Walkthrough Script (
docs/VIDEO_DEMO_SCRIPT.md):- Time-coded 2.5-minute speaking script for recording your team demo video.
- Viva Examination Cheat-Sheet (
docs/VIVA_PREPARATION_GUIDE.md):- Top 20 viva questions with model answers and quick-reference formula sheet.
- Presentation Cheatsheet & Master Logins (
docs/PRESENTATION_CHEATSHEET.md):- All saved passwords, role credentials, 3-minute presentation script, and speaker breakdown.
This project is submitted for academic evaluation under the B.Tech CSE Curriculum at Jaypee Institute of Information Technology (JIIT), Noida-62.
Distributed under the ISC License. Β© 2026 FoodLoop Team.