{"id":20493039,"url":"https://github.com/cloudboost/coupons","last_synced_at":"2025-07-19T15:03:56.088Z","repository":{"id":147446099,"uuid":"54716702","full_name":"CloudBoost/Coupons","owner":"CloudBoost","description":null,"archived":false,"fork":false,"pushed_at":"2016-04-05T13:34:37.000Z","size":3239,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-05T17:47:27.400Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/CloudBoost.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}},"created_at":"2016-03-25T12:14:32.000Z","updated_at":"2020-05-03T17:49:09.000Z","dependencies_parsed_at":"2023-05-30T20:15:45.596Z","dependency_job_id":null,"html_url":"https://github.com/CloudBoost/Coupons","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CloudBoost/Coupons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudBoost%2FCoupons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudBoost%2FCoupons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudBoost%2FCoupons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudBoost%2FCoupons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CloudBoost","download_url":"https://codeload.github.com/CloudBoost/Coupons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudBoost%2FCoupons/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265950321,"owners_count":23853739,"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":[],"created_at":"2024-11-15T17:32:34.993Z","updated_at":"2025-07-19T15:03:56.067Z","avatar_url":"https://github.com/CloudBoost.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coupons\n\nCoupons is a nodejs-angular app powered by [cloudboost.io](https://www.cloudboost.io) for creating discount coupons\n\n## Installation\n\nClone this project \n```bash\n$ git clone https://github.com/CloudBoost/Coupons.git\n```\nInstall all dependencies \n```bash\n$ cd Coupons\n$ npm install\n```\nThis coupon uses cloudboost database service.\n- Go to [cloudboost.io](htttps://dashboard.cloudboost.io)'s dashboard and create an app.\n- Click on 'App Keys' Button\n\n![AppId and AppKey](https://github.com/CloudBoost/Coupons/blob/master/screenshot/app.png)\n\n- Go to 'Manage App'.\n- Create a table 'Coupon'\n\nTable Schema\n- code - textdescription - text\n- percentage - boolean\n- amount - number\n- limit - number\n- validFrom - DateTime\n- validUntil - DateTime\n- redemCount - number\n\n```javascript\nCB.CloudApp.init('appId', 'appKey'); //replace appId and appKey with your app's appId and appKey\n```\n\n## Run\n```bash\n$ node server.js\n```\n[https://localhost:8000](https:localhost:8000)\n\n## APIs\n\nGenerate a random string for coupon code\n```javascript\n$http.get(\"/generate/code\"); //returns a string\n```\n\nApply a Coupon\n```javascript\n$http.post(\"/apply\", {\"couponId\":'ABCD234', \"amount\":1200}); //retruns total discount on 1500 for given coupon code.\n```\n\nRedeem a Coupon\n```javascript\n$http.post(\"/redeem\", {\"couponId\":'ABCD234', \"amount\":1200}); //retruns total discount on 1500 for given coupon code and also increase value of redeem count.\n```\nDelete a Coupon\n```javascript\n$http.post(\"/delete\", {\"couponId\":'ABCD234'});\n```\nGet List of Coupon\n```javascript\n$http.post(\"/couponlist\"); //returns list of coupons\n```\n\n## Screenshots\n![List of coupons](https://github.com/CloudBoost/Coupons/blob/master/screenshot/dashboard.png)\n![Creating coupons](https://github.com/CloudBoost/Coupons/blob/master/screenshot/newCoupon.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudboost%2Fcoupons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudboost%2Fcoupons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudboost%2Fcoupons/lists"}