FoodMate is a modern food ordering dashboard built with Next.js 15, gRPC, WebSocket (Socket.IO), and TanStack Query. It supports real-time order updates and data fetching from gRPC and local mock APIs.
- Frontend: Next.js 15+ (App Router), TypeScript, TailwindCSS
- gRPC Backend: Node.js with
@grpc/grpc-js - WebSocket: Socket.IO for real-time updates
- State Management: TanStack Query (React Query)
- Dockerized: Multi-service environment with Docker
- Mock Data: JSON files (Favorites, Orders, Menus)
- Form Validation: Zod & React Hook Form
- UI Components: TailwindCSS & ShadCN UI
/grpc-server - gRPC backend with mock data
/socket-server - WebSocket server with Socket.IO
/src/app/api - API routes that bridge frontend and gRPC/backend
/src/app/admin/dashboard - Admin dashboard interface
/src/app/dashboard - Main user dashboard
/src/lib - gRPC + WebSocket client setup
/public - Static assets
- 📦 gRPC Integration – Fetch orders & favorites using gRPC
- 🔁 WebSocket (Socket.IO) – Real-time updates for dashboard
- ⚡ TanStack Query – Cache and revalidate data efficiently
- 📦 Mock APIs – Load JSON data (orders, favorites, menus)
- 💅 Glassmorphism UI – Clean, modern, and responsive dashboard
- 🔢 Form Validation – Powered by Zod & React Hook Form
- 📏 Component UI – Built using TailwindCSS and ShadCN
git clone https://github.com/yourusername/foodmate.git
cd foodmatecd grpc-server
npm install
npm run devcd ../socket-server
npm install
npm run devcd ..
npm install
npm run dev-
Login as Admin:
- Email:
admin@foodmate.com - Password:
admin123
- Email:
-
Register as Customer, then login with the registered credentials.
-
Now the customer can access the dashboard and features.
Build and run all services using Docker:
make docker-build-clean-prod # First time build
make docker-build-prod # For subsequent updatesEnsure Docker is running and internet connectivity is available during image pulls.
Located in: grpc-server/mock
favorites.jsonorders.json
| Event Name | Payload Example | Description |
|---|---|---|
order-updated |
Array<Order> |
Broadcast updated orders |
favorites-updated |
Array<FavoriteRestaurant> |
Broadcast favorites |
View your orders and favorite restaurants in real time!
- Email: dehyafullstack@gmail.com
- LinkedIn: linkedin.com/in/dehyabi
- GitHub: github.com/dehyabi
MIT © 2025 FoodMate