Ignite Demo

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

A demo of Ignite

As you can see, Ignite solves a lot of things for you. You can download the latest version Ignite here. Your purchase receipt for this course serves as a single commercial license to use the features in Ignite.

This lesson preview is part of the Fullstack Flask: Build a Complete SaaS App with Flask course and can be unlocked immediately with a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Fullstack Flask: Build a Complete SaaS App with Flask with a single-time purchase.

Thumbnail for the \newline course Fullstack Flask: Build a Complete SaaS App with Flask
  • [00:00 - 00:10] In the previous video, we went over a demo of how Flask Ignite works. In this video, we're going to go over the code of Flask Ignite and how to get a local development environment running.

    [00:11 - 00:31] The first step is to go to the repository and check out the README as well as pull down the code from the GitHub repository that we're seeing here. And then we're going to grab the URL of the GitHub repository, hop into our terminal, and actually clone that repository.

    [00:32 - 00:47] Here we've cloned it into a folder called Ignite. So when we hop in and check out the files, we can see that all of them are there. Now we want to open them with our text editor. I'm using a text editor called VS Code, which we can open through the command line.

    [00:48 - 01:01] In our text editor, we see all of the different files, including the README file, which includes the setup instructions. The first thing it is having us do is actually create a virtual environment in our terminal.

    [01:02 - 01:22] So we're going to go and do that. And what this command is doing is it's invoking the virtual end module, and then we're going to tell it to create a virtual end inside the end folder. Now that we've created an end folder, as we can see here, our next job is to actually activate it. And the way we do that is by running a script located inside of the end folder called activate.

    [01:23 - 01:37] Now that we've activated it, we can check the version of Python we're using to make sure it's Python 3, and we've correctly configured our virtual environment . To do that, you can run Python dash dash version.

    [01:38 - 01:53] Now the next step is to actually install all of the requirements we specified, and we specified them in a file called requirements.txt. While the script is running, we can actually go ahead and take a look at the requirements we've specified in that file.

    [01:54 - 02:13] So what PIP is doing is it's a package manager for Python that's installing all of these packages, according to the version numbers specified here. There's a lot of libraries here, but they're all pretty useful when it comes to ignite.

    [02:14 - 02:26] Now, if we refer back to this read me file, the next step was to actually create a database. And the way we can do that is thanks to a script located in a file called manage.py.

    [02:27 - 02:50] And if we look inside of manage.py, it's actually specifying how we're going to do specific things, including initializing the application, as well as how we'd seed the database as well. There's a bunch of commands here which you can check out, but the one that we really care about is the one to initialize a table.

    [02:51 - 03:02] So we're going to go and do that in our console by running managed.py init db. This uses a database on the file system that's backed by SQL Lite.

    [03:03 - 03:22] Now that we have our database structure, there's one other thing we're going to have to look at, which is our configuration settings. One of the things we support, for example, is Google authentication. And to support that, we actually have to set some secrets provided to us from Google and have our application refer to that.

    [03:23 - 03:36] The way we do that is through a file in this folder called nv.local. Now we've provided a sample file here that sets some default values for your environment variables.

    [03:37 - 03:52] What we can do is we can actually copy that into our own file called m.local and set the actual secret values. Now we never would want to commit this file into a git repository because that would leak secrets.

    [03:53 - 04:04] So by default m.local is actually ignored. So once we've copied the file, we can set our own secret values inside of here.

    [04:05 - 04:16] So for example, we set our Google consumer key to be something. If you have a striped key that you've configured, you can set that it's not required to set it, but if you are using Stripe, you'll probably want to set it up.

    [04:17 - 04:28] Now these last two set some default values for Flask so that when we run our application, it knows where to find our application. In this case, our application is defined within the managed.py file.

    [04:29 - 04:44] So that's what our Flask app environment variable is going to be. Now that we've sourced the environment file, we can check that it actually set the environment variables by echoing one of them through our terminal.

    [04:45 - 04:54] Now that we see it set, all we have to do to run our Flask app is run Flask run . And that will create a local development server listening on port.

    [04:55 - 05:08] Now that we pull that URL up in our browser, we can actually try out our environment inside of our browser. So we can register for an account like we just did, change details, and basically use the full app.

    [05:09 - 05:16] At least everything we configured. For example, we didn't configure the Stripe settings, so that might not work.

    [05:17 - 05:26] This is everything you need to know to get a development environment up and running, and in our next video we're going to cover the detailed application structure.