Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jalvarezz13/flask-graphql-pwa-boilerplate
Kickstart your Progressive Web App (PWA) development with this Flask-based GraphQL template.
https://github.com/jalvarezz13/flask-graphql-pwa-boilerplate
boilerplate flask graphql pwa python
Last synced: 2 days ago
JSON representation
Kickstart your Progressive Web App (PWA) development with this Flask-based GraphQL template.
- Host: GitHub
- URL: https://github.com/jalvarezz13/flask-graphql-pwa-boilerplate
- Owner: jalvarezz13
- License: mit
- Created: 2023-09-15T12:30:05.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-15T15:23:31.000Z (over 1 year ago)
- Last Synced: 2024-11-05T00:42:14.716Z (about 2 months ago)
- Topics: boilerplate, flask, graphql, pwa, python
- Language: HTML
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Flask GraphQL PWA Boilerplate 🚀📦
### Table of Contents
- [📢 What is _Flask GraphQL PWA Boilerplate_?](#-what-is-flask-graphql-pwa-boilerplate)
- [⚙️ Execution](#%EF%B8%8F-execution)
- [⭐ Current Features](#-current-features)## 📢 What is _Flask GraphQL PWA Boilerplate_?
The **Flask GraphQL PWA Boilerplate** is a template for building a **Progressive Web App (PWA)** using **Flask** and **GraphQL**. This template includes a base schema and a simple example of a book library. The app is also designed as a PWA, allowing it to be installed in a web browser and providing offline support.
Give it a try! 🚀
## ⚙️ Execution
To run the **Flask GraphQL PWA Boilerplate**, you can use `pipenv`. First, ensure you have `pipenv` installed. Then, navigate to the root directory of the project, where you can install the dependencies and activate the virtual environment using the following commands:
```bash
pipenv install
pipenv shell
```Finally, start the server by running:
```bash
python app.py
```## ⭐ Current features
The GraphQL schema, queries, and mutations are defined in the schema.py file. Currently, the following schema is defined:
```python
class Book(graphene.ObjectType):
id = graphene.ID()
title = graphene.String()
author = graphene.String()
isbn = graphene.String()
```You can query the list of books using the following GraphQL query:
```graphql
query {
books {
id
title
author
isbn
}
}
```Additionally, you can create a new book using the following GraphQL mutation:
```graphql
mutation {
createBook(title: "The Lord of the Rings", author: "J. R. R. Tolkien", isbn: "978-0544003415") {
book {
id
}
}
}
```The GraphiQL Playground for executing these operations is available at the `/graphql` endpoint [http://localhost:5000/graphql](http://localhost:5000/graphql).
Regarding the PWA features, the following are included, and you can install the app through your web browser:
- ✅ Service Worker
- ✅ Web App Manifest
- ✅ Offline supportSee browser support for PWAs [here](https://caniuse.com/serviceworkers).