@@ -6,6 +6,7 @@ Open-source dashboard generated by AppSeed in **Flask** Framework. [Gradient Abl
6
6
7
7
> Features
8
8
9
+ - Up-to-date [ dependencies] ( ./requirements.txt ) : ** Flask 2.0.1**
9
10
- DBMS: SQLite, PostgreSQL (production)
10
11
- DB Tools: SQLAlchemy ORM, Flask-Migrate (schema migrations)
11
12
- Modular design with ** Blueprints** , simple codebase
@@ -85,24 +86,57 @@ $ # Access the dashboard in browser: http://127.0.0.1:5000/
85
86
86
87
The project is coded using blueprints, app factory pattern, dual configuration profile (development and production) and an intuitive structure presented bellow:
87
88
88
- > Simplified version
89
-
90
89
``` bash
91
90
< PROJECT ROOT >
92
91
|
93
- | -- app/ # Implements app logic
94
- | | -- base/ # Base Blueprint - handles the authentication
95
- | | -- home/ # Home Blueprint - serve UI Kit pages
92
+ | -- apps/
93
+ | |
94
+ | | -- home/ # A simple app that serve HTML files
95
+ | | | -- routes.py # Define app routes
96
+ | |
97
+ | | -- authentication/ # Handles auth routes (login and register)
98
+ | | | -- routes.py # Define authentication routes
99
+ | | | -- models.py # Defines models
100
+ | | | -- forms.py # Define auth forms (login and register)
101
+ | |
102
+ | | -- static/
103
+ | | | -- < css, JS, images> # CSS files, Javascripts files
96
104
| |
97
- | __init__.py # Initialize the app
105
+ | | -- templates/ # Templates used to render pages
106
+ | | | -- includes/ # HTML chunks and components
107
+ | | | | -- navigation.html # Top menu component
108
+ | | | | -- sidebar.html # Sidebar component
109
+ | | | | -- footer.html # App Footer
110
+ | | | | -- scripts.html # Scripts common to all pages
111
+ | | |
112
+ | | | -- layouts/ # Master pages
113
+ | | | | -- base-fullscreen.html # Used by Authentication pages
114
+ | | | | -- base.html # Used by common pages
115
+ | | |
116
+ | | | -- accounts/ # Authentication pages
117
+ | | | | -- login.html # Login page
118
+ | | | | -- register.html # Register page
119
+ | | |
120
+ | | | -- home/ # UI Kit Pages
121
+ | | | -- index.html # Index page
122
+ | | | -- 404-page.html # 404 page
123
+ | | | -- * .html # All other pages
124
+ | |
125
+ | config.py # Set up the app
126
+ | __init__.py # Initialize the app
98
127
|
99
- | -- requirements.txt # Development modules - SQLite storage
100
- | -- requirements-mysql.txt # Production modules - Mysql DMBS
101
- | -- requirements-pqsql.txt # Production modules - PostgreSql DMBS
128
+ | -- requirements.txt # Development modules - SQLite storage
129
+ | -- requirements-mysql.txt # Production modules - Mysql DMBS
130
+ | -- requirements-pqsql.txt # Production modules - PostgreSql DMBS
102
131
|
103
- | -- .env # Inject Configuration via Environment
104
- | -- config.py # Set up the app
105
- | -- run.py # Start the app - WSGI gateway
132
+ | -- Dockerfile # Deployment
133
+ | -- docker-compose.yml # Deployment
134
+ | -- gunicorn-cfg.py # Deployment
135
+ | -- nginx # Deployment
136
+ | | -- appseed-app.conf # Deployment
137
+ |
138
+ | -- .env # Inject Configuration via Environment
139
+ | -- run.py # Start the app - WSGI gateway
106
140
|
107
141
| -- ************************************************************************
108
142
```
@@ -116,85 +150,11 @@ The project is coded using blueprints, app factory pattern, dual configuration p
116
150
- If env.DEBUG is set to * True* the SQLite storage is used
117
151
- If env.DEBUG is set to * False* the specified DB driver is used (MySql, PostgreSQL)
118
152
- Call the app factory method ` create_app ` defined in app/__ init__ .py
119
- - Redirect the guest users to Login page
153
+ - Redirect the guest users to Login page
120
154
- Unlock the pages served by * home* blueprint for authenticated users
121
155
122
156
<br />
123
157
124
- > App / Base Blueprint
125
-
126
- The * Base* blueprint handles the authentication (routes and forms) and assets management. The structure is presented below:
127
-
128
- ``` bash
129
- < PROJECT ROOT >
130
- |
131
- | -- app/
132
- | | -- home/ # Home Blueprint - serve app pages (private area)
133
- | | -- base/ # Base Blueprint - handles the authentication
134
- | | -- static/
135
- | | | -- < css, JS, images> # CSS files, Javascripts files
136
- | |
137
- | | -- templates/ # Templates used to render pages
138
- | |
139
- | | -- includes/ #
140
- | | | -- navigation.html # Top menu component
141
- | | | -- sidebar.html # Sidebar component
142
- | | | -- footer.html # App Footer
143
- | | | -- scripts.html # Scripts common to all pages
144
- | |
145
- | | -- layouts/ # Master pages
146
- | | | -- base-fullscreen.html # Used by Authentication pages
147
- | | | -- base.html # Used by common pages
148
- | |
149
- | | -- accounts/ # Authentication pages
150
- | | -- login.html # Login page
151
- | | -- register.html # Registration page
152
- |
153
- | -- requirements.txt # Development modules - SQLite storage
154
- | -- requirements-mysql.txt # Production modules - Mysql DMBS
155
- | -- requirements-pqsql.txt # Production modules - PostgreSql DMBS
156
- |
157
- | -- .env # Inject Configuration via Environment
158
- | -- config.py # Set up the app
159
- | -- run.py # Start the app - WSGI gateway
160
- |
161
- | -- ************************************************************************
162
- ```
163
-
164
- <br />
165
-
166
- > App / Home Blueprint
167
-
168
- The * Home* blueprint handles UI Kit pages for authenticated users. This is the private zone of the app - the structure is presented below:
169
-
170
- ``` bash
171
- < PROJECT ROOT >
172
- |
173
- | -- app/
174
- | | -- base/ # Base Blueprint - handles the authentication
175
- | | -- home/ # Home Blueprint - serve app pages (private area)
176
- | |
177
- | | -- templates/ # UI Kit Pages
178
- | |
179
- | | -- index.html # Default page
180
- | | -- page-404.html # Error 404 page
181
- | | -- page-500.html # Error 500 page
182
- | | -- page-403.html # Error 403 page
183
- | | -- * .html # All other HTML pages
184
- |
185
- | -- requirements.txt # Development modules - SQLite storage
186
- | -- requirements-mysql.txt # Production modules - Mysql DMBS
187
- | -- requirements-pqsql.txt # Production modules - PostgreSql DMBS
188
- |
189
- | -- .env # Inject Configuration via Environment
190
- | -- config.py # Set up the app
191
- | -- run.py # Start the app - WSGI gateway
192
- |
193
- | -- ************************************************************************
194
- ```
195
-
196
- <br />
197
-
198
158
## Deployment
199
159
200
160
The app is provided with a basic configuration to be executed in [ Docker] ( https://www.docker.com/ ) , [ Gunicorn] ( https://gunicorn.org/ ) , and [ Waitress] ( https://docs.pylonsproject.org/projects/waitress/en/stable/ ) .
0 commit comments