Live demo: https://helloojasmutreja.github.io/Slurp/
Slurp is a food delivery platform for SRM students to order from Java Canteen vendors. The frontend runs entirely in mock mode using localStorage — no backend or database is required to use the app.
cd frontend
npm install
npm run devThe app opens at http://localhost:5173
That's it. All data is stored in your browser's localStorage.
| Field | Value |
|---|---|
| Username | admin |
| Password | admin123 |
admin@slurp.app |
|
| Role | ADMIN |
The admin account has access to the Admin Dashboard at /admin.
No customer accounts are pre-seeded. Use the Register page to create one — pick any username, email, and password. Every new customer account starts with:
- Wallet balance: ₹100
- Loyalty points: 0
All of the following data is loaded from frontend/src/utils/mockData.js and served by the localStorage mock in frontend/src/utils/api.js. This is what you'll see in the app on first load.
| ID | Name | Rating | Description |
|---|---|---|---|
v1 |
Spice Garden | 4.5 | Authentic Indian cuisine with vegetarian and non-vegetarian options |
v2 |
The Burger Joint | 4.3 | Juicy burgers, crispy fries, and refreshing shakes |
v3 |
Wok & Roll | 4.1 | Pan-Asian dishes: Chinese, Thai, and Japanese inspired |
v4 |
Pizza Palace | 4.4 | Wood-fired pizzas with fresh toppings and homemade sauces |
| ID | Item | Price | Veg? |
|---|---|---|---|
m1 |
Paneer Butter Masala | ₹120 | Yes |
m2 |
Dal Tadka | ₹80 | Yes |
m3 |
Chicken Biryani | ₹160 | No |
m4 |
Veg Thali | ₹100 | Yes |
m5 |
Mutton Rogan Josh | ₹200 | No |
| ID | Item | Price | Veg? |
|---|---|---|---|
m6 |
Classic Cheese Burger | ₹150 | No |
m7 |
Veggie Delight Burger | ₹120 | Yes |
m8 |
Crispy Chicken Burger | ₹160 | No |
m9 |
Loaded Fries | ₹90 | Yes |
m10 |
Chocolate Shake | ₹80 | Yes |
| ID | Item | Price | Veg? |
|---|---|---|---|
m11 |
Veg Fried Rice | ₹100 | Yes |
m12 |
Chicken Noodles | ₹130 | No |
m13 |
Spring Rolls (4 pcs) | ₹80 | Yes |
m14 |
Thai Green Curry | ₹140 | Yes |
m15 |
Kung Pao Chicken | ₹160 | No |
| ID | Item | Price | Veg? |
|---|---|---|---|
m16 |
Margherita Pizza | ₹180 | Yes |
m17 |
Pepperoni Pizza | ₹220 | No |
m18 |
BBQ Chicken Pizza | ₹240 | No |
m19 |
Veggie Supreme Pizza | ₹200 | Yes |
m20 |
Garlic Bread (6 pcs) | ₹80 | Yes |
| ID | Display Name | Start | End |
|---|---|---|---|
s1 |
11:00 AM – 12:00 PM | 11:00 | 12:00 |
s2 |
12:00 PM – 1:00 PM | 12:00 | 13:00 |
s3 |
1:00 PM – 2:00 PM | 13:00 | 14:00 |
s4 |
5:00 PM – 6:00 PM | 17:00 | 18:00 |
s5 |
6:00 PM – 7:00 PM | 18:00 | 19:00 |
| Rule | Value |
|---|---|
| Platform fee | ₹2 on every order |
| Delivery fee | ₹10 if order subtotal < ₹100; free otherwise |
| Starting wallet balance | ₹100 for every new account |
| Loyalty points earned | subtotal × 0.005 pts per order |
| Loyalty redemption | 1 pt = ₹1 off; capped at the order total |
| Method | How it works in mock mode |
|---|---|
| Wallet | Deducted immediately from localStorage wallet; order is confirmed |
| Card / UPI | Mock payment flow — always succeeds; loyalty points awarded on verification |
| Cash on Delivery | No deduction; loyalty points awarded on COD confirmation |
The mock API stores everything in the following keys (visible in DevTools → Application → Local Storage):
| Key | Contents |
|---|---|
slurp_users |
Array of all registered users (including passwords) |
slurp_orders |
Array of all placed orders |
slurp_wallet_<userId> |
{ balance, loyaltyPoints, transactions[] } for each user |
user |
Currently logged-in user object |
token |
Mock auth token for the current session |
To reset all data to its initial state, open DevTools and clear localStorage, then reload the page.
- Authentication — Register / login with role-based access (Customer, Admin)
- Vendor Browsing — Browse 4 active vendors with ratings and descriptions
- Menu Filtering — Filter items by Veg / Non-Veg
- Shopping Cart — Add items across one vendor, adjust quantities
- Smart Pricing — Automatic delivery fee and platform fee at checkout
- Delivery Slot Selection — Choose from 5 pre-set time slots
- Digital Wallet — Add funds and pay from wallet balance
- Loyalty Points — Earned per order, redeemable at checkout
- Order History — See all past orders with status and details
- Admin Dashboard — Platform stats, order list with status updates, vendor list
- Dark Mode — Full dark/light theme toggle, saved per session
| Layer | Technology |
|---|---|
| Frontend | React 19, React Router 7, Axios |
| Styling | Tailwind CSS v4, custom design system |
| Dev Build | Vite (rolldown-vite) |
| Data | localStorage mock (no backend needed) |
Slurp/
└── frontend/
└── src/
├── components/ # Shared UI (Navbar, Welcome, ProtectedRoute)
├── context/ # React context (Auth, Cart, Theme)
├── design-system.jsx # Design tokens, icons, and component atoms
├── pages/ # Page-level components
└── utils/
├── api.js # localStorage mock API (no backend)
└── mockData.js # Seed vendors, menu items, slots, admin user
cd frontend
npm run lintcd frontend
npm install
npm run build
# Output: frontend/dist/Deploy the dist/ folder to any static host (GitHub Pages, Vercel, Netlify, etc.). No backend configuration is required.
A Spring Boot backend exists in backend/ for production deployments with a real database. It is not needed to run or test the app locally.
cd backend
mvn spring-boot:runBackend starts at http://localhost:8080. To connect the frontend to it, set:
VITE_API_URL=http://localhost:8080/apiH2 in-memory console (dev only): http://localhost:8080/h2-console
- JDBC URL:
jdbc:h2:mem:testdb - Username:
sa - Password: (leave empty)
- Create a project at supabase.com
- Run
backend/src/main/resources/supabase-schema.sqlin the SQL Editor - Run
backend/src/main/resources/supabase-seed-data.sqlfor initial data - Fill in credentials in
backend/src/main/resources/application-supabase.properties - Start with the Supabase profile:
cd backend
mvn spring-boot:run -Dspring-boot.run.profiles=supabaseThe frontend is automatically deployed to https://helloojasmutreja.github.io/Slurp/ on every push to main via the deploy.yml workflow.
One-time setup in repo settings:
-
Go to Settings → Pages and set Source to GitHub Actions.
-
(Optional) Add a repository variable under Settings → Variables → Actions:
- Name:
VITE_API_URL - Value: URL of your deployed backend, e.g.
https://your-backend.onrender.com/api
If not set, the deployed app runs fully in mock mode.
- Name:
| Problem | Fix |
|---|---|
| App shows blank page | Clear localStorage in DevTools and reload |
| Login fails | Use admin / admin123, or register a new customer account |
| Cart is empty after reload | Cart is in React state — it resets on page reload (expected) |
| Build fails | Delete node_modules/ and re-run npm install |
| Blank page after deploy | Configure hosting to redirect all routes to index.html |
| Backend port 8080 in use | Change server.port in application.properties |
Built as a campus food delivery solution for SRM University students.
This project is for educational purposes.