Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RCB Logo

โœฆ ๐Ÿ‘‘ Royal Cravings Banglo (RCB) ๐Ÿ‘‘ โœฆ

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

โœจ A Premium Food Ordering Web Experience โœจ


Live Demo License Author Firebase


A sleek, fully-featured food ordering web app with Firebase backend, 4-step checkout, PDF receipts, custom toast notifications, and a premium UI โ€” built entirely with vanilla HTML, CSS, and JavaScript.

Zero frameworks. Zero build tools. Pure golden code. ๐Ÿ‘‘


๐Ÿš€ Live Demo


Experience the app now ๐Ÿ‘‰ royal-cravings-banglo.vercel.app


โœจ Features at a Glance


๐Ÿ›’ Dynamic Cart

Add items, adjust quantities, real-time totals, slide-out removal

๐Ÿ” Firebase Auth

Email/password + Google OAuth with session persistence

๐Ÿ” Search & Filters

Live search bar + category filter buttons (Burgers, Pizza, Chicken, Pasta, Snacks)

๐Ÿ’ณ 4-Step Checkout

Summary โ†’ Delivery โ†’ Payment โ†’ Success wizard

๐Ÿ“„ PDF Receipts

Branded order receipts via jsPDF โ€” download, email, or WhatsApp

๐Ÿ”” Custom Toasts

Branded popups with product images, progress bars, and 3 styles

โš ๏ธ Confirm Dialogs

Custom blur-backed confirmation before deleting cart items

๐Ÿ“ฑ Fully Responsive

Mobile-first design, works on all screen sizes


๐ŸŽฌ How It Works


1๏ธโƒฃ Browse Menu โ†’ 2๏ธโƒฃ Add to Cart โ†’ 3๏ธโƒฃ Checkout โ†’ 4๏ธโƒฃ Pay โ†’ 5๏ธโƒฃ Get Receipt ๐Ÿ‘‘

โš™๏ธ Tech Stack


Layer Technology Purpose
Markup HTML5 Semantic page structure
Styling CSS3 Flexbox, Custom Properties, Animations
Logic Vanilla JavaScript (ES6+) Cart, Auth, Checkout, Payments
Backend Firebase Firestore DB + Firebase Authentication
Receipts jsPDF 2.5.1 Client-side PDF generation
Carousel Swiper.js v12 Customer reviews carousel
Icons Font Awesome 6.7.2 UI icons throughout the app

๐Ÿ’ก No package.json, no node_modules, no build tools โ€” all libraries loaded via CDN.


๐Ÿ“‚ Project Structure


Royal-Cravings-Banglo/
โ”‚
โ”œโ”€โ”€ index.html                 # Main page (menu, cart, auth, orders)
โ”œโ”€โ”€ checkout.html              # 4-step checkout wizard
โ”œโ”€โ”€ products.json              # Product catalog (8 items)
โ”œโ”€โ”€ LICENSE                    # MIT License
โ”‚
โ”œโ”€โ”€ css/
โ”‚   โ”œโ”€โ”€ style.css              # Main styles (1100+ lines)
โ”‚   โ””โ”€โ”€ checkout.css           # Checkout page styles
โ”‚
โ”œโ”€โ”€ js/
โ”‚   โ”œโ”€โ”€ config.js              # Firebase + Razorpay credentials
โ”‚   โ”œโ”€โ”€ firebase-config.js     # Firebase auto-init + fallback
โ”‚   โ”œโ”€โ”€ main.js                # Cart, products, toasts, confirms
โ”‚   โ”œโ”€โ”€ auth.js                # Authentication (Firebase + local)
โ”‚   โ”œโ”€โ”€ checkout.js            # Checkout flow + PDF + email
โ”‚   โ”œโ”€โ”€ orders.js              # Order history management
โ”‚   โ”œโ”€โ”€ search.js              # Search & category filters
โ”‚   โ””โ”€โ”€ seed.js                # Firestore product seeder
โ”‚
โ””โ”€โ”€ images/
    โ”œโ”€โ”€ logo.png, icon.png
    โ”œโ”€โ”€ food items (8 products)
    โ””โ”€โ”€ UI illustrations

โœจ Features In Detail


๐Ÿ›’ Smart Cart System

  • One-click add-to-cart with custom toast notification showing product image + price
  • Duplicate prevention โ€” shows "Already in Cart" warning toast
  • +/- quantity controls with real-time price recalculation
  • Custom confirm dialog with product image before removing items
  • Slide-out animation on removal with "Removed" toast
  • Cart badge counter updates in real-time

๐Ÿ” Search & Category Filters

  • Live search โ€” instant filtering as you type
  • Category buttons: All | Burgers | Pizza | Chicken | Pasta | Snacks
  • Combined search + filter for precise results

๐Ÿ” Authentication

  • Firebase Authentication: Email/password sign-in & sign-up
  • Google OAuth: One-click Google sign-in
  • Smart fallback: localStorage-based auth when Firebase is unconfigured
  • Session persistence across page reloads
  • User avatar + dropdown menu with sign-out and order history

๐Ÿ’ณ 4-Step Checkout Wizard

