Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

M-R-Saad/DineFlow-client

Repository files navigation

DineFlow Logo

DineFlow β€” Client

🍽️ Modern Restaurant Management Frontend

A feature-rich, responsive React application powering both the customer-facing experience and the admin dashboard for the DineFlow restaurant management platform.

React Vite TailwindCSS Firebase License

Live Demo Β· Report Bug Β· Request Feature


πŸ“‘ Table of Contents


πŸ“– About The Project

DineFlow Client is the frontend application of the DineFlow restaurant management platform. Built with React 19 and Vite, it delivers a smooth, modern user experience for two distinct user roles:

  • Customers β€” browse the menu, place orders, reserve tables, leave reviews, and track orders in real time.
  • Admins β€” access a full-featured dashboard with analytics, menu management, inventory tracking, order processing, and more.

The application features Firebase-powered authentication (email/password + Google OAuth), real-time data fetching with TanStack Query, and a polished UI built with Tailwind CSS v4 and Framer Motion animations.


✨ Key Features

πŸ›’ Customer Experience

  • πŸ” Browse menu with search, category filter, and sort
  • πŸ›’ Add to cart and place orders (delivery / pickup)
  • πŸ“… Table reservation with date, time, and guest count
  • πŸ“¦ Order history with real-time status tracking
  • ⭐ Dish reviews and restaurant testimonials
  • πŸ‘€ Profile management with photo upload
  • πŸ” Firebase auth (Email/Password + Google)

πŸ“Š Admin Dashboard

  • πŸ“ˆ Revenue, orders, and booking analytics (Recharts)
  • πŸ” Full CRUD for menu items and categories
  • ☁️ Cloudinary image upload for menu items
  • πŸ“‹ Order management with status pipeline
  • πŸ“… Booking management (confirm / cancel)
  • πŸ“¦ Inventory tracking with low-stock alerts
  • πŸ‘₯ User management with role assignment
  • πŸ’¬ Testimonial approval system

πŸ› οΈ Tech Stack

Category Technology
UI Framework React 19
Build Tool Vite 8
Styling Tailwind CSS v4
Routing React Router v7
State / Data TanStack Query (React Query) v5
Forms React Hook Form
Animations Framer Motion
Charts Recharts
Authentication Firebase (Email/Password + Google OAuth)
HTTP Client Axios (with JWT interceptors)
Image Hosting Cloudinary (unsigned upload)
Notifications React Hot Toast
Icons React Icons
SEO React Helmet Async
Date Picker React Datepicker

πŸš€ Getting Started

Prerequisites

  • Node.js β‰₯ 18.x
  • npm β‰₯ 9.x (or yarn / pnpm)
  • A running instance of the DineFlow Server
  • Firebase project with Authentication enabled
  • Cloudinary account with an unsigned upload preset

Installation

  1. Clone the repository

    git clone https://github.com/M-R-Saad/DineFlow-client.git
    cd DineFlow-client
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env file in the root directory (see Environment Variables below).

  4. Start the development server

    npm run dev

    The app will be available at http://localhost:5173.

Build for Production

npm run build
npm run preview # Preview the production build locally

πŸ” Environment Variables

Create a .env file in the project root with the following variables:

# API
VITE_API_URL=http://localhost:5000/api
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
# Cloudinary
VITE_CLOUDINARY_CLOUD_NAME=your_cloud_name
VITE_CLOUDINARY_UPLOAD_PRESET=your_unsigned_preset

⚠️ Important: Never commit your .env file to version control. It is already included in .gitignore.


πŸ“ Project Structure

