Skip to content

Commit 4646525

Browse files
committed
Release v1.0.6
1 parent 54d3dfa commit 4646525

File tree

323 files changed

+52366
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

323 files changed

+52366
-1
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
__pycache__
3+
*.pyc
4+
*.pyo
5+
*.pyd

.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# True for development, False for production
2+
DEBUG=True
3+
4+
# Flask ENV
5+
FLASK_APP=run.py
6+
FLASK_ENV=development
7+
8+
# Used for CDN (in production)
9+
ASSETS_ROOT=/static/assets # !!! Without Slash at the end !!!

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# tests and coverage
6+
*.pytest_cache
7+
.coverage
8+
9+
# database & logs
10+
*.db
11+
*.sqlite3
12+
*.log
13+
14+
# venv
15+
env
16+
venv
17+
18+
# other
19+
.DS_Store
20+
21+
# sphinx docs
22+
_build
23+
_static
24+
_templates
25+
26+
# javascript
27+
package-lock.json
28+
.vscode/symbols.json
29+
30+
apps/static/assets/node_modules
31+
apps/static/assets/yarn.lock
32+
apps/static/assets/.temp
33+

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# Change Log
22

3-
## [1.0.5] 2022-05-23
3+
## [1.0.6] 2022-05-25
44
### Improvements
55

6+
- Built with [Soft UI Dashboard Generator](https://appseed.us/generator/soft-ui-dashboard/)
7+
- Timestamp: `2022-05-25 10:05`
68
- Added CDN/Static Server management
79
- `ASSETS_ROOT` env variable
10+
11+
## [1.0.5] 2022-05-23
12+
### Improvements
13+
814
- UI Update: `Soft UI Dashboard` v1.0.5
915
- upgrade Bootstrap version to v5.1.3
1016
- upgrade ChartJs plugin version to v3.7.1

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.9
2+
3+
COPY . .
4+
5+
# set environment variables
6+
ENV PYTHONDONTWRITEBYTECODE 1
7+
ENV PYTHONUNBUFFERED 1
8+
9+
# install python dependencies
10+
RUN pip install --upgrade pip
11+
RUN pip install --no-cache-dir -r requirements.txt
12+
13+
# gunicorn
14+
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]

