Menu Management Backend

A Node.js backend for managing menu categories, subcategories, and items. Uses Express.js and MongoDB.

Installation

  1. Clone the repo:
    git clone [https://github.com/your-username/menu-management-backend.git](https://github.com/CodeAjay/Guestara-Backend-Assignment.git)
    cd guestara-backend-assignment
  2. Install dependencies:
    npm install
  3. Set up environment variables: Create a .env file:
    PORT=5000
    MONGODB_URI= your mongodb details
  4. Start the server:
    npm start

API Endpoints

  • Categories

    • POST /categories
    • GET /categories
    • GET /categories/:id
    • PUT /categories/:id
  • Subcategories

    • POST /subcategories/:categoryId
    • GET /subcategories
    • PUT /subcategories/:id
  • Items

    • POST /items
    • GET /items
    • GET /items/search?name=Espresso
    • PUT /items/:id

Documentation

Short Answers

  • Database: MongoDB for flexibility and scalability.
  • Learnings: API structuring, Mongoose relationships.
  • Challenges: Designing scalable schemas.
  • Improvements: Add authentication.

License

MIT License.

This version is straightforward and covers all the essential details without any unnecessary information.