GithubHelp home page GithubHelp logo

sumukh / ignite Goto Github PK

View Code? Open in Web Editor NEW
175.0 4.0 42.0 7.94 MB

A comprehensive Flask boilerplate to build SaaS applications that includes Stripe billing, emails, login, and OAuth.

Home Page: https://www.newline.co/fullstack-flask/

License: Other

Makefile 0.11% Python 19.91% CSS 37.63% HTML 39.91% Mako 0.10% JavaScript 1.40% Dockerfile 0.05% Procfile 0.02% Jinja 0.86%
flask scaffolding starter template python3 python bootstrap foundation framework login stripe admin boilerplate boilerplate-template

ignite's Introduction

Ignite

Ignite for Flask Flask PyTest CI

Ignite is a scaffold for starting new Flask applications. It takes care of the boilerplate code (like User Registration, OAuth, Teams, and Billing), allowing you to focus on building your application. Ignite is built upon best practices for modern Flask applications.

Features

Features Status Details
User Authentication User Login, Registration, Forgot Password, Email Confirmation
OAuth Login Login or Register with Google, Twitter, Facebook, etc.
Teams/Groups Multi user teams & groups (with Invite Emails)
User Export & Deletion Request Allows users to export their data (for GDPR compliance)
API API (with user tokens) users to access data
Stripe Product Checkout One time item purchases with credit cards and receipts (using Stripe)
Heroku/Docker Deployment Deployment instructions for some platforms. Works on AWS & Google Cloud
Send Emails Send email notifications from the application
Admin Dashboard Admin dashboard to edit data
File Uploads File uploads to cloud storage providers
Basic Test Suite Starting point for you to build out tests
VS Code Debugger & Editor Configured to make you productive
Tested on Windows 10, OSX, and Ubuntu Using Python 3
SaaS Recurring Billing 💲 (Requires purchasing a license to Ignite) Team Billing, Usage Based Billing or Unlimited Plans
Commercial Usage 💲 (License Required) Commercial Usage requires a purchased license
Video Content 💲 Available as part of the Fullstack Flask course

How to Buy

Store Comes With Price
Fullstack Flask Course The Fullstack Flask Course & Book, hours of videos explaining how to build a SaaS in Flask, and a single license to Ignite Pro On Sale (for ~$199) at Newline »
Commercial License A license for usage on a single site ($199) »

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
FLASK_APP=manage FLASK_ENV=development flask run

# Go to localhost:5000 in a browser and click on Login
# Login with the following credentials "[email protected]", "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.

Stripe Webhooks Locally

  • Install the Stripe CLI
  • Login to the Stripe CLI (stripe login)
  • Run stripe listen --forward-to localhost:5000/webhooks/stripe
  • Use the webhook secret and configure your app to use it (export STRIPE_WEBHOOK_SECRET=whsec_...)
  • To replay an event in a seperate console: stripe events resend evt_XYZ

Screenshots

Screenshot Name
Login / Signup / OAuth / Password Reset login
Dashboard Dashboard
Saas Subscription Billing + Console Billing
Teams Team
GDPR/Legal GDPR
Admin Admin
API Tokens API
Delayed Jobs Jobs
Emails Emails
File Uploads Files
Stripe Customer Portal Integration Stripe

License

This is a commercial product. You may purchase a license for commercial use at Ignite Website

Here's a summary:

Features Ignite (License) Ignite Premium
Cost Free $199 per site
Private Non Commercial Use
Commercial Use No
Ability to remove "Powered by Ignite" footer No
Video Tutorials No
Re-license No Contact us
Support No No
Warranty Provided As-is Provided As-is
Refunds N/A 30 Day

You can purchase a license at the Ignite Store or on Newline as part of the Fullstack Flask course

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:

ignite's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar sumukh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ignite's Issues

jinja2.exceptions.UndefinedError: 'form' is undefined

Hello,

After doing a successful subscription with Stripe, the page has to be redirected to the team page, apparently. However, the following error is raised on the settings/billing page. Appreciate the help.

