A modern, responsive food ordering web application built with React, TypeScript, and Vite. UrbanMeals allows users to search for restaurants, browse menus, place orders, and track delivery status in real-time.
- Features
- Tech Stack
- Screenshots
- Getting Started
- Environment Variables
- Project Structure
- API Integration
- Available Scripts
- Contributing
- License
- π Search Restaurants - Search for restaurants by city or town
- π Browse Menus - View restaurant details and browse menu items
- π Shopping Cart - Add/remove items with persistent cart storage
- π³ Secure Checkout - Integrated payment processing with Stripe
- π¦ Order Tracking - Real-time order status updates (Placed β Paid β In Progress β Out for Delivery β Delivered)
- π€ User Profiles - Manage delivery addresses and personal information
- πͺ Restaurant Management - Create and manage your restaurant profile
- π Menu Management - Add, edit, and remove menu items
- π Order Dashboard - View and manage incoming orders
- πΌοΈ Image Upload - Upload restaurant and menu item images
- π Auth0 Authentication - Secure login/signup with Auth0
- π± Responsive Design - Works seamlessly on desktop and mobile
- π¨ Modern UI - Beautiful interface with shadcn/ui components
- β‘ Fast Performance - Optimized with Vite and React Query caching
| Category | Technology |
|---|---|
| Framework | React 18 |
| Language | TypeScript |
| Build Tool | Vite |
| Styling | TailwindCSS |
| UI Components | shadcn/ui (Radix UI) |
| Routing | React Router DOM v6 |
| State Management | React Query |
| Form Handling | React Hook Form + Zod |
| Authentication | Auth0 |
| Icons | Lucide React |
| Notifications | Sonner |
| Theming | next-themes |
The landing page featuring the search bar and app download section.
Restaurant search results with cuisine filters and sorting options.
Individual restaurant view with menu items and order summary.
Order summary with delivery details form.
Checkout page with payment options.

Real-time order tracking with progress indicator.
User profile management with delivery address settings.
Restaurant owner dashboard with orders and restaurant settings tabs.
Mobile navigation and responsive layouts.
- Node.js 18+
- npm or yarn
- An Auth0 account for authentication
- Backend API running (see backend repository)
-
Clone the repository
git clone https://github.com/your-username/mern-food-ordering-app-frontend.git cd mern-food-ordering-app-frontend -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envand fill in your configuration values (see Environment Variables) -
Start the development server
npm run dev
-
Open in browser
Navigate to
http://localhost:5173
Create a .env file in the root directory with the following variables:
# Backend API URL
VITE_API_BASE_URL=http://localhost:7000
# Auth0 Configuration
VITE_AUTH0_DOMAIN=your-tenant.us.auth0.com
VITE_AUTH0_CLIENT_ID=your-auth0-client-id
VITE_AUTH0_CALLBACK_URL=http://localhost:5173
VITE_AUTH0_AUDIENCE=your-auth0-api-audience- Sign up at Auth0
- Create a new application (Single Page Application)
- Configure callback URLs to include
http://localhost:5173 - Copy the Domain and Client ID to your
.envfile - Create an API and copy the Audience identifier
mern-food-ordering-app-frontend/
βββ public/ # Static assets
βββ src/
β βββ api/ # API integration hooks
β β βββ MyRestaurantApi.tsx # Restaurant owner API calls
β β βββ MyUserApi.tsx # User profile API calls
β β βββ OrderApi.tsx # Order management API calls
β β βββ RestaurantApi.tsx # Restaurant search API calls
β βββ assets/ # Images and static assets
β βββ auth/ # Authentication components
β β βββ Auth0ProviderWithNavigate.tsx
β β βββ ProtectedRoute.tsx
β βββ components/ # Reusable UI components
β β βββ ui/ # shadcn/ui components
β β βββ Header.tsx
β β βββ Footer.tsx
β β βββ SearchBar.tsx
β β βββ CuisineFilter.tsx
β β βββ ...
β βββ config/ # App configuration
β βββ forms/ # Form components
β β βββ manage-restaurant-form/
β β βββ user-profile-form/
β βββ layouts/ # Page layouts
β βββ lib/ # Utility functions
β βββ pages/ # Page components
β β βββ HomePage.tsx
β β βββ SearchPage.tsx
β β βββ DetailPage.tsx
β β βββ UserProfilePage.tsx
β β βββ ManageRestaurantPage.tsx
β β βββ OrderStatusPage.tsx
β β βββ AuthCallbackPage.tsx
β βββ AppRoutes.tsx # Application routing
β βββ main.tsx # Application entry point
β βββ types.ts # TypeScript type definitions
β βββ global.css # Global styles
βββ .env.example # Environment variables template
βββ index.html # HTML entry point
βββ package.json
βββ tailwind.config.js # TailwindCSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
The frontend communicates with the backend through the following API modules:
useCreateMyUser()- Create a new user profileuseUpdateMyUser()- Update user profile informationuseGetMyUser()- Fetch current user profile
useCreateMyRestaurant()- Create a new restaurantuseGetMyRestaurant()- Fetch restaurant owner's restaurantuseUpdateMyRestaurant()- Update restaurant detailsuseGetMyRestaurantOrders()- Fetch incoming orders
useSearchRestaurants()- Search restaurants by city with filtersuseGetRestaurant()- Get individual restaurant details
useCreateCheckoutSession()- Create Stripe checkout sessionuseGetMyOrders()- Fetch user's order history
| Script | Description |
|---|---|
npm run dev |
Start development server at http://localhost:5173 |
npm run build |
Build for production (runs TypeScript compiler and Vite build) |
npm run lint |
Run ESLint for code quality checks |
npm run preview |
Preview production build locally |
| Path | Component | Description | Protected |
|---|---|---|---|
/ |
HomePage |
Landing page with search | No |
/search/:city |
SearchPage |
Restaurant search results | No |
/detail/:restaurantId |
DetailPage |
Restaurant menu and ordering | No |
/auth-callback |
AuthCallbackPage |
Auth0 callback handler | No |
/user-profile |
UserProfilePage |
User profile management | β Yes |
/order-status |
OrderStatusPage |
Order history and tracking | β Yes |
/manage-restaurant |
ManageRestaurantPage |
Restaurant owner dashboard | β Yes |
Contributions are welcome! Please follow these steps:
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- shadcn/ui - Beautiful UI components
- Auth0 - Authentication and authorization
- Stripe - Payment processing
- TailwindCSS - Utility-first CSS framework
- Vite - Next generation frontend tooling
Made with β€οΈ for food lovers everywhere
β Star this repository if you found it helpful!








