Skip to content

Commit 2dbbae5

Browse files
author
App Generator
committed
Release v1.0.3 - Bump Codebase Version
1 parent 392aca8 commit 2dbbae5

File tree

2 files changed

+112
-109
lines changed

2 files changed

+112
-109
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Change Log
22

3+
## [1.0.3] 2021-12-05
4+
### Improvements & Fixes
5+
6+
- Bump Flask Codebase to [v2.0.0](https://github.com/app-generator/boilerplate-code-flask-dashboard/releases)
7+
- Dependencies update (all packages)
8+
- Use Flask==2.0.1 (latest stable version)
9+
- Better Code formatting
10+
- Improved Files organization
11+
- Optimize imports
12+
- Docker Scripts Update
13+
314
## [1.0.2] 2021-05-16
415
### Dependencies Update
516

README.md

Lines changed: 101 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,47 @@
1-
# Flask Material PRO (WrapPixel)
1+
# [Flask Material PRO Wpx](https://appseed.us/admin-dashboards/flask-material-dashboard-wpx-pro)
22

3-
> Template [boilerplate code](https://appseed.us/boilerplate-code) used by [AppSeed](https://appseed.us) to generate simple admin dashboards coded in [Flask](https://palletsprojects.com/p/flask/) - Features:
3+
`Admin dashboard` generated by the AppSeed platform with basic modules, database, authentication and deployment scripts on top of a modern design. Based on the popular Bootstrap 4 framework and inspired by Google’s material design, the MaterialPro Bootstrap Admin template is bundled with multiple third-party plugins that make it an excellent standalone solution.
44

5-
- UI Kit: **Material PRO Dashboard** (Lite Version) provided by **WrapPixel**
5+
<br />
6+
7+
> Features
8+
9+
- `Up-to-date dependencies`: **Flask 2.0.1**
10+
- [SCSS compilation](#recompile-css) via **Gulp**
611
- DBMS: SQLite, PostgreSQL (production)
712
- DB Tools: SQLAlchemy ORM, Flask-Migrate (schema migrations)
8-
- Modular design with **Blueprints**
13+
- Modular design with **Blueprints**, simple codebase
914
- Session-Based authentication (via **flask_login**), Forms validation
10-
- Deployment scripts: Docker, Gunicorn / Nginx, HEROKU
11-
- Support via **Github** (issues tracker) and [Discord](https://discord.gg/fZC6hup).
15+
- Deployment scripts: Docker, Gunicorn / Nginx, Heroku
16+
- Support via **Github** and [Discord](https://discord.gg/fZC6hup).
1217

1318
<br />
1419

1520
> Links
1621
1722
- [Flask Material PRO Wpx](https://appseed.us/admin-dashboards/flask-material-dashboard-wpx-pro) - product page
1823
- [Flask Material PRO Wpx](https://flask-material-wpx-pro.appseed-srv1.com) - LIVE Demo
19-
- [Flask Material PRO Wpx](https://docs.appseed.us/products/flask-dashboards/materialpro-wpx) - product documentation
24+
25+
<br />
26+
27+
## Quick Start in [Docker](https://www.docker.com/)
28+
29+
> Get the code
30+
31+
```bash
32+
$ git clone https://github.com/app-generator/priv-flask-material-wpx-pro.git
33+
$ cd priv-flask-material-wpx-pro
34+
```
35+
36+
> Start the app in Docker
37+
38+
```bash
39+
$ docker-compose pull # download dependencies
40+
$ docker-compose build # local set up
41+
$ docker-compose up -d # start the app
42+
```
43+
44+
Visit `http://localhost:85` in your browser. The app should be up & running.
2045

2146
<br />
2247

@@ -69,145 +94,112 @@ $ # Access the dashboard in browser: http://127.0.0.1:5000/
6994

7095
## Code-base structure
7196

72-
The project is coded using blueprints, app factory pattern, dual configuration profile (development and production) and an intuitive structure presented bellow:
73-
74-
> Simplified version
97+
The project is coded using blueprints, app factory pattern, dual configuration profile (development and production), and an intuitive structure presented below:
7598

7699
```bash
77100
< PROJECT ROOT >
78101
|
79-
|-- app/ # Implements app logic
80-
| |-- base/ # Base Blueprint - handles the authentication
81-
| |-- home/ # Home Blueprint - serve UI Kit pages
102+
|-- apps/
103+
| |
104+
| |-- home/ # A simple app that serve HTML files
105+
| | |-- routes.py # Define app routes
106+
| |
107+
| |-- authentication/ # Handles auth routes (login and register)
108+
| | |-- routes.py # Define authentication routes
109+
| | |-- models.py # Defines models
110+
| | |-- forms.py # Define auth forms (login and register)
82111
| |
83-
| __init__.py # Initialize the app
112+
| |-- static/
113+
| | |-- <css, JS, images> # CSS files, Javascripts files
114+
| |
115+
| |-- templates/ # Templates used to render pages
116+
| | |-- includes/ # HTML chunks and components
117+
| | | |-- navigation.html # Top menu component
118+
| | | |-- sidebar.html # Sidebar component
119+
| | | |-- footer.html # App Footer
120+
| | | |-- scripts.html # Scripts common to all pages
121+
| | |
122+
| | |-- layouts/ # Master pages
123+
| | | |-- base-fullscreen.html # Used by Authentication pages
124+
| | | |-- base.html # Used by common pages
125+
| | |
126+
| | |-- accounts/ # Authentication pages
127+
| | | |-- login.html # Login page
128+
| | | |-- register.html # Register page
129+
| | |
130+
| | |-- home/ # UI Kit Pages
131+
| | |-- index.html # Index page
132+
| | |-- 404-page.html # 404 page
133+
| | |-- *.html # All other pages
134+
| |
135+
| config.py # Set up the app
136+
| __init__.py # Initialize the app
137+
|
138+
|-- requirements.txt # Development modules - SQLite storage
139+
|-- requirements-mysql.txt # Production modules - Mysql DMBS
140+
|-- requirements-pqsql.txt # Production modules - PostgreSql DMBS
84141
|
85-
|-- requirements.txt # Development modules - SQLite storage
86-
|-- requirements-mysql.txt # Production modules - Mysql DMBS
87-
|-- requirements-pqsql.txt # Production modules - PostgreSql DMBS
142+
|-- Dockerfile # Deployment
143+
|-- docker-compose.yml # Deployment
144+
|-- gunicorn-cfg.py # Deployment
145+
|-- nginx # Deployment
146+
| |-- appseed-app.conf # Deployment
88147
|
89-
|-- .env # Inject Configuration via Environment
90-
|-- config.py # Set up the app
91-
|-- run.py # Start the app - WSGI gateway
148+
|-- .env # Inject Configuration via Environment
149+
|-- run.py # Start the app - WSGI gateway
92150
|
93151
|-- ************************************************************************
94152
```
95153

96154
<br />
97155

98-
> The bootstrap flow
156+
## Recompile CSS
99157

100-
- `run.py` loads the `.env` file
101-
- Initialize the app using the specified profile: *Debug* or *Production*
102-
- If env.DEBUG is set to *True* the SQLite storage is used
103-
- If env.DEBUG is set to *False* the specified DB driver is used (MySql, PostgreSQL)
104-
- Call the app factory method `create_app` defined in app/__init__.py
105-
- Redirect the guest users to Login page
106-
- Unlock the pages served by *home* blueprint for authenticated users
158+
To recompile SCSS files, follow this setup:
107159

108160
<br />
109161

110-
> App / Base Blueprint
162+
**Step #1** - Install tools
111163

112-
The *Base* blueprint handles the authentication (routes and forms) and assets management. The structure is presented below:
113-
114-
```bash
115-
< PROJECT ROOT >
116-
|
117-
|-- app/
118-
| |-- home/ # Home Blueprint - serve app pages (private area)
119-
| |-- base/ # Base Blueprint - handles the authentication
120-
| |-- static/
121-
| | |-- <css, JS, images> # CSS files, Javascripts files
122-
| |
123-
| |-- templates/ # Templates used to render pages
124-
| |
125-
| |-- includes/ #
126-
| | |-- navigation.html # Top menu component
127-
| | |-- sidebar.html # Sidebar component
128-
| | |-- footer.html # App Footer
129-
| | |-- scripts.html # Scripts common to all pages
130-
| |
131-
| |-- layouts/ # Master pages
132-
| | |-- base-fullscreen.html # Used by Authentication pages
133-
| | |-- base.html # Used by common pages
134-
| |
135-
| |-- accounts/ # Authentication pages
136-
| |-- login.html # Login page
137-
| |-- register.html # Registration page
138-
|
139-
|-- requirements.txt # Development modules - SQLite storage
140-
|-- requirements-mysql.txt # Production modules - Mysql DMBS
141-
|-- requirements-pqsql.txt # Production modules - PostgreSql DMBS
142-
|
143-
|-- .env # Inject Configuration via Environment
144-
|-- config.py # Set up the app
145-
|-- run.py # Start the app - WSGI gateway
146-
|
147-
|-- ************************************************************************
148-
```
164+
- [NodeJS](https://nodejs.org/en/) 12.x or higher
165+
- [Gulp](https://gulpjs.com/) - globally
166+
- `npm install -g gulp-cli`
167+
- [Yarn](https://yarnpkg.com/) (optional)
149168

150169
<br />
151170

152-
> App / Home Blueprint
153-
154-
The *Home* blueprint handles UI Kit pages for authenticated users. This is the private zone of the app - the structure is presented below:
171+
**Step #2** - Change the working directory to `assets` folder
155172

156173
```bash
157-
< PROJECT ROOT >
158-
|
159-
|-- app/
160-
| |-- base/ # Base Blueprint - handles the authentication
161-
| |-- home/ # Home Blueprint - serve app pages (private area)
162-
| |
163-
| |-- templates/ # UI Kit Pages
164-
| |
165-
| |-- index.html # Default page
166-
| |-- page-404.html # Error 404 - mandatory page
167-
| |-- page-500.html # Error 500 - mandatory page
168-
| |-- page-403.html # Error 403 - mandatory page
169-
| |-- *.html # All other HTML pages
170-
|
171-
|-- requirements.txt # Development modules - SQLite storage
172-
|-- requirements-mysql.txt # Production modules - Mysql DMBS
173-
|-- requirements-pqsql.txt # Production modules - PostgreSql DMBS
174-
|
175-
|-- .env # Inject Configuration via Environment
176-
|-- config.py # Set up the app
177-
|-- run.py # Start the app - WSGI gateway
178-
|
179-
|-- ************************************************************************
174+
$ cd apps/static/assets
180175
```
181176

182177
<br />
183178

184-
## Deployment
179+
**Step #3** - Install modules (this will create a classic `node_modules` directory)
185180

186-
The app is provided with a basic configuration to be executed in [Docker](https://www.docker.com/), [Heroku](https://www.heroku.com/), [Gunicorn](https://gunicorn.org/), and [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/).
181+
```bash
182+
$ npm install
183+
// OR
184+
$ yarn
185+
```
187186

188187
<br />
189188

190-
### [Docker](https://www.docker.com/) execution
191-
---
192-
193-
The application can be easily executed in a docker container. The steps:
194-
195-
> Get the code
189+
**Step #4** - Edit & Recompile SCSS files
196190

197191
```bash
198-
$ git clone https://github.com/app-generator/priv-flask-material-wpx-pro.git
199-
$ cd priv-flask-material-wpx-pro
192+
$ gulp scss
200193
```
201194

202-
> Start the app in Docker
195+
The generated file is saved in `static/assets/css` directory.
203196

204-
```bash
205-
$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d
206-
```
197+
<br />
207198

208-
Visit `http://localhost:5005` in your browser. The app should be up & running.
199+
## Deployment
200+
201+
The app is provided with a basic configuration to be executed in [Docker](https://www.docker.com/), [Heroku](https://www.heroku.com/), [Gunicorn](https://gunicorn.org/), and [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/).
209202

210-
<br />
211203

212204
### [Heroku](https://www.heroku.com/)
213205
---
@@ -295,4 +287,4 @@ Visit `http://localhost:8001` in your browser. The app should be up & running.
295287
<br />
296288

297289
---
298-
[Flask Material Dashboard PRO (WrapPixel)](https://appseed.us/admin-dashboards/flask-material-dashboard-wpx-pro) - Provided by **AppSeed** [Web App Generator](https://appseed.us/app-generator).
290+
[Flask Material PRO Wpx](https://appseed.us/admin-dashboards/flask-material-dashboard-wpx-pro) - Provided by **AppSeed** [App Generator](https://appseed.us/app-generator).

0 commit comments

Comments
 (0)