jinja2.exceptions.UndefinedError
jinja2.exceptions.UndefinedError: 'form' is undefined

Traceback (most recent call last)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 2091, in call
return self.wsgi_app(environ, start_response)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_restful/init.py", line 271, in error_router
return original_handler(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_restful/init.py", line 271, in error_router
return original_handler(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_debugtoolbar/init.py", line 125, in dispatch_request
return view_func(**req.view_args)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_login/utils.py", line 272, in decorated_view
return func(*args, **kwargs)
File "/home/admin/ignite-master/appname/controllers/settings.py", line 66, in billing
return render_template('/settings/billing.html', plans=plans_by_name,
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/templating.py", line 147, in render_template
return _render(
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/templating.py", line 128, in _render
rv = template.render(context)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
self.environment.handle_exception()
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/admin/ignite-master/appname/templates/settings/billing.html", line 2, in top-level template code
{% from "helpers/_formhelpers.html" import render_field %}
File "/home/admin/ignite-master/appname/templates/tabler/dashboard_base.html", line 45, in top-level template code
{% block body %}
File "/home/admin/ignite-master/appname/templates/settings/billing.html", line 76, in block 'body'
{{ form.hidden_tag() }}
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/jinja2/environment.py", line 474, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'form' is undefined

TypeError: hidden_tag() missing 1 required positional argument: 'self' Traceback (most recent call last)

Hello,

Tried to add a new Team Member from the UI, faced the following error:

TypeError
TypeError: hidden_tag() missing 1 required positional argument: 'self'

Traceback (most recent call last)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask/app.py", line 2091, in call
return self.wsgi_app(environ, start_response)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask_restful/init.py", line 271, in error_router
return original_handler(e)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask_restful/init.py", line 271, in error_router
return original_handler(e)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask_debugtoolbar/init.py", line 142, in dispatch_request
return view_func(**req.view_args)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/home/admin/Ignite/appname/controllers/dashboard/team.py", line 27, in index
return render_template('dashboard/team.html', form=form, team=team)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask/templating.py", line 147, in render_template
return _render(
File "/home/admin/Ignite/env/lib/python3.9/site-packages/flask/templating.py", line 128, in _render
rv = template.render(context)
File "/home/admin/Ignite/env/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
self.environment.handle_exception()
File "/home/admin/Ignite/env/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/admin/Ignite/appname/templates/dashboard/team.html", line 2, in top-level template code
{% from "helpers/_formhelpers.html" import render_field %}
File "/home/admin/Ignite/appname/templates/tabler/dashboard_base.html", line 45, in top-level template code
{% block body %}
File "/home/admin/Ignite/appname/templates/dashboard/team.html", line 49, in block 'body'
{{ simple_form.hidden_tag() }}
TypeError: hidden_tag() missing 1 required positional argument: 'self'

AttributeError: 'Stripe' object has no attribute 'stripe_publishable_key'

Hello

Downloaded and tried to run the code. Followed the instructions to set the environment, and set variables including strip keys in .env.local. Tested that these values are read and set in the application by printing stripe.stripe_publishable_key in appname/services/strip.py (in function init_app). The app comes up fine. In the web app, when clicking on Billing (path: settings/billing), the application raises the following error:

Traceback (most recent call last):
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 2091, in call
return self.wsgi_app(environ, start_response)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_restful/init.py", line 271, in error_router
return original_handler(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_restful/init.py", line 271, in error_router
return original_handler(e)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_debugtoolbar/init.py", line 125, in dispatch_request
return view_func(**req.view_args)
File "/home/admin/ignite-master/env/lib/python3.9/site-packages/flask_login/utils.py", line 272, in decorated_view
return func(*args, **kwargs)
File "/home/admin/ignite-master/appname/controllers/settings.py", line 67, in billing
stripe_publishable_key=stripe.stripe_publishable_key)
AttributeError: 'Stripe' object has no attribute 'stripe_publishable_key'

Can you please help what causes this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.