{"id":18633548,"url":"https://github.com/jamalsoueidan/booking-api","last_synced_at":"2026-01-04T15:04:32.678Z","repository":{"id":151207725,"uuid":"621257101","full_name":"jamalsoueidan/booking-api","owner":"jamalsoueidan","description":"An Azure Functions application that contains all the booking APIs","archived":false,"fork":false,"pushed_at":"2024-07-14T16:12:59.000Z","size":4724,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T20:13:28.227Z","etag":null,"topics":["azure","azure-functions","mongodb","mongoose","openapi","shopify"],"latest_commit_sha":null,"homepage":"https://jamalsoueidan.github.io/booking-api/","language":"TypeScript","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/jamalsoueidan.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":"2023-03-30T09:53:10.000Z","updated_at":"2024-07-14T16:13:02.000Z","dependencies_parsed_at":"2023-10-16T06:56:49.563Z","dependency_job_id":"2d381eb7-2464-4e79-8579-cb856d2ef12d","html_url":"https://github.com/jamalsoueidan/booking-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamalsoueidan%2Fbooking-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamalsoueidan%2Fbooking-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamalsoueidan%2Fbooking-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamalsoueidan%2Fbooking-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamalsoueidan","download_url":"https://codeload.github.com/jamalsoueidan/booking-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244530994,"owners_count":20467388,"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","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":["azure","azure-functions","mongodb","mongoose","openapi","shopify"],"created_at":"2024-11-07T05:15:33.832Z","updated_at":"2026-01-04T15:04:32.614Z","avatar_url":"https://github.com/jamalsoueidan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Booking Api\n\nThe Booking API is built on top of the Shopify GraphQL API. We are reducing the number of calls to the Booking API by saving a lot of documents from MongoDB into Shopify metafields. This approach allows us to take advantage of Shopify as a hosting provider.\n\nUser documents are saved in Shopify user metafields.\nProducts are stored in the corresponding product metafields.\nLocations will also be saved soon.\n\nFor each user, we create a new collection that contains all their services. We also create products that users can duplicate. These products come pre-set with metafields and are ready to be modified. Additionally, we have organized products into specific collections; for example, the \"Hairstylist\" collection includes services related to hairstyling.\n\nTODO:\n\n- We need to move the **booking time** to the browser, returning only the booked time range.\n\n## Setup\n\n_The guide is not complete, since there is some metafields that needs to be setup in each product._\n\n## 1. Edit local.settings.json.example\n\nAssign the correct value to all env values and rename to local.settings.json\n\n## 2. Add Carrier\n\nYou have to add carrier service to shopify, so it can calculate location distance.\n\nPOST https://{shop}.myshopify.com/admin/api/2022-10/carrier_services.json\n\n```json\n{\n  \"carrier_service\": {\n    \"name\": \"Beauty Shipping\",\n    \"callback_url\": \"https://{apiURL}/api/shipping/rates\",\n    \"service_discovery\": true\n  }\n}\n```\n\nThen you need to add the carrier in the \"Shipping and delivery\" inside shopify Settings\nhttps://admin.shopify.com/store/{shopName}/settings\n\n## 3. Add Webhooks\n\nYou need to create webhooks callback in the notifications.\nhttps://admin.shopify.com/store/bysistersdk/settings/notifications (scroll bottom on notification page, click webhooks)\n\n_Order update:_\nhttps://{apiUrl}/api/webhooks/order\n\n_Crder creation:_\nhttps://{apiUrl}/api/webhooks/order\n\n_Product update:_\nhttps://{apiUrl}/api/webhooks/product\n\n## OpenAPI fragments and components (openapi/)\n\nThese files are part of the OpenAPI definition but not yet bundled together. These individual files contain different parts of the API specification, such as paths, schemas, or security definitions. These components are organized in a modular way, making it easier to maintain and update the API documentation.\n\n### Bundle openapi\n\nnpm run bundle\n\n## Github Actions\n\n### pull request\n\n1. Running all specs (jest)\n\n### main branch\n\n1. Bundle openapi fragments and generating the api documentation page\n2. Deploy docs folder to pages\n3. Deploy Azure functions to production\n\n## Postman\n\nIn case you need to import openapi def in postman you can use this script to set token in your env after login.\n\nPlease create new environment or else below code will not work.\n\n```js\nlet responseJson = pm.response.json();\nlet token = responseJson.payload.token;\npm.environment.set(\"bearerToken\", token);\n```\n\n## Index.ts\n\nWe try to NOT export all internal files from index folder file because we would like to mock single methods in jest.\nIt's eaiser when not using index file.\n\n## What's included\n\n- Azure Functions\n- Azure Durable\n- Google Map\n- Shopify Api\n- Mongoose (MongoDB)\n- Zod (validation)\n- DateFns\n- Openapi\n- Orval\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamalsoueidan%2Fbooking-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamalsoueidan%2Fbooking-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamalsoueidan%2Fbooking-api/lists"}