A feature-rich, responsive React application powering both the customer-facing experience and the admin dashboard for the DineFlow restaurant management platform.
- About The Project
- Key Features
- Tech Stack
- Getting Started
- Environment Variables
- Project Structure
- Pages & Routes
- Related Repository
- Contributing
- License
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.
- π 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)
- π 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
| 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 |
- 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
-
Clone the repository
git clone https://github.com/M-R-Saad/DineFlow-client.git cd DineFlow-client -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory (see Environment Variables below). -
Start the development server
npm run dev
The app will be available at
http://localhost:5173.
npm run build
npm run preview # Preview the production build locallyCreate 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.envfile to version control. It is already included in.gitignore.
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
| 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 |
| 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 |
| 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 |
| Repository | Description |
|---|---|
| DineFlow Server | Node.js + Express REST API backend |
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please make sure to update tests as appropriate and follow the existing code style.
Distributed under the MIT License. See LICENSE for more information.