DineFlow-client/
β”œβ”€β”€ public/ # Static assets & logos
β”‚ β”œβ”€β”€ df_logo_bg_removed.png # App logo
β”‚ β”œβ”€β”€ df_name_bg_removed.png # App name logo
β”‚ └── favicon.svg # Favicon
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ api/ # Axios instances & API call functions
β”‚ β”‚ β”œβ”€β”€ axiosPublic.js # Public axios (no auth header)
β”‚ β”‚ β”œβ”€β”€ axiosSecure.js # Secure axios (JWT interceptor)
β”‚ β”‚ β”œβ”€β”€ authApi.js # Auth endpoints
β”‚ β”‚ β”œβ”€β”€ menuApi.js # Menu endpoints
β”‚ β”‚ β”œβ”€β”€ bookingApi.js # Booking endpoints
β”‚ β”‚ β”œβ”€β”€ orderApi.js # Order endpoints
β”‚ β”‚ └── adminApi.js # Admin CRUD endpoints
β”‚ β”œβ”€β”€ assets/ # Images, icons, static files
β”‚ β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”‚ β”œβ”€β”€ shared/ # Navbar, Footer, Loader, Modal, etc.
β”‚ β”‚ β”œβ”€β”€ home/ # Hero, Featured Menu, Testimonials
β”‚ β”‚ β”œβ”€β”€ menu/ # MenuCard, Filter, Search
β”‚ β”‚ β”œβ”€β”€ booking/ # BookingForm, BookingCard
β”‚ β”‚ β”œβ”€β”€ order/ # Cart, OrderCard, StatusBadge
β”‚ β”‚ β”œβ”€β”€ dashboard/ # Charts, StatCard, Alerts
β”‚ β”‚ └── auth/ # Login & Register forms
β”‚ β”œβ”€β”€ context/ # React Context providers
β”‚ β”‚ β”œβ”€β”€ AuthContext.jsx # Firebase auth state management
β”‚ β”‚ └── CartContext.jsx # Shopping cart state
β”‚ β”œβ”€β”€ hooks/ # Custom React hooks
β”‚ β”‚ β”œβ”€β”€ useAuth.js # Auth context shortcut
β”‚ β”‚ β”œβ”€β”€ useCart.js # Cart context shortcut
β”‚ β”‚ β”œβ”€β”€ useAxiosSecure.js # Secure axios hook
β”‚ β”‚ └── useAdmin.js # Admin role check
β”‚ β”œβ”€β”€ layouts/ # Page layout wrappers
β”‚ β”‚ β”œβ”€β”€ MainLayout.jsx # Public pages (Navbar + Footer)
β”‚ β”‚ β”œβ”€β”€ DashboardLayout.jsx # Admin pages (Sidebar + Content)
β”‚ β”‚ └── AuthLayout.jsx # Auth pages (Centered card)
β”‚ β”œβ”€β”€ pages/ # Route-level page components
β”‚ β”‚ β”œβ”€β”€ public/ # Home, Menu, About, Contact
β”‚ β”‚ β”œβ”€β”€ auth/ # Login, Register
β”‚ β”‚ β”œβ”€β”€ customer/ # Profile, Orders, Bookings
β”‚ β”‚ └── admin/ # Dashboard, Manage* pages
β”‚ β”œβ”€β”€ routes/ # Route configuration
β”‚ β”‚ β”œβ”€β”€ AppRoutes.jsx # All route definitions
β”‚ β”‚ β”œβ”€β”€ PrivateRoute.jsx # Auth guard
β”‚ β”‚ └── AdminRoute.jsx # Admin role guard
β”‚ β”œβ”€β”€ utils/ # Utility functions
β”‚ β”œβ”€β”€ App.jsx # Root component
β”‚ β”œβ”€β”€ main.jsx # App entry point
β”‚ └── index.css # Global styles & Tailwind imports
β”œβ”€β”€ .env # Environment variables (not committed)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ index.html # HTML entry point
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js # Vite configuration
└── eslint.config.js # ESLint configuration

πŸ—ΊοΈ Pages & Routes

Public Pages (No Authentication Required)

Page Route Description
Home / Hero banner, featured dishes, testimonials, CTA
Menu /menu Full menu with search, filter, and sort
Dish Detail /menu/:id Individual dish info, ingredients, reviews
About /about Restaurant story, team, values
Contact /contact Contact form, map, restaurant info
Login /login Email/password + Google sign-in
Register /register New account creation

Customer Pages (Authentication Required)

Page Route Description
Book Table /book-table Table reservation form
My Bookings /my-bookings View and cancel reservations
Checkout /checkout Cart review + order placement
My Orders /my-orders Order history + status tracking
Profile /profile Update name, photo, phone, address

Admin Dashboard (Admin Role Required)

Page Route Description
Dashboard /dashboard Overview stats + analytics charts
Manage Menu /dashboard/menu CRUD for menu items
Manage Categories /dashboard/categories CRUD for categories
Manage Bookings /dashboard/bookings View + update booking status
Manage Orders /dashboard/orders View + update order status
Manage Inventory /dashboard/inventory Stock tracking + restock
Manage Users /dashboard/users View users, change roles
Manage Testimonials /dashboard/testimonials Approve or delete testimonials

πŸ”— Related Repository

Repository Description
DineFlow Server Node.js + Express REST API backend

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please make sure to update tests as appropriate and follow the existing code style.


πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


DineFlow

Built with ❀️ using React, Vite, and Tailwind CSS

⬆️ Back to Top

About

🍽️ A modern restaurant management platform built with React, Vite, and Firebase, featuring online ordering, table reservations, inventory tracking, and a powerful admin dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /