Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmcd/pwa-demo
Progressive Web App Demo using Rails and React
https://github.com/dmcd/pwa-demo
devise multi-user pwa rails react service-worker todolist webpush
Last synced: 3 months ago
JSON representation
Progressive Web App Demo using Rails and React
- Host: GitHub
- URL: https://github.com/dmcd/pwa-demo
- Owner: dmcd
- Created: 2019-08-31T01:00:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-25T09:34:08.000Z (over 4 years ago)
- Last Synced: 2024-05-29T00:23:24.984Z (5 months ago)
- Topics: devise, multi-user, pwa, rails, react, service-worker, todolist, webpush
- Language: Ruby
- Size: 891 KB
- Stars: 15
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Open-Source-Ruby-and-Rails-Apps - pwa-demo - Progressive Web App Demo using Rails and React 🔥 ✅ 🚀 (Happy Exploring 🤘)
README
# Progressive Web App Demo using Rails and React
A Todo List with simple multi-user editing using web-push.
![](demo.gif)
## Small caveat
[PushManager](https://developer.mozilla.org/en-US/docs/Web/API/PushManager) and [BroadcastChannel](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel) don't work on Safari yet:
## Setup
You need to generate your own VAPID keys for push notifications to work. See how to do it using the `web-push` library's [docs](https://github.com/web-push-libs/web-push#usage).
You need to set both `VAPID_PUBLIC_KEY` and `VAPID_PRIVATE_KEY` variables.
Dependencies:
- ruby
- bundle
- yarn
- node
- postgresqlTo setup, you need to:
```
bundle install
yarn install
rake db:create
rake db:migrate
```## Run
In development mode
```
rails s
```Locally in production mode (required to test service worker)
```
yarn run prod
```## Create a user
```
rails cirb(main):001:0> User.create(email: '[email protected]', password: 'password123')
```## Todo
- [ ] Offline support
## Credits
RailsConf 2018: PRPL on Rails (Pearl Latteier & Abraham Williams) http://bw.cm/prpl
JSConf 2019: Build Your first mobile & desktop app as a pwa (Noorulameen & Ritesh Mehrotra) https://github.com/pwa-workshop-2019/sg-clinics-v1