CRY-D / ignite-pdf-watermarker

flask saas app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample SaaS Boilerplate for Flask

This is a demo app for FlaskCon 2021, based off of the Flask Ignite boilerplate.

Setup

Usage of Python 3 is required. It can be installed on Python.org

# Optional but recommended:
python3 -m venv env; source env/bin/activate

pip install -r requirements.txt
./manage.py server # or `FLASK_APP=manage FLASK_ENV=development flask run`

Running

# Development
# If using a virtual env: source env/bin/activate
./manage.py resetdb
# ^ to seed data


# Go to localhost:5000 in a browser and click on Login
# Login with the following credentials "user@example.com", "test

# Production documentation in the repository.

Testing

Github Actions is configured to run tests and produce code coverage metrics.

To run tests locally, try this command:

APPNAME_ENV=test ./manage.py test --coverage

Local Secrets

To configure OAuth login and Stripe billing in development, you will need to set some environment variables. See .env.local.sample for an example.

cp .env.local.sample .env.local
# Edit .env.local with your Stripe & Google test keys
source .env.local
flask run

You may also want to change some of the constants in appname.constants

Deployment

Ignite is not tied to a specific platform for deployment, but it works well on Heroku and Dokku with minimal configuration.

It is also designed to work well on other cloud providers such as AWS, Google Cloud, and DigitalOcean.

Documentation is currently provided for installations on Dokku.

License

You may use this project for non commericial projects.

For more detailed license information see LICENSE.md

Credits

Design elements from tabler & Bootstrap 4.

Built off of Flask Foundation and the bootstrapy project

Extra Reading

Only building out an API using Flask?

Course: Fullstack Flask: Build a SaaS using Python and Flask

Best practices List:

About

flask saas app

License:Other


Languages

Language:CSS 44.3%Language:HTML 29.8%Language:Python 23.9%Language:JavaScript 1.7%Language:Makefile 0.1%Language:Mako 0.1%Language:Dockerfile 0.1%