Star Admin - Flask Dashboard Example
Tags: webdev, staradmin, flask, appseed
Published: 2020-07-26 16:24:52

---
title: Star Admin - Flask Dashboard Example
published: true
description: Star Admin dashboard design coded in Flask with basic modules and deployment scripts
tags: webdev, staradmin, flask, appseed
cover_image: https://raw.githubusercontent.com/admin-dashboards/free-dashboard-staradmin/master/media/free-dashboard-staradmin-screen.png
---
Hello Coders, 

This article presents an open-source **Flask Dashboard** coded on top of a modern UI - **[Star Admin](https://appseed.us/admin-dashboards/flask-star-admin)** (Free Version), provided by BootstrapDash. For newcomers, **Star Admin** is a beautifully designed admin template featuring a fine selection of useful Bootstrap components and elements. Star Admin has impressive typography that compliments exceedingly with its colorful and elegant interface.

---

- [Star Admin Flask](https://appseed.us/admin-dashboards/flask-star-admin) - product page
- **[Star Admin Flask PRO](https://appseed.us/admin-dashboards/flask-dashboard-staradmin-pro) - more pages, components**

---

![Star Admin - Coded in Flask with database, authentication and deploy scripts by AppSeed.](https://raw.githubusercontent.com/app-generator/flask-star-admin/master/media/flask-dashboard-staradmin-screen-2.png)

---

## Star Admin (HTML)

*Vendor Notes (BootstrapDash)* - Star Admin is a free responsive admin template built with Bootstrap 4. The template has a colorful, attractive yet simple and elegant design. The template is well crafted, with all the components neatly and carefully designed and arranged within the template. 

Star Admin is packed with all the features that fit your needs but not cramped with components you would not even use. It is an excellent fit to build admin panels, e-commerce systems, project management systems, CMS, or CRM.

In case anyone has the curiosity to build the HTML files, please access the official repository - [Star Admin Free Dashboard](https://github.com/BootstrapDash/StarAdmin-Free-Bootstrap-Admin-Template),  clone the code and follow the instructions provided in the [README](https://github.com/BootstrapDash/StarAdmin-Free-Bootstrap-Admin-Template/blob/master/README.md) file. 

---
> Star Admin - HTML files build

```bash
$ # Clone the sources
$ https://github.com/BootstrapDash/StarAdmin-Free-Bootstrap-Admin-Template.git star-admin
$ cd star-admin
$
$ # Install Moduled
$ yarn
$
$ # Compile files 
$ gulp serve
```

The tooling provided in the HTML version is using Gulp to compile SCSS and JS Vendor libs. This toolchain is not *state-of-the-art* but is working and does the job.

---

## [Star Admin](https://appseed.us/admin-dashboards/flask-star-admin) Flask

The project is a simple, unopinionated Flask starter coded with a short-list of modules and deployment scripts for some well-known platforms: Docker, Heroku - app features: 

- SQLite, PostgreSQL, SQLAlchemy ORM
- Alembic (DB schema migrations)
- Modular design with **Blueprints**
- Session-Based authentication (via **flask_login**)
- Forms validation
- Deployment scripts: Docker, Gunicorn / Nginx, Heroku
- Active Support via Github and [Discord](https://discord.gg/fZC6hup).

---

> How to use the code

To use the stater, Python3 should be installed properly in the workstation. If you are not sure if Python is properly installed, please open a terminal and type `python --version`. The full-list with dependencies and tools required to build the app:

- [Python3](https://www.python.org/) - the programming language used to code the app
- [GIT](https://git-scm.com/) - used to clone the source code from the Github repository
- Basic development tools (g++ compiler, python development libraries ..etc) used by Python to compile the app dependencies in your environment.

For more information on how to set up your environment please access the resources listed below. In case I've missed something, feel free to ask me anything in the comments - I'm here on Dev almost daily. 

- [How to set up Python](https://docs.appseed.us/how-to/install-python)
- [Setup CentOS for development](https://docs.appseed.us/how-to/setup-centos-for-development/)
- [Setup Ubuntu for development](https://docs.appseed.us/how-to/setup-ubuntu-for-development/)
- [Setup Windows for development](https://docs.appseed.us/how-to/setup-windows-for-development/)

---

> App Codebase (simplified)

Starter uses a simple codebase, with two Blueprints and a structure presented below:

```bash
< 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
   |
   |-- ************************************************************************
```

---

> Compile the sources

To built and start the **Star Admin Flask** locally, we need to clone the public repository or download the ZIP archive and after prepare and compile the source code. 

```bash
$ # Get the code
$ git clone https://github.com/app-generator/flask-star-admin.git
$ cd flask-star-admin
$
$ # Virtualenv modules installation (Unix based systems)
$ 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/
```

If all goes well, we should see the app running in the browser. To unlock the private pages and pass the login, first, we need to create a new user using the registration page: 

![Star Admin - Flask, registration page](https://raw.githubusercontent.com/app-generator/flask-dashboard-staradmin/master/media/flask-dashboard-staradmin-screen-register.png)

After we pass the login, the app will unlock some nice pages: 

---

>  **Star Admin** - Flask, UI Elements

![Star Admin - Flask, UI Elements.](https://raw.githubusercontent.com/app-generator/flask-dashboard-staradmin/master/media/flask-dashboard-staradmin-screen-1.png)
 
--- 

>  **Star Admin** - Flask, Dashboard Page

![Star Admin - Flask, Dashboard Page.](https://raw.githubusercontent.com/app-generator/flask-dashboard-staradmin/master/media/flask-dashboard-staradmin-screen-2.png)

--- 

>  **Star Admin** - Flask, ChartsPage

![Star Admin - Flask, Charts Page.](https://raw.githubusercontent.com/app-generator/flask-dashboard-staradmin/master/media/flask-dashboard-staradmin-screen-4.png)

--- 

> Thanks for reading! Let me know your thoughts in the comments. 

--- 

### Links & Resources

- [Star Admin Flask](https://appseed.us/admin-dashboards/flask-star-admin) - product page, hosted by AppSeed
- More [Flask Dashboards](https://appseed.us/admin-dashboards/flask) - index hosted by **AppSeed**

---

## More about [Flask](https://palletsprojects.com/p/flask/)

Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around Werkzeug and Jinja and has become one of the most popular Python web application frameworks.

By using a framework we can reuse modules and features already coded and tested by other developers. Using Flask we can skip over coding from scratch a few modules, common to many web apps:

- Authentication - we need to know who is using our app  
- ORM - to manipulate the database information with ease
- Routing - for sure we can code our own routing system .. but, why?!
- Deployment - Flask is well documented when we need to deploy our work in production.
- Community - using a Framework we can get help from other fellow developers that might face the same issues

Compared to his older brother Django, Flask provides much freedom to the developer because only offers suggestions, but does not enforce any dependencies for project layout.
To read more about Flask, please access: 

- [Flask](https://palletsprojects.com/p/flask/) - official website
- [Flask Documentation](https://flask.palletsprojects.com/) - recommended starting point for newcomers