Step What Happens
1. Order Summary Review cart items, subtotal, delivery fee (โ‚น40), 5% tax, grand total
2. Delivery Details Name, phone, email, full address, city, pincode, delivery instructions
3. Payment Demo card form with auto-format (card number spaces, MM/YY)
4. Success Order confirmed! Download PDF receipt, email it, or share via WhatsApp
  • Progress bar at top showing current step
  • Back/Next navigation between steps
  • Form validation at each step before proceeding
  • Loading spinner during payment processing

๐Ÿ”” Custom Toast Notifications

Style When Color
Success Item added to cart Green gradient
Warning Duplicate item / empty cart Orange gradient
Delete Item removed from cart Red gradient
  • Auto-dismiss after 3 seconds with animated progress bar
  • Only one toast visible at a time (new replaces old)
  • Manual close button with product image thumbnail

โš ๏ธ Custom Confirm Dialog

  • Blurred backdrop overlay
  • Shows product image and name
  • "Are you sure?" message
  • Two buttons: Keep It (grey) / Delete (red gradient)
  • Click outside to cancel

๐Ÿ“„ PDF Receipt Generation

  • Branded receipt with RCB logo header
  • Order ID, date, payment method
  • Full item list with quantities and prices
  • Subtotal, delivery fee, tax breakdown, grand total
  • Delivery address and contact info
  • Download as PDF file

๐Ÿ“Š Order Management

  • Slide-in order history panel from the right
  • Orders saved to Firestore (or localStorage as fallback)
  • Sorted by date (newest first)
  • Order status badges: Placed | Preparing | Delivered

๐Ÿ“ฑ Fully Responsive Design

  • Mobile breakpoint at 780px
  • Hamburger navigation on mobile
  • All sections adapt: hero, services, menu, reviews, checkout
  • Toasts and dialogs are mobile-optimized

โš™๏ธ Configuration


๐Ÿ”ฅ Firebase Setup

Edit js/config.js with your Firebase credentials:

const FIREBASE_CONFIG = {
  apiKey: "YOUR_API_KEY",
  authDomain: "your-project.firebaseapp.com",
  projectId: "your-project-id",
  storageBucket: "your-project.appspot.com",
  messagingSenderId: "your-sender-id",
  appId: "your-app-id",
  measurementId: "G-XXXXXXXXXX"
};

๐Ÿ’ณ Razorpay Setup (Optional)

Replace the placeholder key in js/config.js:

const RAZORPAY_KEY = "rzp_test_XXXXXXXXXXXXXX";

โš ๏ธ The app works without Razorpay โ€” checkout uses demo payment by default.


๐Ÿš€ Getting Started


๐Ÿ“‹ Prerequisites

  • A modern web browser (Chrome, Firefox, Edge, Safari)
  • A local web server (required for Firebase Auth โ€” file:// won't work)

๐Ÿ“ฆ Installation

# 1. Clone the repository
git clone https://github.com/ayushnandi718-dev/FOOD-WEBSITE.git

# 2. Navigate to the project
cd FOOD-WEBSITE

# 3. Start a local server
npx serve .          # Node.js
# or
python -m http.server 8000   # Python
# or
# VS Code: Right-click index.html -> "Open with Live Server"

๐ŸŒฑ Firestore Seeding (Optional)

To populate Firestore with the 8 menu items:

// Open browser console on index.html and run:
seedProducts();

๐Ÿ“ธ Screenshots


image image image image image image image

๐Ÿง  What I Built & Learned


โœฆ Production-style UI components โ€” cart, multi-step forms, modals, toasts, confirm dialogs โœฆ Custom notification system โ€” branded toasts with progress bars, product images, and animations โœฆ Application state management with vanilla JavaScript (no Redux, no Vue) โœฆ Firebase integration โ€” Authentication, Firestore CRUD, graceful fallback โœฆ Client-side PDF generation with jsPDF โœฆ Responsive layouts using CSS Flexbox and Custom Properties โœฆ Graceful degradation โ€” Firebase โ†’ localStorage fallback pattern โœฆ Modular code architecture without frameworks or build tools


๐Ÿ”ฎ Future Improvements


  • ๐Ÿ—๏ธ Admin Dashboard โ€” Manage menu items, view all orders
  • ๐Ÿ’ฌ Real-time Order Tracking โ€” Live status updates via Firestore
  • ๐Ÿ”” Push Notifications โ€” Order status alerts
  • ๐ŸŒ Multi-language Support โ€” Hindi, English
  • ๐ŸŽ Coupon & Promo System โ€” Discount codes at checkout
  • โญ Ratings & Reviews โ€” User-submitted food reviews
  • ๐Ÿšš Delivery Partner View โ€” Separate interface for delivery agents
  • ๐Ÿ’ณ Real Razorpay Integration โ€” Replace demo payment with live gateway

๐Ÿ“„ License


This project is licensed under the MIT License โ€” see the LICENSE file for details.

Copyright (c) 2026 rva.creates


๐Ÿ‘จโ€๐Ÿ’ป Author


Ayush Nandi โ€” Full Stack Developer



GitHub Live



๐Ÿ† Portfolio Value

This project demonstrates strong frontend fundamentals, ability to build real-world UI systems, clean modular code architecture, and focus on user experience and design.



If you found this project helpful or impressive, give it a โญ on GitHub!


โœฆ ๐Ÿ‘‘ โœฆ Made with โค๏ธ by Ayush Nandi ๐Ÿ‘‘ โœฆ โœฆ

Releases

Packages

Contributors

Languages