Discover & Order Delicious Meals
FoodHub is a full-stack meal ordering platform where customers can discover meals from different food providers, place orders, track order status, and leave reviews.
The platform supports three different roles — Customer, Provider, and Admin — with role-based features and access control.
This repository contains the Frontend application of FoodHub.
| Resource | Link |
|---|---|
| 🎨 Frontend | FoodHub Frontend |
| ⚙️ Backend | FoodHub Backend API |
| 💻 Frontend Repository | FoodHub Frontend Repository |
| 🛠️ Backend Repository | FoodHub Backend Repository |
| 🎥 Demo Video | FoodHub Demo Video |
FoodHub provides a complete digital food ordering experience.
Customers can browse available meals, explore food providers, add meals to their cart, place Cash on Delivery orders, track their orders, and submit reviews.
Food providers can manage their menus and process incoming orders.
Administrators can manage users, orders, and food categories across the platform.
| Role | Description |
|---|---|
| 👤 Customer | Browse meals, manage cart, place orders, track orders, and leave reviews |
| 🍳 Provider | Manage menu items, view incoming orders, and update order status |
| 🛡️ Admin | Manage users, orders, and categories |
- Browse all available meals
- Browse food providers
- View individual meal details
- View provider profiles
- Explore provider menus
- Filter meals
- Responsive design
- Authentication pages
- Loading and error states
- Customer registration and login
- Browse meals
- Search/filter meals
- View meal details
- Add meals to cart
- Update cart quantities
- Remove items from cart
- Checkout
- Cash on Delivery ordering
- Provide delivery address
- View order history
- View individual order details
- Track order status
- Leave reviews
- Manage profile
- Provider registration and login
- Provider dashboard
- Create menu items
- Update menu items
- Delete menu items
- View provider menu
- View incoming orders
- Update order status
- Manage provider information
- Admin dashboard
- View all users
- View customers and providers
- Activate/suspend users
- View all orders
- Manage food categories
- Role-based access control
- Protected admin routes
| Technology | Purpose |
|---|---|
| Next.js | React framework and application routing |
| TypeScript | Type-safe development |
| Tailwind CSS | Styling and responsive UI |
| React | UI development |
| Better Auth | Authentication |
| Prisma | Backend database ORM |
| REST API | Frontend/backend communication |
The frontend communicates with a separate REST API built with:
- Node.js
- Express.js
- PostgreSQL
- Prisma ORM
👉 Check the backend repository for the complete backend implementation.
FoodHub follows a separated frontend/backend architecture.
┌─────────────────────┐
│ Customer │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Next.js │
│ Frontend │
└──────────┬──────────┘
│
REST API Calls
│
┌──────────▼──────────┐
│ Express Backend │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ PostgreSQL │
│ Database │
└─────────────────────┘
| Route | Description |
|---|---|
/ |
Homepage |
/meals |
Browse all meals |
/meals/:id |
Meal details |
/providers/:id |
Provider profile and menu |
/login |
Login |
/register |
Registration |
| Route | Description |
|---|---|
/cart |
Shopping cart |
/checkout |
Checkout and delivery information |
/orders |
Customer order history |
/orders/:id |
Order details and status |
/profile |
Customer profile |
| Route | Description |
|---|---|
/provider/dashboard |
Provider dashboard |
/provider/menu |
Manage menu |
/provider/orders |
Manage incoming orders |
| Route | Description |
|---|---|
/admin |
Admin dashboard |
/admin/users |
User management |
/admin/orders |
Order management |
/admin/categories |
Category management |
Register / Login
│
▼
Browse Meals
│
▼
View Meal Details
│
▼
Add to Cart
│
▼
Checkout
│
▼
Place Order
│
▼
Provider Receives Order
│
▼
PLACED
│
▼
PREPARING
│
▼
READY
│
▼
DELIVERED
│
▼
Leave Review
FoodHub uses the following order lifecycle:
┌─────────────┐
│ PLACED │
└──────┬──────┘
│
▼
┌─────────────┐
│ PREPARING │
└──────┬──────┘
│
▼
┌─────────────┐
│ READY │
└──────┬──────┘
│
▼
┌─────────────┐
│ DELIVERED │
└─────────────┘
OR
┌─────────────┐
│ CANCELLED │
└─────────────┘
FoodHub implements authentication and role-based authorization.
CUSTOMER
PROVIDER
ADMIN
Users receive access to different parts of the application depending on their assigned role.
For example:
Customer
└── /cart
└── /checkout
└── /orders
└── /profile
Provider
└── /provider/dashboard
└── /provider/menu
└── /provider/orders
Admin
└── /admin
└── /admin/users
└── /admin/orders
└── /admin/categories
Admin accounts are seeded in the database rather than being created through normal registration.
Customers can:
- Add meals to cart
- Increase/decrease quantity
- Remove meals
- Review cart subtotal
- Provide delivery information
- Place Cash on Delivery orders
FoodHub does not use an online payment gateway.
Cash on Delivery (COD)
The application includes user-friendly handling for common application states.
Loading indicators are displayed while:
- Fetching meals
- Fetching providers
- Fetching orders
- Submitting forms
- Performing CRUD operations
The frontend handles:
- Invalid form submissions
- Authentication errors
- Unauthorized access
- Failed API requests
- Missing resources
- Empty states
- Server errors
FoodHub is designed to work across:
- 📱 Mobile devices
- 📲 Tablets
- 💻 Laptops
- 🖥️ Desktop screens
The UI uses a consistent design system with reusable components, spacing, typography, and responsive layouts.
Follow the instructions below to run the frontend locally.
git clone https://github.com/Amitsengupta332/FoodHub_Assignment_Frontend.gitcd FoodHub_Assignment_Frontendnpm installCreate a .env.local file in the root directory.
NEXT_PUBLIC_API_URL=your_backend_api_urlReplace the value with your local or deployed backend URL.
Example:
NEXT_PUBLIC_API_URL=http://localhost:5000or the deployed backend API:
NEXT_PUBLIC_API_URL=https://food-hub-assignment.vercel.appEnvironment variable names may vary depending on the implementation. Check the source code for the exact variables required by the current version.
npm run devThe application will be available at:
http://localhost:3000
To create a production build:
npm run buildTo run the production build locally:
npm startThe frontend depends on the FoodHub backend REST API.
The backend is responsible for:
- Authentication
- User management
- Provider management
- Meal CRUD
- Category management
- Order creation
- Order management
- Order status updates
- Reviews
- Database operations
FoodHub includes dedicated interfaces for:
- Navigation
- Hero section
- Featured meals
- Food categories
- Provider/content sections
- Footer
Customers can explore available meals and discover food providers.
Customers can review selected meals and manage quantities before checkout.
Customers can view their previous orders and monitor their current order status.
Providers can manage their menu and process customer orders.
Administrators can manage users, orders, and categories.
FoodHub was developed as Assignment 4 — Full-Stack Project.
- Homepage with 4 meaningful sections
- Navbar and Footer
- Responsive UI/UX
- Consistent design
- 30 meaningful commits
- Frontend and backend development
- Error handling
- Loading states
- Role-based access control
- Admin account
- Customer functionality
- Provider functionality
- CRUD operations
- Live deployment
- Demo video
| Feature | Customer | Provider | Admin |
|---|---|---|---|
| Browse Meals | ✅ | ✅ | ✅ |
| View Providers | ✅ | ✅ | ✅ |
| Add to Cart | ✅ | ❌ | ❌ |
| Place Orders | ✅ | ❌ | ❌ |
| Track Orders | ✅ | ❌ | ❌ |
| Manage Meals | ❌ | ✅ | ❌ |
| Manage Provider Orders | ❌ | ✅ | ❌ |
| Manage Users | ❌ | ❌ | ✅ |
| Manage Categories | ❌ | ❌ | ✅ |
| View All Orders | ❌ | Own Orders | ✅ |
| Leave Reviews | ✅ | ❌ | ❌ |
Use the following credentials to access the admin dashboard:
Email: admin@foodhub.com
Password: admin1234
⚠️ These credentials are provided specifically for project demonstration and evaluation purposes.
Submitted At: 07:56 PM, 22nd February 2026
| Submission | Details |
|---|---|
| 🎨 Frontend Repository | FoodHub Frontend Repository |
| ⚙️ Backend Repository | FoodHub Backend Repository |
| 🌐 Frontend Live | FoodHub Frontend |
| 🚀 Backend Live | FoodHub Backend |
| 🎥 Demo Video | FoodHub Demo Video |
| 👤 Admin Email | admin@foodhub.com |
| 🔑 Admin Password | admin1234 |
For the complete backend implementation, database schema, API endpoints, Prisma configuration, and server-side logic:
👉 View FoodHub Backend Repository
Amit Sengupta
Full-Stack Web Developer
FoodHub — Full-Stack Meal Ordering Platform
Built with:
Next.js
TypeScript
Tailwind CSS
Node.js
Express.js
PostgreSQL
Prisma
This project was developed as part of the Next Level Web Development / Programming Hero Full-Stack Project — Assignment 4.
The goal of the project was to build a complete full-stack application with authentication, role-based authorization, CRUD operations, database integration, responsive UI, error handling, and production deployment.
Discover meals. Order easily. Manage everything in one place.