Backend system for a platform connecting users with home-made-food chefs to order and manage meals.
- Users can view meals, add them to a cart, place orders, and track their status.
- Chefs can manage their meal listings, receive orders, and update order statuses.
- The system includes secure authentication, role-based access control, and OTP-based password recovery.
- User registration, login, logout with JWT
- OTP-based password reset flow
- Cart per user (add/remove/update meals)
- Order creation with total price auto-calculated
- Role-based access: users, chefs, admins
- Meal image uploads to Cloudinary
- Email notifications using Nodemailer
- Search by Image: upload an image to find visually similar meals
- Personalized Meal Recommendations: meals suggested automatically based on user's order history
- A user signs up, logs in, selects meals, adds them to cart, sets a delivery address, and places an order.
- A user reviews and rates a meal after receiving the order.
- A user updates their profile or deletes their account.
- A user forgets their password, resets it using OTP sent to their email.
- A user uploads an image of food to discover similar meals available in the platform.
- A user receives personalized meal recommendations based on their previous orders.
- A chef adds new meals and tracks incoming orders, updating their statuses.
The backend is RESTful and organized into logical modules.
All protected routes require JWT authentication and role-based access control.
POST /auth/login– Log in with email and passwordPATCH /auth/verify-email– Verify user or chef emailPOST /auth/send-otp– Send OTP to email for password resetPOST /auth/token– Refresh access tokenPATCH /auth/change-password– Change password using OTPPOST /auth/google– Login with GooglePOST /auth/facebook– Login with FacebookPOST /auth/signup-user– Register as userPOST /auth/signup-chef– Register as chef
POST /address– Add addressGET /address– Get all addresses for userPATCH /address– Update addressDELETE /address– Delete address
GET /meals– Get all mealsGET /meals/:id– Get single meal detailsPOST /meals/favorite– Add to favoritesGET /meals/favorites– Get favorite mealsDELETE /meals/favorite/:id– Remove from favorites
PUT /account/user/profile– Update profilePOST /account/user/follow-chef– Follow a chefGET /account/user/followed-chefs– Get followed chefsGET /account/user/chefs– Get all chefsGET /account/user/nearby-chefs– Get nearby chefs
PATCH /account/chef/email– Update emailDELETE /account/chef– Delete chef accountGET /account/chef/profile– Get chef profilePUT /account/chef/role– Switch user/chef rolePATCH /account/chef/password– Change password
POST /cart– Add meal to cartGET /cart– Get all cart itemsGET /cart/:id– Get specific cart itemPUT /cart/:id– Update cart itemDELETE /cart/:id– Delete meal from cartPUT /cart/checkout– Checkout cart (create order)DELETE /cart/admin-clear– Admin-only: clear user's cart
GET /orders/user– Get all orders for the userGET /orders/chef– Get all orders for the chefPUT /orders/accept/:id– Chef accepts an orderPUT /orders/status/:id– Chef updates order statusDELETE /orders/:id– Cancel order (user or chef)GET /orders/:id/full– Get full order with meals & detailsGET /orders/:id– Get basic order details
POST /reviews– Add or update reviewGET /reviews/meal/:mealId– Get reviews for a specific mealGET /reviews/:reviewId– Get a specific review by IDGET /reviews/user– Get all reviews written by the userDELETE /reviews/:id– Delete a review
POST /similar– Upload an image and receive visually similar meals.POST /get-recommended-meals– Get personalized meal recommendations based on user history.
These demos show backend-driven flows including authentication, cart management, address handling, meal reviews, image-based search, and personalized recommendations:
Explore and test the complete API using the Postman collection:
View Full API Documentation on Postman
This backend system was developed by: