{"id":18963732,"url":"https://github.com/telattar/simply-cafe","last_synced_at":"2026-04-10T12:31:51.221Z","repository":{"id":245945197,"uuid":"817979901","full_name":"telattar/simply-cafe","owner":"telattar","description":"Simple coffeeshop management system backend application using nodejs express and mongodb. Includes integration tests and jsDocs.","archived":false,"fork":false,"pushed_at":"2025-04-11T11:43:20.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T06:58:58.871Z","etag":null,"topics":["express","jest","jwt-authentication","mongodb","mongoose","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telattar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-06-20T21:16:43.000Z","updated_at":"2025-04-11T11:43:23.000Z","dependencies_parsed_at":"2024-06-25T00:24:27.271Z","dependency_job_id":"7e2b573d-9a6f-4ac4-85cf-2a089ccef28d","html_url":"https://github.com/telattar/simply-cafe","commit_stats":null,"previous_names":["telattar/simply-cafe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/telattar/simply-cafe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telattar%2Fsimply-cafe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telattar%2Fsimply-cafe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telattar%2Fsimply-cafe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telattar%2Fsimply-cafe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telattar","download_url":"https://codeload.github.com/telattar/simply-cafe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telattar%2Fsimply-cafe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31642728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: 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":["express","jest","jwt-authentication","mongodb","mongoose","nodejs","supertest"],"created_at":"2024-11-08T14:21:26.783Z","updated_at":"2026-04-10T12:31:51.202Z","avatar_url":"https://github.com/telattar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simply Cafe ☕\n\nA simple server-side application of a coffeeshop management system.\n\n## Tech Used\n\n![Node.js](https://img.shields.io/badge/Node%20js-339933?style=for-the-badge\u0026logo=nodedotjs\u0026logoColor=white)\n![Express.js](https://img.shields.io/badge/Express%20js-000000?style=for-the-badge\u0026logo=express\u0026logoColor=white)\n![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)\n![Jest](https://img.shields.io/badge/Jest-C21325?style=for-the-badge\u0026logo=jest\u0026logoColor=white)\n![JWT](https://img.shields.io/badge/JWT-000000?style=for-the-badge\u0026logo=JSON%20web%20tokens\u0026logoColor=white)\n\n## Features\n\n#### User Authentication\n\nSecure user registration and login functionality. **How?**\n\n- [Bcrypt](https://www.npmjs.com/package/bcrypt) is used to salt and hash the password during signup instead of using other encryption techniques.\n- Each authenticated user is given a signed JWT token at login.\n- User roles are checked at each endpoint to make sure users are **authorized** to do a specific action.\n\n#### Order Processing\n\nCRUD operations for managing coffee shop products and handling customer orders, including order creation, updating, and deletion. Please refer to the API Endpoints section for more information.\n\n#### Integration Testing\n\nComprehensive tests using Jest and Supertest.\n\n## API Endpoints Summary\n\nFor input/output details, refer to the description embedded above each function in any file inside the `controller` directiory.\n\n| Endpoint               | Method | Description                               |\n| ---------------------- | ------ | ----------------------------------------- |\n| /login                 | POST   | Logs in an existing user                  |\n| /signUp                | POST   | Registers a new user                      |\n| /logout                | POST   | Logs out the currently logged-in user     |\n| /item                  | POST   | Creates a new item                        |\n| /item/:id              | GET    | Retrieves details of a specific item      |\n| /item/:id              | PATCH  | Updates details of a specific item        |\n| /item/:id              | DELETE | Deletes a specific item                   |\n| /bundle                | POST   | Creates a new bundle                      |\n| /bundle/:id            | GET    | Retrieves details of a specific bundle    |\n| /bundle/:id            | PATCH  | Updates details of a specific bundle      |\n| /bundle/:id            | DELETE | Deletes a specific bundle                 |\n| /menu/item             | POST   | Adds an item to the menu                  |\n| /menu/bundle           | POST   | Adds a bundle to the menu                 |\n| /menu                  | GET    | Retrieves the entire menu                 |\n| /menu/item/:id/stock   | PATCH  | Updates the stock of an item in the menu  |\n| /menu/bundle/:id/stock | PATCH  | Updates the stock of a bundle in the menu |\n| /menu/item/:id         | DELETE | Removes an item from the menu             |\n| /menu/bundle/:id       | DELETE | Removes a bundle from the menu            |\n| /order                 | POST   | Creates a new order                       |\n| /order/:id             | GET    | Retrieves details of a customer's order   |\n| /order/:id/cancel      | PATCH  | Cancels a customer's order                |\n| /order/:id/complete    | PATCH  | Marks an order as complete                |\n\n## Installation\n\n1. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/telattar/simply-cafe.git\n   cd simply-cafe\n   ```\n\n2. **Install dependencies**:\n\n   ```bash\n   npm install\n   ```\n\n3. **Set up environment variables**:\n\n   Create a `.env` file in the root directory and add the variables provided in the `.env.sample` file. More details in the file itself.\n\n4. **Run the application**:\n\n   ```bash\n   npm start\n   ```\n\n5. **Run tests**: please make sure your terminal is at `src` directory.\n   ```bash\n   npx jest --node-options=--experimental-vm-modules --detectOpenHandles --verbose src/tests/TESTFILENAME.js\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelattar%2Fsimply-cafe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelattar%2Fsimply-cafe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelattar%2Fsimply-cafe/lists"}