{"id":24452669,"url":"https://github.com/hareem-gohar/recipe-management-api","last_synced_at":"2026-04-07T23:31:22.209Z","repository":{"id":273072798,"uuid":"918627166","full_name":"Hareem-Gohar/Recipe-Management-API","owner":"Hareem-Gohar","description":"Recipe Management API built with Node.js, Express, and MongoDB, allowing users to manage recipes, blogs, leave comments, rate dishes, and add favorites. It features secure authentication, role-based access, and an admin dashboard for recipe and blog management.","archived":false,"fork":false,"pushed_at":"2025-01-18T12:50:09.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T06:29:27.524Z","etag":null,"topics":["bycryptjs","dotenv","expressjs","jest","jwt-token","mongo-memory-server","mongodb","moongose","nodejs","supertest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hareem-Gohar.png","metadata":{"files":{"readme":"Readme.html","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-18T12:42:58.000Z","updated_at":"2025-01-18T12:53:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ec0d081-bd9a-42af-83a8-304ef66087da","html_url":"https://github.com/Hareem-Gohar/Recipe-Management-API","commit_stats":null,"previous_names":["hareem-gohar/recipe-management-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hareem-Gohar/Recipe-Management-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hareem-Gohar%2FRecipe-Management-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hareem-Gohar%2FRecipe-Management-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hareem-Gohar%2FRecipe-Management-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hareem-Gohar%2FRecipe-Management-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hareem-Gohar","download_url":"https://codeload.github.com/Hareem-Gohar/Recipe-Management-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hareem-Gohar%2FRecipe-Management-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bycryptjs","dotenv","expressjs","jest","jwt-token","mongo-memory-server","mongodb","moongose","nodejs","supertest"],"created_at":"2025-01-21T01:16:41.840Z","updated_at":"2026-04-07T23:31:22.204Z","avatar_url":"https://github.com/Hareem-Gohar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE html\u003e\n        \u003chtml\u003e\n        \u003chead\u003e\n            \u003cmeta charset=\"UTF-8\"\u003e\n            \u003ctitle\u003eBackend Application\u003c/title\u003e\n            \u003cstyle\u003e\n/* From extension vscode.github */\n/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.vscode-dark img[src$=\\#gh-light-mode-only],\n.vscode-light img[src$=\\#gh-dark-mode-only],\n.vscode-high-contrast:not(.vscode-high-contrast-light) img[src$=\\#gh-light-mode-only],\n.vscode-high-contrast-light img[src$=\\#gh-dark-mode-only] {\n\tdisplay: none;\n}\n\n\u003c/style\u003e\n            \n        \u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css\"\u003e\n\u003cstyle\u003e\n            body {\n                font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;\n                font-size: 14px;\n                line-height: 1.6;\n            }\n        \u003c/style\u003e\n        \u003cstyle\u003e\n.task-list-item {\n    list-style-type: none;\n}\n\n.task-list-item-checkbox {\n    margin-left: -20px;\n    vertical-align: middle;\n    pointer-events: none;\n}\n\u003c/style\u003e\n\u003cstyle\u003e\n:root {\n  --color-note: #0969da;\n  --color-tip: #1a7f37;\n  --color-warning: #9a6700;\n  --color-severe: #bc4c00;\n  --color-caution: #d1242f;\n  --color-important: #8250df;\n}\n\n\u003c/style\u003e\n\u003cstyle\u003e\n@media (prefers-color-scheme: dark) {\n  :root {\n    --color-note: #2f81f7;\n    --color-tip: #3fb950;\n    --color-warning: #d29922;\n    --color-severe: #db6d28;\n    --color-caution: #f85149;\n    --color-important: #a371f7;\n  }\n}\n\n\u003c/style\u003e\n\u003cstyle\u003e\n.markdown-alert {\n  padding: 0.5rem 1rem;\n  margin-bottom: 16px;\n  color: inherit;\n  border-left: .25em solid #888;\n}\n\n.markdown-alert\u003e:first-child {\n  margin-top: 0\n}\n\n.markdown-alert\u003e:last-child {\n  margin-bottom: 0\n}\n\n.markdown-alert .markdown-alert-title {\n  display: flex;\n  font-weight: 500;\n  align-items: center;\n  line-height: 1\n}\n\n.markdown-alert .markdown-alert-title .octicon {\n  margin-right: 0.5rem;\n  display: inline-block;\n  overflow: visible !important;\n  vertical-align: text-bottom;\n  fill: currentColor;\n}\n\n.markdown-alert.markdown-alert-note {\n  border-left-color: var(--color-note);\n}\n\n.markdown-alert.markdown-alert-note .markdown-alert-title {\n  color: var(--color-note);\n}\n\n.markdown-alert.markdown-alert-important {\n  border-left-color: var(--color-important);\n}\n\n.markdown-alert.markdown-alert-important .markdown-alert-title {\n  color: var(--color-important);\n}\n\n.markdown-alert.markdown-alert-warning {\n  border-left-color: var(--color-warning);\n}\n\n.markdown-alert.markdown-alert-warning .markdown-alert-title {\n  color: var(--color-warning);\n}\n\n.markdown-alert.markdown-alert-tip {\n  border-left-color: var(--color-tip);\n}\n\n.markdown-alert.markdown-alert-tip .markdown-alert-title {\n  color: var(--color-tip);\n}\n\n.markdown-alert.markdown-alert-caution {\n  border-left-color: var(--color-caution);\n}\n\n.markdown-alert.markdown-alert-caution .markdown-alert-title {\n  color: var(--color-caution);\n}\n\n\u003c/style\u003e\n        \n        \u003c/head\u003e\n        \u003cbody class=\"vscode-body vscode-light\"\u003e\n            \u003cp\u003eHere's an improved version of your \u003ccode\u003eREADME.md\u003c/code\u003e with a Table of Contents (TOC), better structure, and enhanced readability:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-markdown\"\u003e\u003cspan class=\"hljs-section\"\u003e# Backend Application\u003c/span\u003e\n\nThis is the backend application for managing recipes, users, comments, favorites, ratings, and blogs. The application is built using \u003cspan class=\"hljs-strong\"\u003e**Node.js**\u003c/span\u003e, \u003cspan class=\"hljs-strong\"\u003e**Express**\u003c/span\u003e, and \u003cspan class=\"hljs-strong\"\u003e**MongoDB**\u003c/span\u003e. It includes authentication and authorization features, making it secure and scalable.\n\n\u003cspan class=\"hljs-section\"\u003e## Table of Contents\u003c/span\u003e\n\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eFeatures\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#features\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eTech Stack\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#tech-stack\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eProject Structure\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#project-structure\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eGetting Started\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#getting-started\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003ePrerequisites\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#prerequisites\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eInstallation\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#installation\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eRunning the Server\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#running-the-server\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eRunning Tests\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#running-tests\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eAPI Endpoints\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#api-endpoints\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003ePublic Endpoints\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#public-endpoints\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eProtected Endpoints\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#protected-endpoints\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eAdmin Endpoints\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#admin-endpoints\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eMiddleware\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#middleware\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eTesting with MongoMemoryServer\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#testing-with-mongodb-memory-server\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eLicense\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#license\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eAuthor\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#author\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eContributions\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#contributions\u003c/span\u003e)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e [\u003cspan class=\"hljs-string\"\u003eContact\u003c/span\u003e](\u003cspan class=\"hljs-link\"\u003e#contact\u003c/span\u003e)\n\n\u003cspan class=\"hljs-section\"\u003e## Features\u003c/span\u003e\n\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Recipe Management**\u003c/span\u003e: Add, update, delete, and fetch recipes.\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**User Management**\u003c/span\u003e: Handle user registration, authentication, and roles (user/admin).\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Comments System**\u003c/span\u003e: Enable users to comment on recipes.\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Favorites**\u003c/span\u003e: Allow users to mark recipes as favorites.\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Ratings**\u003c/span\u003e: Enable users to rate recipes.\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Blogs**\u003c/span\u003e: Manage blog posts related to recipes.\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Secure Routes**\u003c/span\u003e:\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e Protected routes for authenticated users.\n\u003cspan class=\"hljs-bullet\"\u003e  -\u003c/span\u003e Admin-specific routes for managing sensitive resources.\n\n\u003cspan class=\"hljs-section\"\u003e## Tech Stack\u003c/span\u003e\n\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Backend Framework**\u003c/span\u003e: Node.js with Express\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Database**\u003c/span\u003e: MongoDB (with \u003cspan class=\"hljs-code\"\u003e`mongoose`\u003c/span\u003e for schema modeling)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Authentication**\u003c/span\u003e: JSON Web Tokens (JWT)\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Environment Variables**\u003c/span\u003e: \u003cspan class=\"hljs-code\"\u003e`dotenv`\u003c/span\u003e\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**Testing**\u003c/span\u003e: Jest and Supertest\n\u003cspan class=\"hljs-bullet\"\u003e-\u003c/span\u003e \u003cspan class=\"hljs-strong\"\u003e**In-Memory Database for Testing**\u003c/span\u003e: MongoMemoryServer\n\n\u003cspan class=\"hljs-section\"\u003e## Project Structure\u003c/span\u003e\n\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003ebackend/\n├── src/\n│   ├── controllers/         # Functions for handling routes\n│   │   └── urlController.js\n│   ├── models/              # Mongoose models\n│   │   └── urlModel.js\n│   ├── routes/              # Route definitions\n│   │   └── urlRoutes.js\n│   ├── utils/               # Utility functions\n│   │   └── validateUrl.js\n│   ├── config/              # Configuration files\n│   │   └── db.js\n│   ├── app.js               # Express app setup\n│   └── server.js            # Entry point\n├── Middleware/              # Authentication middleware\n│   ├── AuthMiddleware.js\n│   ├── AdminAuthMiddleware.js\n├── Routes/                  # Application routes\n│   ├── RecipeRoutes.js\n│   ├── userRoutes.js\n│   ├── CommentRoutes.js\n│   ├── FavoriteRoutes.js\n│   ├── RatingRoutes.js\n│   └── BlogRoutes.js\n├── .env                     # Environment variables\n├── package.json             # Project dependencies\n├── jest.setup.js            # Jest configuration\n└── \u003ca href=\"http://README.html\"\u003eREADME.md\u003c/a\u003e                # Documentation\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v16+)\n- MongoDB (local or cloud instance)\n- `npm` (or `yarn`)\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/your-repo/backend.git\n   cd backend\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003e\n\u003cp\u003eInstall dependencies:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003enpm install\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eCreate a \u003ccode\u003e.env\u003c/code\u003e file in the root directory and configure the following variables:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-env\"\u003ePORT=8000\nMONGO_URI=your_mongodb_connection_string\nJWT_SECRET=your_jwt_secret\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eStart the server in development mode:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003enpm start\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch3 id=\"running-the-server\"\u003eRunning the Server\u003c/h3\u003e\n\u003cp\u003eFor production:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003enpm run start:prod\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch3 id=\"running-tests\"\u003eRunning Tests\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003eRun unit tests using Jest:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003enpm \u003cspan class=\"hljs-built_in\"\u003etest\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"api-endpoints\"\u003eAPI Endpoints\u003c/h2\u003e\n\u003ch3 id=\"public-endpoints\"\u003ePublic Endpoints\u003c/h3\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eEndpoint\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e/api/recipes\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eFetch all recipes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e/api/users/register\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eRegister a new user\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch3 id=\"protected-endpoints\"\u003eProtected Endpoints\u003c/h3\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eEndpoint\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e/api/favorites\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eAdd a recipe to favorites\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e/api/comments/:recipeId\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eFetch comments for a recipe\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch3 id=\"admin-endpoints\"\u003eAdmin Endpoints\u003c/h3\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eEndpoint\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eDELETE\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e/api/recipes/:id\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eDelete a recipe\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e/api/blogs\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eCreate a new blog post\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2 id=\"middleware\"\u003eMiddleware\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003e\u003ccode\u003eAuthMiddleware\u003c/code\u003e\u003c/strong\u003e: Protects routes by verifying the JWT token.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e\u003ccode\u003eAdminAuthMiddleware\u003c/code\u003e\u003c/strong\u003e: Ensures only admin users access certain routes.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"testing-with-mongomemoryserver\"\u003eTesting with MongoMemoryServer\u003c/h2\u003e\n\u003cp\u003eThis project uses \u003cstrong\u003eMongoMemoryServer\u003c/strong\u003e to spin up an in-memory MongoDB instance for testing purposes. MongoMemoryServer allows you to test the functionality of your routes without requiring a real MongoDB instance.\u003c/p\u003e\n\u003ch3 id=\"running-tests-1\"\u003eRunning Tests\u003c/h3\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eInstall Jest and Supertest:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003enpm install --save-dev jest supertest\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eRun tests:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003enpm \u003cspan class=\"hljs-built_in\"\u003etest\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"license\"\u003eLicense\u003c/h2\u003e\n\u003cp\u003eThis project is licensed under the MIT License. See the LICENSE file for details.\u003c/p\u003e\n\u003ch2 id=\"author\"\u003eAuthor\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eHareem Gohar\u003c/strong\u003e\u003cbr\u003e\nAn experienced frontend and backend developer passionate about scalable and efficient web applications.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"contributions\"\u003eContributions\u003c/h2\u003e\n\u003cp\u003eContributions are welcome! Feel free to open issues or submit pull requests to enhance this project.\u003c/p\u003e\n\u003ch2 id=\"contact\"\u003eContact\u003c/h2\u003e\n\u003cp\u003eFor any queries or support, contact me at [your-email@example.com].\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e\n### Improvements:\n- Added a **Table of Contents** to allow easy navigation.\n- Enhanced readability by breaking up large chunks of text into smaller, digestible sections.\n- Improved formatting for the API endpoints section with a clean, responsive table structure.\n- Included a **Testing** section with clearer instructions.\n- Cleaned up some of the descriptions and formatted them to enhance clarity.\n\nThis structure should give your repo a polished, professional feel. You can add your personal contact and any other relevant details.\u003c/code\u003e\u003c/pre\u003e\n\n            \n            \n        \u003c/body\u003e\n        \u003c/html\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhareem-gohar%2Frecipe-management-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhareem-gohar%2Frecipe-management-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhareem-gohar%2Frecipe-management-api/lists"}