How parvez141300/foodhub-client-app-a-4 works
FoodHub is a role-based meal marketplace: customers browse meals, manage carts and wishlists, place and track orders, and review meals; providers manage meals and incoming orders; admins manage users, categories, cuisines, dietaries, and all orders. The Next.js pages and dashboards invoke server actions and services, which communicate with separate backend and authentication services. The map preserves these documented capabilities, but several dashboard and action implementations were not sampled, so their internal call links are omitted.
Main entry points: services Domain services · page.tsx Meal details · (commonLayout) Public pages · customer-dashboard Customer dashboard
Components 18
Marketplace experience
- Public pages
src/app/(commonLayout) - Meal details
src/app/(commonLayout)/meals/[id]/page.tsx - Login and register
src/app/(commonLayout)/(auth)
Role dashboards
- Customer dashboard
src/app/(dashboardLayout)/@customer/customer-dashboard - Provider dashboard
src/app/(dashboardLayout)/@provider/provider-dashboard - Admin dashboard
src/app/(dashboardLayout)/@admin/admin-dashboard
Application services
- Cart actions
src/actions/cart.action.ts - Meal actions
src/actions/meal.action.ts - Wishlist actions
src/actions/wishlist.action.ts - Review actions
src/actions/review.action.ts - User actions
src/actions/user.action.ts - Order actions
src/actions/order.action.ts - Domain services
src/services
External services
- FoodHub backend
- Authentication service
Other components
- Customer
- Provider
- Admin
Connections 19
- Customer → Login and register: registers or logs in
- Customer → Public pages: browses meals
- Public pages → Meal details: opens meal
src/app/(commonLayout)/page.tsx - Meal details → Meal actions: loads meal
src/app/(commonLayout)/meals/[id]/page.tsx - Meal details → User actions: gets session
src/app/(commonLayout)/meals/[id]/page.tsx - Meal details → Cart actions: adds to cart
src/app/(commonLayout)/meals/[id]/page.tsx - Meal details → Wishlist actions: adds to wishlist
src/app/(commonLayout)/meals/[id]/page.tsx - Meal details → Review actions: reads and submits
src/app/(commonLayout)/meals/[id]/page.tsx - Customer → Customer dashboard: manages shopping
- Customer dashboard → Order actions: places and tracks orders
- Provider → Provider dashboard: manages meals and orders
- Admin → Admin dashboard: manages users and catalog
- Cart actions → Domain services: delegates
src/actions/cart.action.ts - Meal actions → Domain services: delegates
src/actions/meal.action.ts - Wishlist actions → Domain services: delegates
src/actions/wishlist.action.ts - Review actions → Domain services: delegates
src/actions/review.action.ts - User actions → Domain services: delegates
src/actions/user.action.ts - Domain services → FoodHub backend: requests domain data
src/services/meal.service.ts - Domain services → Authentication service: checks session
src/services/user.service.ts