Skip to content

Commit 2cce17d

Browse files
committed
Release v1.0.7
1 parent 291003f commit 2cce17d

File tree

471 files changed

+52913
-0
lines changed

Some content is hidden

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

471 files changed

+52913
-0
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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## [1.0.7] 2022-05-25
4+
### Improvements
5+
6+
- Built with [Volt Dashboard Generator](https://appseed.us/generator/volt-dashboard/)
7+
- Timestamp: `2022-05-25 22:26`
8+
- Codebase refactoring
9+
- Added CDN Support
10+
- via `.env` **ASSETS_ROOT**
11+
312
## [1.0.6] 2022-01-16
413
### Improvements
514

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 < *[email protected]* >

README.md

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# Flask Volt Dashboard
2+
3+
Open-Source **Flask Dashboard** generated by the `AppSeed` platform with basic modules, database, authentication and deployment scripts on top of **[Volt Dashboard](https://appseed.us/generator/volt-dashboard/)** (free version). Volt Dashboard is a free and open source **Bootstrap 5** dashboard template featuring over 100 components, 11 example pages and 3 plugins with Vanilla JS. There are more than 100 free Bootstrap 5 components included some of them being buttons, alerts, modals, datepickers and so on.
4+
5+
<br />
6+
7+
> Built with [Volt Dashboard Generator](https://appseed.us/generator/volt-dashboard/)
8+
9+
- Timestamp: `2022-05-25 22:26`
10+
- Build ID: `2752bd45-7b3f-49ac-b4a9-b88abdec58e6`
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+
![Volt Dashboard - Full-Stack Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/168843604-b026fd94-5969-4be7-81ac-5887cf0958e5.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-volt-dashboard.git
36+
$ cd flask-volt-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-volt-dashboard.git
66+
$ cd flask-volt-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+
Volt Pro is a premium Bootstrap 5 Admin Dashboard featuring over 800 components, 20 example pages and 10 fully customized plugin written in Vanilla Javascript.
208+
209+
- 👉 [Flask Volt PRO](https://appseed.us/product/volt-dashboard-pro/flask/) - product page
210+
- 👉 [Flask Volt PRO](https://flask-volt-pro.appseed-srv1.com/) - LIVE deployment
211+
212+
<br >
213+
214+
![Flask Volt PRO - Premium Starter.](https://user-images.githubusercontent.com/51070104/167878207-37758fbf-fbea-4140-9232-d5bf0c6a1fe8.jpg)
215+
216+
<br />
217+
218+
---
219+
Flask Volt Dashboard - 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)