Skip to content

Commit

Permalink
Release v1.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
app-generator committed Oct 7, 2023
1 parent 12d6407 commit f1f1356
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 62 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [1.0.14] 2023-10-07
### Changes

- Update Dependencies
- Silent fallback to SQLite

## [1.0.13] 2023-06-22
### Changes

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.10

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
Expand Down
37 changes: 12 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@ Open-Source **[Flask Dashboard](https://appseed.us/admin-dashboards/flask/)** ge

- 👉 [Volt Dashboard Flask](https://appseed.us/product/volt-dashboard/flask/) - `Product page`
- 👉 [Volt Dashboard Flask](https://flask-volt-dashboard.appseed-srv1.com/) - `LIVE Demo`
- 👉 [Volt Dashboard Flask](https://docs.appseed.us/products/flask-dashboards/volt/) - `Documentation`

<br />

> 🚀 Built with [App Generator](https://appseed.us/generator), timestamp `2022-06-23 18:20`
## ✅ Features

- `Up-to-date dependencies`
- `Database`: `SQLite`, MySql
- `Up-to-date dependencies`
- `Database`: `SQLite`, MySql
- Silent fallback to `SQLite`
- `DB Tools`: SQLAlchemy ORM, `Flask-Migrate`
- `Authentication`, Session Based, `OAuth` via **Github**
- Docker, `Flask-Minify` (page compression)
- 🚀 `Deployment`
- `DB Tools`: SQLAlchemy ORM, `Flask-Migrate`
- `Authentication`, Session Based, `OAuth` via **Github**
- Docker, `Flask-Minify` (page compression)
- `Deployment`
- `CI/CD` flow via `Render`

<br />

![Volt Dashboard - Full-Stack Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/168843604-b026fd94-5969-4be7-81ac-5887cf0958e5.png)

<br />

## ✨ Quick start in `Docker`
## ✅ Start in `Docker`

> 👉 **Step 1** - Download the code from the GH repository (using `GIT`)
Expand All @@ -44,15 +41,8 @@ $ docker-compose up --build

Visit `http://localhost:5085` in your browser. The app should be up & running.

<br />

## ✨ Video Presentation

https://user-images.githubusercontent.com/51070104/195502745-2cfb4eff-7434-424f-ab6a-c0d91ea5e480.mp4

<br />

### ✨ Create a new `.env` file using sample `env.sample`
## ✅ Create `.env` file

The meaning of each variable can be found below:

Expand All @@ -64,9 +54,8 @@ The meaning of each variable can be found below:
- `GITHUB_ID`=<GITHUB_ID_HERE>
- `GITHUB_SECRET`=<GITHUB_SECRET_HERE>

<br />

## Manual Build
## Manual Build

> Download the code
Expand Down Expand Up @@ -160,7 +149,7 @@ By default, the app redirects guest users to authenticate. In order to access th

<br />

## ✨ Code-base structure
## ✅ Codebase

The project is coded using blueprints, app factory pattern, dual configuration profile (development and production) and an intuitive structure presented bellow:

Expand Down Expand Up @@ -213,7 +202,7 @@ The project is coded using blueprints, app factory pattern, dual configuration p

<br />

## [PRO Version](https://appseed.us/product/volt-dashboard-pro/flask/)
## [PRO Version](https://appseed.us/product/volt-dashboard-pro/flask/)

> For more components, pages and priority on support, feel free to take a look at this amazing starter:
Expand All @@ -223,8 +212,6 @@ Volt Pro is a premium Bootstrap 5 Admin Dashboard featuring over 800 components,
-`Enhanced UI` - more pages and components
-`Priority` on support

<br >

![Volt Dashboard PRO - Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/172672843-8c40a801-3438-4e9c-86db-38a34191fbdf.png)

<br />
Expand Down
6 changes: 2 additions & 4 deletions apps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Copyright (c) 2019 - present AppSeed.us
"""

import os

from flask import Flask
from flask_login import LoginManager
from flask_sqlalchemy import SQLAlchemy
Expand Down Expand Up @@ -53,9 +51,9 @@ def create_app(config):
app = Flask(__name__)
app.config.from_object(config)
register_extensions(app)
register_blueprints(app)

app.register_blueprint(github_blueprint, url_prefix="/login")
app.register_blueprint(github_blueprint, url_prefix="/login")

register_blueprints(app)
configure_database(app)
return app
1 change: 0 additions & 1 deletion apps/authentication/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from flask_dance.consumer import oauth_authorized
from flask_dance.contrib.github import github, make_github_blueprint
from flask_dance.consumer.storage.sqla import SQLAlchemyStorage
from flask_dance.contrib.twitter import twitter, make_twitter_blueprint
from sqlalchemy.orm.exc import NoResultFound
from apps.config import Config
from .models import Users, db, OAuth
Expand Down
31 changes: 16 additions & 15 deletions apps/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,10 @@ class Config(object):

basedir = os.path.abspath(os.path.dirname(__file__))

# Assets Management
ASSETS_ROOT = os.getenv('ASSETS_ROOT', '/static/assets')

# Set up the App SECRET_KEY
SECRET_KEY = os.getenv('SECRET_KEY', None)
if not SECRET_KEY:
SECRET_KEY = ''.join(random.choice( string.ascii_lowercase ) for i in range( 32 ))

# Social AUTH context
SOCIAL_AUTH_GITHUB = False

GITHUB_ID = os.getenv('GITHUB_ID' , None)
GITHUB_SECRET = os.getenv('GITHUB_SECRET', None)

# Enable/Disable Github Social Login
if GITHUB_ID and GITHUB_SECRET:
SOCIAL_AUTH_GITHUB = True
SECRET_KEY = ''.join(random.choice( string.ascii_lowercase ) for i in range( 32 ))

SQLALCHEMY_TRACK_MODIFICATIONS = False

Expand Down Expand Up @@ -63,8 +50,20 @@ class Config(object):
if USE_SQLITE:

# This will create a file in <app> FOLDER
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3')
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3')

# Assets Management
ASSETS_ROOT = os.getenv('ASSETS_ROOT', '/static/assets')

SOCIAL_AUTH_GITHUB = False

GITHUB_ID = os.getenv('GITHUB_ID')
GITHUB_SECRET = os.getenv('GITHUB_SECRET')

# Enable/Disable Github Social Login
if GITHUB_ID and GITHUB_SECRET:
SOCIAL_AUTH_GITHUB = True

class ProductionConfig(Config):
DEBUG = False

Expand All @@ -73,9 +72,11 @@ class ProductionConfig(Config):
REMEMBER_COOKIE_HTTPONLY = True
REMEMBER_COOKIE_DURATION = 3600


class DebugConfig(Config):
DEBUG = True


# Load all possible configurations
config_dict = {
'Production': ProductionConfig,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

"name": "boilerplate-code-flask-dashboard",
"mastertemplate": "boilerplate-code-flask-dashboard",
"version": "2stable.0.1",
Expand Down
30 changes: 16 additions & 14 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
flask==2.0.2
flask_login==0.5.0
flask_migrate==3.1.0
flask==2.2.5
Werkzeug==2.3.7
jinja2==3.1.2
flask-login==0.6.2
flask_migrate==4.0.4
WTForms==3.0.1
flask_wtf==1.0.0
flask_sqlalchemy==2.5.1
sqlalchemy==1.4.29
email_validator==1.1.3
gunicorn==20.1.0
jinja2==3.0.3
flask-restx==0.5.1
Werkzeug==2.0.3
flask_wtf==1.2.1
flask-sqlalchemy==3.0.5
sqlalchemy==2.0.21
email_validator==2.0.0
flask-restx==1.1.0

python-dotenv==0.19.2

gunicorn==20.1.0
Flask-Minify==0.37
Flask-Dance==5.1.0
blinker==1.4
pyOpenSSL

flask-dance==7.0.0
blinker==1.6.2

# flask_mysqldb
# psycopg2-binary
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

if not DEBUG:
Minify(app=app, html=True, js=False, cssless=False)

if DEBUG:
app.logger.info('DEBUG = ' + str(DEBUG) )
app.logger.info('Page Compression = ' + 'FALSE' if DEBUG else 'TRUE' )
Expand Down

0 comments on commit f1f1356

Please sign in to comment.