Skip to content

Willie-Conway/Little-Lemon-Restaurant-Booking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Deploy to GitHub Pages

Little Lemon β€” Mediterranean Restaurant Booking System

alt text

Little Lemon React JavaScript CSS3 Responsive


About πŸ‹

Little Lemon is a modern, fully responsive restaurant website for a fictional Mediterranean restaurant in Chicago. Built with React, this project features a beautiful multi-page layout with a hero section, weekly specials cards, about section, guest testimonials, and a fully functional table reservation system with dynamic timeslot generation. The design is warm, earthy, and inviting β€” reflecting the Mediterranean culinary experience. Perfect for restaurateurs, hospitality businesses, and developers looking for a polished front-end showcase. 🍽️

✨ Key Features

🏠 3 Full Pages

Page Purpose Key Features
Home Restaurant landing Hero, specials cards, about section, testimonials, CTA banner
Booking Table reservation Dynamic form with date picker, timeslot selector, guest count
Confirmation Booking success Confirmation details with customer info, animated checkmark

🎨 Design Highlights

Element Color Hex Usage
Olive πŸ«’ Green #495E57 Primary brand color, navigation, buttons
Lemon πŸ‹ Yellow #F4CE14 Accent, highlights, call-to-action
Salmon 🐟 Peach #EE9972 Secondary accent, prices, badges
Peach πŸ‘ Light #FBDABB Subtle backgrounds, hover states
Cream πŸ₯› Off-white #FEFAE0 Page background, cards
Charcoal ⚫ Dark #2C2C2C Text, footer

🏠 Home Page Components

Hero Section 🌟

  • Split layout: Text content on left, image on right
  • Animated rotating badge with restaurant establishment year
  • Call-to-action buttons: "Reserve a Table" and "Explore Menu"
  • Key statistics: 12+ years, 4.9β˜… rating, 40k guests

alt text

Weekly Specials 🍽️

  • 3 featured recipes with images, badges, prices
  • Hover effects: Card lifts, image scales, CTA arrow animates
  • Recipe details:
    • Greek Salad β€” Vegetarian, $12.99
    • Bruschetta β€” Chef's Pick, $7.99
    • Grilled Fish β€” Signature, $20.99
  • "View Full Menu" button with olive outline

alt text

About Section πŸ“–

  • Split layout: Two overlapping images on left, story text on right
  • Restaurant origin story β€” family-owned since 2012
  • Local sourcing commitment to Chicago farmers

alt text

Testimonials ⭐

  • 3 guest reviews with star ratings
  • Quotes from satisfied customers
  • Author attribution with names

alt text

CTA Banner πŸ“ž

  • Call to action: "Ready for an unforgettable dining experience?"
  • Dark button with hover effect

alt text

Footer πŸ”—

  • 4-column layout: Brand, navigation, contact, social
  • Address: 12 S Michigan Ave, Chicago, IL 60603
  • Phone: +1 312-456-7891
  • Email: little@lemon.com

πŸ“… Booking System

Form Fields πŸ“

Field Type Validation Purpose
Full Name Text Required Customer identification
Email Email Required Confirmation delivery
Date Date picker Required, min=today Select reservation date
Time Dropdown Required, dynamic Available timeslots
Guests Number 1-20, required Party size
Occasion Select Optional None, Birthday, Anniversary, etc.
Special Requests Text Optional Allergies, seating preferences

alt text

Timeslot Logic ⏰

  • Dynamic generation based on selected date
  • Seed random algorithm for consistent but varied slots
  • Hours: 5:00 PM – 11:30 PM
  • Slots: On the hour and half-hour, filtered by availability
  • Caching: Times for same date remain consistent
const fetchTimes = (date) => {
  const r = seedRandom(new Date(date).getDate() || new Date().getDate());
  const slots = [];
  for (let h = 17; h <= 23; h++) {
    if (r() < 0.5) slots.push(`${h}:00`);
    if (r() > 0.5) slots.push(`${h}:30`);
  }
  return slots.length ? slots : ["18:00", "19:00", "20:00"];
};

alt text

Form Validation βœ…

  • All required fields must be filled
  • Date must be today or future
  • Guests between 1-20
  • Email format validation via HTML5

alt text

useReducer for Timeslots πŸ”„

const [times, dispatch] = useReducer(reducer, fetchTimes(today));
const reducer = (_, date) => fetchTimes(date);

βœ… Confirmation Page

Success Animation ✨

  • Pulsing checkmark icon with scale animation
  • Pop animation on page load

Booking Details πŸ“‹

  • 4-column grid showing:
    • Date
    • Time
    • Guests
    • Occasion
  • Personalized greeting with customer name

Return Navigation πŸ”™

  • "Back to Home" button with smooth transition

πŸ“± Responsive Design

Mobile Breakpoints πŸ“²

Breakpoint Layout Changes
< 768px Hero becomes single column, right image hidden
< 900px Cards grid becomes 1 column
< 768px About section becomes single column
< 500px Footer becomes single column, form grid becomes single

