{"id":26714308,"url":"https://github.com/blockbusterdev/restaurant_menu_api","last_synced_at":"2026-04-09T20:03:38.509Z","repository":{"id":283015638,"uuid":"950262870","full_name":"blockbusterdev/restaurant_menu_api","owner":"blockbusterdev","description":"RMA - Restaurant Menu API","archived":false,"fork":false,"pushed_at":"2025-03-18T05:40:37.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T04:31:14.109Z","etag":null,"topics":["apollo-server-express","expressjs","jest","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/blockbusterdev.png","metadata":{"files":{"readme":"readme.md","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-03-17T22:19:36.000Z","updated_at":"2025-03-18T05:40:41.000Z","dependencies_parsed_at":"2025-03-18T06:42:46.075Z","dependency_job_id":null,"html_url":"https://github.com/blockbusterdev/restaurant_menu_api","commit_stats":null,"previous_names":["devtwinkler/restaurant_menu_api","blockbusterdev/restaurant_menu_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blockbusterdev/restaurant_menu_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2Frestaurant_menu_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2Frestaurant_menu_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2Frestaurant_menu_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2Frestaurant_menu_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockbusterdev","download_url":"https://codeload.github.com/blockbusterdev/restaurant_menu_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2Frestaurant_menu_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015283,"owners_count":26085683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["apollo-server-express","expressjs","jest","nodejs","supertest"],"created_at":"2025-03-27T13:19:09.804Z","updated_at":"2025-10-13T13:10:49.994Z","avatar_url":"https://github.com/blockbusterdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Restaurant Menu API (RMA)\n\n## Overview\nThe **Restaurant Menu API (RMA)** is a GraphQL-based API that provides menu data for various categories such as appetizers, entrees, sandwiches, salads, and tacos. It is built using **Apollo Server** with **Express.js** and can be easily tested using **Jest**.\n\nThis project allows users to query for menu data with GraphQL, and the responses include details such as the name, description, and price of each item.\n\n## Table of Contents\n- [Installation](#installation)\n- [File Structure](#file-structure)\n- [Starting the Server](#starting-the-server)\n- [Running Tests](#running-tests)\n- [GraphQL Queries](#graphql-queries)\n- [License](#license)\n\n## Installation\n\n1. Clone the repository to your local machine:\n\n```bash\ngit clone https://github.com/your-username/rma.git\n```\n\n2. Navigate to the project directory:\n\n```bash\ncd rma\n```\n\n3. Install dependencies:\n\n```bash\nnpm install\n```\n\n## File Structure\n\nThe project has the following directory structure:\n\n```\nrma/\n├── node_modules/         # Project dependencies (generated after npm install)\n├── test/                 # Test files\n│   └── index.test.js     # Test file for GraphQL queries\n├── model/                # Data model\n│   └── index.js          # Menu data and GraphQL types and resolvers\n│   └── seed.js           # Data in a Menu\n├── package.json          # Project metadata and scripts\n├── index.js              # Server entry point\n├── .env                  # Environment variables (optional)\n└── README.md             # Project documentation\n```\n\n### Key Files:\n- **`index.js`**: The entry point of the server. It initializes the Express app, sets up ApolloServer with GraphQL schema, and applies middleware.\n- **`test/index.test.js`**: Contains Jest tests to validate the GraphQL queries.\n- **`model/index.js`**: Contains the GraphQL types and resolvers.\n- **`model/seed.js`**: Contains menu data.\n\n## Starting the Server\n\nTo run the server in development mode using **Nodemon**, which automatically restarts on file changes:\n\n```bash\nnpm run dev\n```\n\nThis will start the server on `http://localhost:21413/graphql`, where you can interact with the GraphQL API.\n\nAlternatively, to start the server in production mode:\n\n```bash\nnpm start\n```\n\n## Running Tests\n\nTo run the tests for verifying GraphQL queries and API responses, use the following command:\n\n```bash\nnpm run test\n```\n\nThis will run **Jest** and execute the tests in the `test/index.test.js` file, verifying that the server returns the expected data for all menu categories (appetizers, entrees, sandwiches, salads, tacos).\n\n### Test Details:\n- The tests validate that the data returned for each menu category is an array.\n- Each menu item is verified to have the properties `name`, `description`, and `price`.\n\n## GraphQL Queries\n\nThe API supports the following GraphQL queries:\n\n### 1. **Get Appetizers**\n\n```graphql\nquery {\n  appetizers {\n    name\n    description\n    price\n  }\n}\n```\n\n### 2. **Get Entrees**\n\n```graphql\nquery {\n  entrees {\n    name\n    description\n    price\n  }\n}\n```\n\n### 3. **Get Sandwiches**\n\n```graphql\nquery {\n  sandwiches {\n    name\n    description\n    price\n  }\n}\n```\n\n### 4. **Get Salads**\n\n```graphql\nquery {\n  salads {\n    name\n    description\n    price\n  }\n}\n```\n\n### 5. **Get Tacos**\n\n```graphql\nquery {\n  tacos {\n    name\n    description\n    price\n  }\n}\n```\n\n## License\n\nThis project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockbusterdev%2Frestaurant_menu_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockbusterdev%2Frestaurant_menu_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockbusterdev%2Frestaurant_menu_api/lists"}