Skip to content

jwafaDev/Restaurant-Little-Lemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‹ Little Lemon - Restaurant Reservation App

A modern, responsive web application for Little Lemon restaurant featuring online table reservations, dynamic booking management, and a seamless user experience.

✨ Features

  • 🍽️ Online Table Reservations - Easy booking system for restaurant tables
  • πŸ“… Dynamic Booking Times - Available time slots based on date selection
  • πŸ‘₯ Guest Management - Select number of guests and special occasions
  • βœ… Form Validation - Robust client-side validation for booking details
  • πŸ“± Fully Responsive Design - Works perfectly on desktop, tablet, and mobile devices
  • πŸ”„ Booking Confirmation - Instant confirmation after successful reservation
  • πŸ§ͺ Comprehensive Testing - Unit tests with React Testing Library
  • 🎨 Modern UI - Clean and user-friendly interface

Getting Started

Prerequisites

  • Node.js (version 14 or higher)
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/jwafaDev/Restaurant-Little-Lemon.git

# Navigate to the project folder
cd Restaurant-Little-Lemon

# Install dependencies
npm install

Running the Application

# Start the development server
npm start

# The application will automatically open at http://localhost:3000

The app is now ready to use! You can start making table reservations.

Build for Production

# Create an optimized production build
npm run build

# This creates a `build` folder optimized for production deployment

Testing

# Run the test suite
npm test

# Run tests in watch mode
npm test -- --watch

Technologies Used

Technology Version Purpose
React ^19.2.7 UI library and component framework
React Router ^7.18.0 Client-side routing and navigation
React Testing Library ^16.3.2 Component testing utilities
Jest - Test runner (included with React Scripts)
JavaScript (ES6+) - Programming language
HTML5 - Markup language
CSS3 - Styling and responsive design

Language Composition

  • JavaScript: Primary language
  • HTML5: Markup
  • CSS3: Styling

Project Structure

Restaurant-Little-Lemon/
β”œβ”€β”€ public/                      # Static files
β”‚   └── index.html              # Main HTML file
β”œβ”€β”€ src/                         # Source code
β”‚   β”œβ”€β”€ components/             # React components
β”‚   β”‚   β”œβ”€β”€ Header.js           # Header navigation
β”‚   β”‚   β”œβ”€β”€ Nav.js              # Navigation bar
β”‚   β”‚   β”œβ”€β”€ Footer.js           # Footer section
β”‚   β”‚   β”œβ”€β”€ BookingForm.js      # Reservation form
β”‚   β”‚   β”œβ”€β”€ BookingPage.js      # Booking page
β”‚   β”‚   β”œβ”€β”€ ConfirmedBooking.js # Confirmation page
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ styles/                 # CSS files
β”‚   β”œβ”€β”€ App.js                  # Main App component
β”‚   β”œβ”€β”€ App.test.js             # App tests
β”‚   └── index.js                # React entry point
β”œβ”€β”€ package.json                # Project dependencies
β”œβ”€β”€ package-lock.json           # Dependency lock file
└── README.md                   # Project documentation

How to Use

Making a Reservation

  1. Navigate to the Reservations or Booking section
  2. Select your desired date and time
  3. Specify the number of guests
  4. Choose an occasion (if applicable)
  5. Enter your personal details
  6. Submit the form
  7. Receive a booking confirmation

Form Validation

The booking form includes validation for:

  • Valid date selection (no past dates)
  • Available time slots
  • Guest count (typically 1-10)
  • Required personal information

Core Components

BookingForm Component

Handles user input for reservation details with validation and error handling.

BookingPage Component

Main page for managing reservations with date/time selection.

ConfirmedBooking Component

Displays confirmation details after successful booking.

Navigation & Routing

Uses React Router for smooth navigation between different pages.

Available Scripts

Script Command Description
Start npm start Runs the app in development mode on port 3000
Build npm run build Creates an optimized production build
Test npm test Launches the test runner in interactive mode
Eject npm run eject Ejects configuration (irreversible)

Note: npm run eject is a one-way operation. Once you eject, you can't go back!

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Responsive Design

The application is built with a mobile-first approach ensuring:

  • Optimal viewing on mobile devices (320px+)
  • Tablet-friendly layouts (768px+)
  • Desktop optimization (1024px+)

🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/YourFeature)
  3. Make your changes
  4. Write or update tests as needed
  5. Commit your changes (git commit -m 'Add YourFeature')
  6. Push to the branch (git push origin feature/YourFeature)
  7. Open a Pull Request

Development Guidelines

  • Follow React best practices and hooks patterns
  • Write meaningful commit messages
  • Test your changes with npm test
  • Ensure responsive design works on all screen sizes
  • Keep components small and focused

Troubleshooting

Port Already in Use

If port 3000 is already in use:

PORT=3001 npm start

Dependency Issues

If you encounter dependency conflicts:

rm -rf node_modules package-lock.json
npm install

Tests Not Running

Make sure Jest is properly configured:

npm test -- --clearCache
npm test

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project Context

This project was developed as part of the Meta Front-End Developer Capstone Project, demonstrating proficiency in:

  • React development
  • Component-based architecture
  • Client-side routing
  • Form handling and validation
  • Responsive web design
  • Testing and quality assurance

Future Enhancements

Potential features for future versions:

  • Backend integration for persistent data
  • User authentication and accounts
  • Email confirmation notifications
  • Admin panel for managing reservations
  • Payment integration
  • Advanced filtering and search
  • Cancellation and modification options

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

jwafaDev - Visit Profile


πŸ“ž Support

For questions, issues, or suggestions, feel free to:


Created with ❀️ using React

Enjoy using Little Lemon Restaurant Reservation App! πŸ‹

About

A modern restaurant web application for Little Lemon featuring online table reservations, responsive design, and booking confirmation with React and React Router.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages