{"id":18112056,"url":"https://github.com/philnash/ng-sms-messages","last_synced_at":"2025-07-03T15:37:43.115Z","repository":{"id":66250627,"uuid":"138262516","full_name":"philnash/ng-sms-messages","owner":"philnash","description":"An SMS application for Twilio, written with Angular and Service Workers","archived":false,"fork":false,"pushed_at":"2018-06-22T06:18:19.000Z","size":182,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T23:51:05.361Z","etag":null,"topics":["angular","angular5","background-sync","push-notifications","service-worker","sms","twilio","twilio-sms"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/philnash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-06-22T06:16:06.000Z","updated_at":"2025-03-20T13:41:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbb50aa4-a8e9-4dd4-b1db-4bf6f4c9cc87","html_url":"https://github.com/philnash/ng-sms-messages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/philnash/ng-sms-messages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fng-sms-messages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fng-sms-messages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fng-sms-messages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fng-sms-messages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philnash","download_url":"https://codeload.github.com/philnash/ng-sms-messages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fng-sms-messages/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263351240,"owners_count":23453436,"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":["angular","angular5","background-sync","push-notifications","service-worker","sms","twilio","twilio-sms"],"created_at":"2024-11-01T01:09:17.370Z","updated_at":"2025-07-03T15:37:43.107Z","avatar_url":"https://github.com/philnash.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web, Twilio and Service Worker powered SMS Messages app\n\nThis is an implementation of an SMS Messages app that you can use with a [Twilio](https://twilio.com) number, with a front end built with Angular 6, enhanced with Service Worker features.\n\nThis was the demo application used at Angular Conf Melbourne, for the talk [Service Worker - Beyond the cache](https://speakerdeck.com/philnash/service-workers-beyond-the-cache-angular-conf-australia).\n\n## Important code\n\n### Push Notifications\n\nCheck out the `settings.component.ts` for registering and unregistering for Push Notifications with the `swPush` service.\n\nFor sending Push Notifications, take a look at `server/routes/index.js`.\n\n### Background Sync\n\nCheck out the `message.service.ts` for registering for a sync event. And, once you have run `npm install` then `patch-package` will have updated `./node_modules/@angular/service-worker/ngsw-worker.js`. Or you can just look at the patch in `./patches/@angular/service-worker+6.0.5.patch`.\n\n## Running the application\n\nClone the repository and install dependencies:\n\n```bash\n$ git clone https://github.com/philnash/ng-sms-messages.git\n$ cd ng-sms-messages\n$ npm install\n```\n\nCopy `.env.example` to `.env` and fill in the your Twilio account credentials and the Twilio number you want to use. You can find your Account SID and Auth Token in your [Twilio account portal](https://www.twilio.com/user/account).\n\n```bash\n$ cp .env.example .env\n```\n\nYou also need to generate VAPID keys for your application. You can do so with:\n\n```bash\n$ npx web-push generate-vapid-keys\n```\n\nAdd the public key to your `src/environment.prod.ts` file.\n\nThen start the application. You can run it in development mode with\n\n```bash\n$ npm run dev\n```\n\nThis will start the front end on [http://localhost:4200](http://localhost:4200)\n\nTo use the service worker functionality, you need to create a production build and serve it. The script to perform this is:\n\n```bash\n$ npm run server\n```\n\nNavigate to [http://localhost:3000](http://localhost:3000) and you will see the application.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilnash%2Fng-sms-messages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilnash%2Fng-sms-messages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilnash%2Fng-sms-messages/lists"}