https://github.com/umluizlima/flask-pwa
A progressive webapp template.
https://github.com/umluizlima/flask-pwa
boilerplate flask flask-pwa heroku progressive-web-app pwa workbox
Last synced: 8 months ago
JSON representation
A progressive webapp template.
- Host: GitHub
- URL: https://github.com/umluizlima/flask-pwa
- Owner: umluizlima
- License: mit
- Created: 2018-05-16T20:10:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-24T04:21:54.000Z (about 3 years ago)
- Last Synced: 2024-07-31T19:34:55.484Z (over 1 year ago)
- Topics: boilerplate, flask, flask-pwa, heroku, progressive-web-app, pwa, workbox
- Language: JavaScript
- Homepage: https://flask-pwa.herokuapp.com/
- Size: 140 KB
- Stars: 154
- Watchers: 10
- Forks: 49
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask PWA
> A progressive webapp template.
Flask PWA is supposed to be a goto template when I start a new Flask project. It is constructed on a Model-Template-Controller perspective, which I find clear enough for my current projects.
You can check a live version at [Heroku](https://flask-pwa.herokuapp.com).
## Requirements
- [Python 3.10.0](https://realpython.com/intro-to-pyenv/)
## Features
* Blueprint oriented, Flask 1.0 project
* Instantly deployable on Heroku
* Off-the-shelf progressive web app behaviour
* Service worker based on Workbox
## Installation
```shell
> git clone https://github.com/umluizlima/flask-pwa
> cd flask-pwa
> make environment
> make install
```
## Usage
Due to the current Service Worker [specification](https://w3c.github.io/ServiceWorker/#secure-context), the web browser will only allow its registration if the application is served over **https, or on localhost** for development purposes.
This makes **nGrok** useful for testing the PWA functionality, as it allows you to expose localhost over the internet with **https** included.
### localhost
```shell
> make run
```
### nGrok
```shell
> make flask run
> ngrok http 80
```
## Deployment
### Heroku
The `app.json`, `Procfile`, and `runtime.txt` files on this repository are specific for deployment on [Heroku](https://www.heroku.com). It can be done by clicking the following button:
[](https://heroku.com/deploy)
## Links
- Repository: https://github.com/umluizlima/flask-pwa
- Issue tracker: https://github.com/umluizlima/flask-pwa/issues
- Inspiration and references:
- [Google's Seu Primeiro PWA](https://developers.google.com/web/fundamentals/codelabs/your-first-pwapp/?hl=pt-br)
- [Flask PWA demo](https://github.com/uwi-info3180/flask-pwa)
- [Google's Workbox](https://developers.google.com/web/tools/workbox/)
## Licensing
This project is licensed under MIT license.