This is a backend-only application to manage users, restaurants, orders, and real-time order status.
- Node.js
- Expressjs
- MongoDB
- Clone the repository
- Install dependencies:
npm install
- Set up your environment variables in a
.env
file - Start MongoDB server
- Start the app:
npm run dev
- Use Postman or any API client to interact with the API
POST /api/register
: Register a new userPOST /api/login
: Login and get JWT token
GET /api/profile
: Get user profile (requires JWT)PUT /api/profile
: Update user profile (requires JWT)PUT /api/profile/address
: adds new address user profile (requires JWT)
POST /api/restaurants
: Create a new restaurantPUT /api/restaurants/:restaurantId
: Update restaurant detailsPOST /api/restaurants/:restaurantId/menu
: Add a menu itemPUT /api/restaurants/:restaurantId/menu/:itemId
: Update a menu item
POST /api/orders
: Place a new order (requires JWT)GET /api/orders/:orderId
: Get order details (requires JWT)PUT /api/orders/:orderId/status
: Update order status (requires JWT)GET /api/orders
: List user orders (requires JWT)
you can find more details and examples in this documention