Hamburger Menu πŸ”

  • Appears on mobile (< 768px)
  • Toggle open/close with state
  • Navigation links include Home, Menu, About, Reserve button

🎨 Design System

Typography ✍️

  • Cormorant Garamond β€” Serif for headings, numbers, elegant touches
  • DM Sans β€” Sans-serif for body text, navigation, buttons
  • Playfair Display β€” Used sparingly for special emphasis

Navigation 🧭

  • Sticky navbar that changes background on scroll
  • Logo with lemon-colored "Lemon" text
  • Desktop links with animated underline hover
  • Reserve button with olive background

Buttons πŸ”˜

Type Background Hover Effect
Primary Lemon (#F4CE14) Darker yellow, lift, shadow
Ghost Transparent Border lightens, background tint
Outline Transparent Olive fill on hover
Dark Charcoal Olive fill on hover

Cards πŸƒ

  • White background with slight shadow
  • Hover lift of -6px translateY
  • Image zoom on hover (scale 1.06)
  • Price in salmon color

Animations ✨

Element Animation Duration
Hero badge Slow spin 20s linear
Cards Hover lift 0.3s
Page transitions Fade up 0.5s ease
Confirmation icon Pop 0.6s cubic-bezier

πŸ› οΈ Technical Implementation

Tech Stack πŸ₯ž

  • React 18 β€” Functional components with hooks
  • Pure CSS β€” No frameworks, custom design system
  • Responsive design β€” Media queries for all breakpoints

React Hooks Used 🎣

Hook Purpose
useState Page state, form fields, mobile menu, scrolled state
useEffect Scroll listener for navbar
useReducer Timeslot generation based on date
useRef (Not used but imported)

Component Structure πŸ—οΈ

App
β”œβ”€β”€ Navbar
β”œβ”€β”€ HomePage
β”‚   β”œβ”€β”€ Hero
β”‚   β”œβ”€β”€ Specials
β”‚   β”œβ”€β”€ About
β”‚   β”œβ”€β”€ Testimonials
β”‚   β”œβ”€β”€ CTABanner
β”‚   └── Footer
β”œβ”€β”€ BookingPage
└── ConfirmPage

Data Flow πŸ”„

  • Page state lifted to App (useState)
  • Booking data passed to ConfirmPage via navigation
  • Timeslots generated via useReducer with seed random

πŸŽ₯ Video Demo Script (45-60 seconds)

Time Scene Action
0:00 Hero Show Little Lemon logo, rotating badge, call-to-action buttons
0:05 Specials Scroll through 3 cards: Greek Salad, Bruschetta, Grilled Fish
0:10 Card Hover Hover over Bruschetta β†’ card lifts, image scales
0:15 About Show overlapping images, restaurant story text
0:20 Testimonials 3 guest reviews with star ratings
0:25 Booking Click "Reserve a Table" β†’ navigate to booking page
0:30 Booking Form Fill out name, email, select date β†’ timeslots update
0:35 Submit Click "Confirm Reservation" β†’ validation, then navigate
0:40 Confirmation Animated checkmark appears, booking details shown
0:45 Back Home Click "Back to Home" β†’ return to hero

🚦 Performance

  • Load Time: < 1.5 seconds
  • Memory Usage: < 20 MB
  • Network: Images from ImgBB and Unsplash CDNs

Optimizations ⚑

  • Lazy loading images with browser native
  • Efficient re-renders via React hooks
  • CSS animations instead of JavaScript for performance

πŸ›‘οΈ Security Notes

Little Lemon is a safe front-end demo application:

  • βœ… No backend server
  • βœ… No data storage (form submission simulated)
  • βœ… No tracking or analytics
  • βœ… No external dependencies beyond React

πŸ“ License

MIT License β€” see LICENSE file for details.


πŸ™ Acknowledgments

  • Little Lemon β€” Fictional restaurant from Meta Front-End Developer Certificate
  • Unsplash β€” Restaurant interior and food photography
  • ImgBB β€” Image hosting for specials and hero
  • Coursera β€” Course project inspiration

πŸ“§ Contact


🏁 Future Enhancements

  • Add online ordering system
  • Integrate with real reservation API
  • Add table map visualization
  • Include photo gallery
  • Add menu categories (appetizers, mains, desserts)
  • Implement multi-language support (Spanish, Polish, Italian)
  • Add loyalty program signup
  • Include Google Maps integration
  • Add event calendar for special dinners
  • Implement gift card purchase flow

πŸ‹ Little Lemon β€” Mediterranean Restaurant Website πŸ‹


Last updated: March 2025

About

Little Lemon is a modern, fully responsive restaurant website for a fictional Mediterranean restaurant in Chicago. Built with React, this project features a beautiful multi-page layout with a hero section, weekly specials cards, about section, guest testimonials, and a fully functional table reservation system with dynamic timeslot generation.

Topics

Resources

License

Stars

Watchers

Forks

Contributors