LICENSE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# MIT License
2+
3+
Copyright (c) 2019 - present [AppSeed](http://appseed.us/)
4+
5+
<br />
6+
7+
## Licensing Information
8+
9+
<br />
10+
11+
| Item | - |
12+
| ---------------------------------- | --- |
13+
| License Type | MIT |
14+
| Use for print | **YES** |
15+
| Create single personal website/app | **YES** |
16+
| Create single website/app for client | **YES** |
17+
| Create multiple website/apps for clients | **YES** |
18+
| Create multiple SaaS applications | **YES** |
19+
| End-product paying users | **YES** |
20+
| Product sale | **YES** |
21+
| Remove footer credits | **YES** |
22+
| --- | --- |
23+
| Remove copyright mentions from source code | NO |
24+
| Production deployment assistance | NO |
25+
| Create HTML/CSS template for sale | NO |
26+
| Create Theme/Template for CMS for sale | NO |
27+
| Separate sale of our UI Elements | NO |
28+
29+
<br />
30+
31+
---
32+
For more information regarding licensing, please contact the AppSeed Service < *support@appseed.us* >

README.md

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# [Soft UI Dashboard](https://appseed.us/generator/soft-ui-dashboard/) Flask
2+
3+
Open-source **Django Dashboard** generated by `AppSeed` op top of a modern design. Designed for those who like bold elements and beautiful websites, **[Soft UI Dashboard](https://appseed.us/generator/soft-ui-dashboard/)** is ready to help you create stunning websites and webapps. **Soft UI Dashboard** is built with over 70 frontend individual elements, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining.
4+
5+
<br />
6+
7+
> Built with [Soft UI Dashboard Generator](https://appseed.us/generator/soft-ui-dashboard/)
8+
9+
- Timestamp: `2022-05-25 10:05`
10+
- Build ID: `f925ed3d-b6f6-48dd-b722-b9e83e39daa9`
11+
- **Free [Support](https://appseed.us/support/)** (registered users) via `Email` and `Discord`
12+
13+
<br />
14+
15+
> Features
16+
17+
- `Up-to-date dependencies`
18+
- Database: `sqlite`
19+
- `DB Tools`: SQLAlchemy ORM, Flask-Migrate (schema migrations)
20+
- Session-Based authentication (via **flask_login**), Forms validation
21+
22+
<br />
23+
24+
![Soft UI Dashboard - Full-Stack Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/168843143-f2a2ffac-4ab6-44d2-bc1f-a9a8682a749b.png)
25+
26+
<br />
27+
28+
29+
## ✨ Start the app in Docker
30+
31+
> **Step 1** - Download the code from the GH repository (using `GIT`)
32+
33+
```bash
34+
$ # Get the code
35+
$ git clone https://github.com/app-generator/flask-soft-ui-dashboard.git
36+
$ cd flask-soft-ui-dashboard
37+
```
38+
39+
<br />
40+
41+
> **Step 2** - Edit `.env` and set `DEBUG=True`. This will activate the `SQLite` persistance.
42+
43+
```txt
44+
DEBUG=True
45+
```
46+
47+
<br />
48+
49+
> **Step 3** - Start the APP in `Docker`
50+
51+
```bash
52+
$ docker-compose up --build
53+
```
54+
55+
Visit `http://localhost:85` in your browser. The app should be up & running.
56+
57+
<br />
58+
59+
## ✨ How to use it
60+
61+
> Download the code
62+
63+
```bash
64+
$ # Get the code
65+
$ git clone https://github.com/app-generator/flask-soft-ui-dashboard.git
66+
$ cd flask-soft-ui-dashboard
67+
```
68+
69+
<br />
70+
71+
### 👉 Set Up for `Unix`, `MacOS`
72+
73+
> Install modules via `VENV`
74+
75+
```bash
76+
$ virtualenv env
77+
$ source env/bin/activate
78+
$ pip3 install -r requirements.txt
79+
```
80+
81+
<br />
82+
83+
> Set Up Flask Environment
84+
85+
```bash
86+
$ export FLASK_APP=run.py
87+
$ export FLASK_ENV=development
88+
```
89+
90+
<br />
91+
92+
> Start the app
93+
94+
```bash
95+
$ flask run
96+
```
97+
98+
At this point, the app runs at `http://127.0.0.1:5000/`.
99+
100+
<br />
101+
102+
### 👉 Set Up for `Windows`
103+
104+
> Install modules via `VENV` (windows)
105+
106+
```
107+
$ virtualenv env
108+
$ .\env\Scripts\activate
109+
$ pip3 install -r requirements.txt
110+
```
111+
112+
<br />
113+
114+
> Set Up Flask Environment
115+
116+
```bash
117+
$ # CMD
118+
$ set FLASK_APP=run.py
119+
$ set FLASK_ENV=development
120+
$
121+
$ # Powershell
122+
$ $env:FLASK_APP = ".\run.py"
123+
$ $env:FLASK_ENV = "development"
124+
```
125+
126+
<br />
127+
128+
> Start the app
129+
130+
```bash
131+
$ flask run
132+
```
133+
134+
At this point, the app runs at `http://127.0.0.1:5000/`.
135+
136+
<br />
137+
138+
### 👉 Create Users
139+
140+
By default, the app redirects guest users to authenticate. In order to access the private pages, follow this set up:
141+
142+
- Start the app via `flask run`
143+
- Access the `registration` page and create a new user:
144+
- `http://127.0.0.1:5000/register`
145+
- Access the `sign in` page and authenticate
146+
- `http://127.0.0.1:5000/login`
147+
148+
<br />
149+
150+
## ✨ Code-base structure
151+
152+
The project is coded using blueprints, app factory pattern, dual configuration profile (development and production) and an intuitive structure presented bellow:
153+
154+
```bash
155+
< PROJECT ROOT >
156+
|
157+
|-- apps/
158+
| |
159+
| |-- home/ # A simple app that serve HTML files
160+
| | |-- routes.py # Define app routes
161+
| |
162+
| |-- authentication/ # Handles auth routes (login and register)
163+
| | |-- routes.py # Define authentication routes
164+
| | |-- models.py # Defines models
165+
| | |-- forms.py # Define auth forms (login and register)
166+
| |
167+
| |-- static/
168+
| | |-- <css, JS, images> # CSS files, Javascripts files
169+
| |
170+
| |-- templates/ # Templates used to render pages
171+
| | |-- includes/ # HTML chunks and components
172+
| | | |-- navigation.html # Top menu component
173+
| | | |-- sidebar.html # Sidebar component
174+
| | | |-- footer.html # App Footer
175+
| | | |-- scripts.html # Scripts common to all pages
176+
| | |
177+
| | |-- layouts/ # Master pages
178+
| | | |-- base-fullscreen.html # Used by Authentication pages
179+
| | | |-- base.html # Used by common pages
180+
| | |
181+
| | |-- accounts/ # Authentication pages
182+
| | | |-- login.html # Login page
183+
| | | |-- register.html # Register page
184+
| | |
185+
| | |-- home/ # UI Kit Pages
186+
| | |-- index.html # Index page
187+
| | |-- 404-page.html # 404 page
188+
| | |-- *.html # All other pages
189+
| |
190+
| config.py # Set up the app
191+
| __init__.py # Initialize the app
192+
|
193+
|-- requirements.txt # App Dependencies
194+
|
195+
|-- .env # Inject Configuration via Environment
196+
|-- run.py # Start the app - WSGI gateway
197+
|
198+
|-- ************************************************************************
199+
```
200+
201+
<br />
202+
203+
## ✨ PRO Version
204+
205+
> For more components, pages and priority on support, feel free to take a look at this amazing starter:
206+
207+
Soft UI Dashboard is a premium Bootstrap 5 Design now available for download in Flask. Made of hundred of elements, designed blocks, and fully coded pages, Soft UI Dashboard PRO is ready to help you create stunning websites and web apps.
208+
209+
- 👉 [Soft UI Dashboard PRO Flask](https://appseed.us/product/soft-ui-dashboard-pro/flask/) - Product Page
210+
- 👉 [Soft UI Dashboard PRO Flask](https://flask-soft-ui-dashboard-pro.appseed-srv1.com/) - LIVE Demo
211+
212+
<br >
213+
214+
![Soft UI Dashboard PRO Flask](https://user-images.githubusercontent.com/51070104/167878073-5a4c8e6a-e289-4ea3-8d6c-9dd68b2dcf87.jpg)
215+
216+
<br />
217+
218+
---
219+
[Soft UI Dashboard](https://appseed.us/generator/soft-ui-dashboard/) Flask - Open-source starter generated by **[AppSeed Generator](https://appseed.us/generator/)**.

apps/__init__.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from flask import Flask
7+
from flask_login import LoginManager
8+
from flask_sqlalchemy import SQLAlchemy
9+
from importlib import import_module
10+
11+
12+
db = SQLAlchemy()
13+
login_manager = LoginManager()
14+
15+
16+
def register_extensions(app):
17+
db.init_app(app)
18+
login_manager.init_app(app)
19+
20+
21+
def register_blueprints(app):
22+
for module_name in ('authentication', 'home'):
23+
module = import_module('apps.{}.routes'.format(module_name))
24+
app.register_blueprint(module.blueprint)
25+
26+
27+
def configure_database(app):
28+
29+
@app.before_first_request
30+
def initialize_database():
31+
db.create_all()
32+
33+
@app.teardown_request
34+
def shutdown_session(exception=None):
35+
db.session.remove()
36+
37+
38+
def create_app(config):
39+
app = Flask(__name__)
40+
app.config.from_object(config)
41+
register_extensions(app)
42+
register_blueprints(app)
43+
configure_database(app)
44+
return app

apps/authentication/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from flask import Blueprint
7+
8+
blueprint = Blueprint(
9+
'authentication_blueprint',
10+
__name__,
11+
url_prefix=''
12+
)

0 commit comments

Comments
 (0)