DEV Community

loading...
Cover image for Flask Boilerplate - Open-Source Apps built with automation tools

Flask Boilerplate - Open-Source Apps built with automation tools

Sm0ke
#Automation, my favorite programming language
Originally published at appseed.us Updated on ・5 min read

Hello Coders,

This article presents a short-list with Flask apps and light Flask Dashboards generated using an automatized workflow:

  • Flat HTML themes (bootstrap based) are parsed and transformed into production-ready Jinja2 templates (the native Flask template engine) using an HTML Parser
  • The processed design is injected into an existing boilerplate code enhanced with SQLite database, SqlAlchemy helpers, and basic tooling.
  • A minimum set of tests is automatically executed via Selenium and Puppeteer.

Thank you! Content provided by AppSeed - App Generator.



Flask Boilerplate - Soft UI Design System, open-source starter provided by AppSeed.


What is Flask

Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions. It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions - Some links:


What is Boilerplate Code

In programming, boilerplate code is a piece of software that can be reused over and over without changing a single line of code. The whole idea behind a starter (sometimes boilerplate code) is to skip coding that piece of code common to many projects.


Setup the environment

In order to use the boilerplate code, we need Python and Flask installed on the workstation. The Python can be downloaded from the official website and Flask can be easily added using PIP command:

$ # Test the Python install 
$ python --version
$ Python 3.7.2

$ # install Flask using PIP
$ pip install Flask

Enter fullscreen mode Exit fullscreen mode

Flask Boilerplate Codebase

The codebase is organized using a modular structure:

< PROJECT ROOT >
   |
   |-- app/                      # Implements app logic
   |    |-- base/                # Base Blueprint - handles the authentication
   |    |-- home/                # Home Blueprint - serve UI Kit pages
   |    |
   |   __init__.py               # Initialize the app
   |
   |-- requirements.txt          # Development modules - SQLite storage
   |-- requirements-mysql.txt    # Production modules  - Mysql DMBS
   |-- requirements-pqsql.txt    # Production modules  - PostgreSql DMBS
   |
   |-- .env                      # Inject Configuration via Environment
   |-- config.py                 # Set up the app
   |-- run.py                    # Start the app - WSGI gateway
   |
   |-- ***********************
Enter fullscreen mode Exit fullscreen mode

How to Build the Boilerplates

All Flask starters share the same codebase and the build instructions are identical for all projects. For instance, if we want to build Flask Dashboard Volt boilerplate, we need to write a few simple commands in a terminal window:

$ # Get the code
$ git clone https://github.com/app-generator/flask-dashboard-volt.git
$ cd flask-dashboard-volt
$
$ # Virtualenv modules installation 
$ virtualenv env
$ source env/bin/activate
$
$ # Install modules - SQLite Database
$ pip3 install -r requirements.txt
$ 
$ # Set the FLASK_APP environment variable
$ export FLASK_APP=run.py
$
$ # Start the application (development mode)
$ flask run
$
$ # Access the dashboard in browser: http://127.0.0.1:5000/
Enter fullscreen mode Exit fullscreen mode

Note: To use the app, please access the registration page and create a new user. After authentication, the app will unlock the private pages.


Flask Dashboard Volt - Open-Source Bootstrap 5 Dashboard coded in Flask.

Pretty cool!


Flask Boilerplate - Datta Able

Datta Able Bootstrap Lite is the most stylized Bootstrap 4 Lite Admin Template, around all other Lite/Free admin templates in the market. It comes with high feature-rich pages and components with fully developer-centric code. Before developing Datta Able our key points were performance and design.



Flask Dashboard - DattaAble Design.


Flask Boilerplate - Soft UI

Soft UI Design System is a premium Bootstrap 5 UI Kit designed by Creative-Tim designed for those who like bold elements and beautiful websites. Soft UI Design System Flask is a simple Flask starter provided by AppSeed with a modular codebase, database, authentication, and deployment scripts



Flask Template - Starter provided by AppSeed.


Flask Pixel UI Kit

Pixel is a free, fully responsive, and modern Bootstrap 4 UI Kit that will help you build creative and professional websites. Use our components and sections, switch some Sass variables to build and arrange pages to best suit your needs. Pixel Lite comes with 6 premium example pages that we created to show you the beautiful user interfaces that can be created.



Flask Pixel UI Kit - Open-Source web app coded in Flask.


Flask Dashboard Argon

Flask Dashboard Argon is built on top of a fully responsive, pixel-perfect design, crafted by Creative-Tim. This admin panel, released as an open-source project includes an SQLite database, SQLAlchemy ORM, and is fully integrated into Jinja2 templating system.



Flask Dashboard Argon - Open-source Flask boilerplate generated by AppSeed.


Flask Corona Dark

Corona Dark Free admin template has beautiful typography, crisp design, and neatly designed dashboards. It combines colors that are easy on the eye, spacious cards, beautiful typography, and graphics.



Flask Dashboard Corona Dark - Open-Source template project provided by AppSeed.


Other resources


Thank you! Btw, my (nick) name is Sm0ke and I'm pretty active also on Twitter.

Discussion (3)

Collapse
coroutinedispatcher profile image
Stavro Xhardha

The definition of Boilerplate is not quite correct in your paragraph. By boilerplate we usually mean verbosity.

Collapse
sm0ke profile image
Sm0ke Author

Hello Stavro,
Point me please to the sentence. Thank you!

Collapse
coroutinedispatcher profile image
Stavro Xhardha

In programming, boilerplate code is a piece of software that can be reused over and over without changing a single line of code

I am not saying that it is wrong. But AFAIK we refer to the boilerplate as too much redunant(perhaps) code.