-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e1e8f40
Showing
2,460 changed files
with
69,910 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SECRET_KEY=S3cr3t_K#Key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
flask/ | ||
*.pyc | ||
dev | ||
node_modules | ||
app/database.db | ||
app/build | ||
yarn.lock | ||
yarn-error.log | ||
*.psd | ||
env/ | ||
env__/ | ||
.vscode/symbols.json | ||
app/db.sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Change Log | ||
|
||
## [1.0.3] 2021-01-01 | ||
### Improvements | ||
|
||
- 2021-01-01 - Registration | ||
- Hide the form on success | ||
|
||
- 2020-06-28 - Update the UI Kit | ||
- Quick UI KIt by Webpixels | ||
|
||
- 2020-06-22 - Added HEROKU support. Impacted files: | ||
- runtime.txt - Bump the Python version to 3.6.10 | ||
- README added new section for HEROKU deployment | ||
|
||
## [1.0.2] 2020-06-18 | ||
### Improvements | ||
|
||
- The password storage is now Bcrypt.hashed | ||
- Added deploy scripts: Docker, Gunicorn | ||
- Added `.env` | ||
- Added `python-decouple` in `requirements.txt` | ||
- Update Sample UI Kit - [Neumorphism UI](https://themesberg.com/product/ui-kits/neumorphism-ui) by Themesberg | ||
|
||
## [1.0.1] 2020-05-30 | ||
### Improvements | ||
|
||
- Update Licensing information | ||
- Add CHANGELOG.md to track all changes | ||
- Minor update in README | ||
|
||
## [1.0.0] 2020-02-07 | ||
### Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.6 | ||
|
||
ENV FLASK_APP run.py | ||
|
||
COPY run.py gunicorn-cfg.py requirements.txt .env ./ | ||
COPY app app | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
EXPOSE 5005 | ||
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2019 - present [AppSeed](http://appseed.us/) | ||
|
||
<br /> | ||
|
||
## Licensing Information | ||
|
||
<br /> | ||
|
||
| Item | - | | ||
| ---------------------------------- | --- | | ||
| License Type | MIT | | ||
| Use for print | **YES** | | ||
| Create single personal website/app | **YES** | | ||
| Create single website/app for client | **YES** | | ||
| Create multiple website/apps for clients | **YES** | | ||
| Create multiple SaaS applications | **YES** | | ||
| End-product paying users | **YES** | | ||
| Product sale | **YES** | | ||
| Remove footer credits | **YES** | | ||
| --- | --- | | ||
| Remove copyright mentions from source code | NO | | ||
| Create HTML/CSS template for sale | NO | | ||
| Create Theme/Template for CMS for sale | NO | | ||
| Separate sale of our UI Elements | NO | | ||
|
||
<br /> | ||
|
||
--- | ||
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Commercial License | ||
|
||
Copyright (c) 2019 - present [AppSeed](http://appseed.us/) | ||
|
||
<br /> | ||
|
||
## Licensing Information | ||
|
||
All commercial web apps (including this one) provided by AppSeed are released under two configurations: | ||
|
||
<br /> | ||
|
||
### [Personal License](https://github.com/app-generator/license-personal) | ||
|
||
> For full information please access [Personal License](https://github.com/app-generator/license-personal) | ||
- Solo-developers, Small teams (max 3 members) | ||
- Updates: 6mo. | ||
- LIVE Support: 6mo. | ||
- Create single personal website/app | ||
- Create single website/app for client | ||
- Paying end-users - YES | ||
- Create SaaS application - NO | ||
- Production deployment assistance - NO | ||
|
||
<br /> | ||
|
||
### [StartUP License](https://github.com/app-generator/license-startup) | ||
|
||
> For full information please access [StartUP License](https://github.com/app-generator/license-startup) | ||
- Medium teams (max 9 members) | ||
- Updates: 12mo. | ||
- LIVE Support: 12mo. | ||
- Create single personal website/app | ||
- Create single website/app for client | ||
- Paying end-users - YES | ||
- Create SaaS application - NO | ||
- Production deployment assistance - NO | ||
|
||
<br /> | ||
|
||
### [Company License](https://github.com/app-generator/license-company) | ||
|
||
> For full information please access [Company License](https://github.com/app-generator/license-company) | ||
- Large teams (unlimited members) | ||
- Updates: 12mo. | ||
- LIVE Support: 12mo. | ||
- Create multiple personal websites/apps | ||
- Create multiple websites/apps for clients | ||
- Paying end-users - YES | ||
- Create SINGLE SaaS application - YES | ||
- Production deployment assistance - NO | ||
|
||
<br /> | ||
|
||
--- | ||
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: gunicorn run:app --log-file=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
# [Flask Boilerplate](https://appseed.us/boilerplate-code/flask-boilerplate) | ||
|
||
> 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: | ||
- UI Kit: **Quick** (Free Version) by **Webpixels** | ||
- SQLite database, Flask-SQLAlchemy ORM | ||
- Session-Based auth flow (login, register) | ||
- Deployment scripts: Docker, Gunicorn / Nginx, Heroku | ||
- Support via **Github** (issues tracker) and [Discord](https://discord.gg/fZC6hup). | ||
|
||
<br /> | ||
|
||
> Links | ||
- [Boierplate Code Flask](https://appseed.us/boilerplate-code/flask-boilerplate) - Product page | ||
- [Boierplate Code Flask - Demo](https://boilerplate-code-flask.appseed.us/) - LIVE Demo | ||
- [Boierplate Code Flask - Docs](https://docs.appseed.us/boilerplate-code/flask/) - Documentation | ||
|
||
<br /> | ||
|
||
## Want more? Go PRO! | ||
|
||
PRO versions include **Premium UI Kits**, Lifetime updates and **24/7 LIVE Support** (via [Discord](https://discord.gg/fZC6hup)) | ||
|
||
| [Flask Datta PRO](https://appseed.us/admin-dashboards/flask-dashboard-dattaable-pro) | [Flask Material PRO](https://appseed.us/admin-dashboards/flask-dashboard-material-pro) | [Flask Volt PRO](https://appseed.us/admin-dashboards/flask-dashboard-volt-pro) | | ||
| --- | --- | --- | | ||
| [![Flask Datta PRO](https://raw.githubusercontent.com/app-generator/flask-dashboard-dattaable-pro/master/media/flask-dashboard-dattaable-pro-screen.png)](https://appseed.us/admin-dashboards/flask-dashboard-dattaable-pro) | [![Flask Material PRO](https://raw.githubusercontent.com/app-generator/flask-dashboard-material-pro/master/media/flask-dashboard-material-pro-screen.png)](https://appseed.us/admin-dashboards/flask-dashboard-material-pro) | [![Flask Volt PRO](https://raw.githubusercontent.com/app-generator/flask-dashboard-volt-pro/master/media/flask-dashboard-volt-pro-screen.png)](https://appseed.us/admin-dashboards/flask-dashboard-volt-pro) | ||
|
||
<br /> | ||
<br /> | ||
|
||
![Boierplate Code Flask - Template project provided by AppSeed.](https://raw.githubusercontent.com/app-generator/boilerplate-code-flask/master/media/boilerplate-code-flask-screen.png) | ||
|
||
<br /> | ||
|
||
## Build from sources | ||
|
||
```bash | ||
$ # Clone the sources | ||
$ git clone https://github.com/app-generator/boilerplate-code-flask.git | ||
$ cd boilerplate-code-flask | ||
$ | ||
$ # Virtualenv modules installation (Unix based systems) | ||
$ virtualenv env | ||
$ source env/bin/activate | ||
$ | ||
$ # Virtualenv modules installation (Windows based systems) | ||
$ # virtualenv env | ||
$ # .\env\Scripts\activate | ||
$ | ||
$ # Install requirements | ||
$ pip3 install -r requirements.txt | ||
$ | ||
$ # Set the FLASK_APP environment variable | ||
$ (Unix/Mac) export FLASK_APP=run.py | ||
$ (Windows) set FLASK_APP=run.py | ||
$ (Powershell) $env:FLASK_APP = ".\run.py" | ||
$ | ||
$ # Set up the DEBUG environment | ||
$ # (Unix/Mac) export FLASK_ENV=development | ||
$ # (Windows) set FLASK_ENV=development | ||
$ # (Powershell) $env:FLASK_ENV = "development" | ||
$ | ||
$ # Run the application | ||
$ # --host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1) | ||
$ # --port=5000 - specify the app port (default 5000) | ||
$ flask run --host=0.0.0.0 --port=5000 | ||
$ | ||
$ # Access the app in browser: http://127.0.0.1:5000/ | ||
``` | ||
|
||
> Note: To use the app, please access the registration page and create a new user. After authentication, the app will unlock the private pages. | ||
<br /> | ||
|
||
## Code-base structure | ||
|
||
The project has a super simple structure, represented as bellow: | ||
|
||
```bash | ||
< PROJECT ROOT > | ||
| | ||
|-- app/__init__.py | ||
|-- app/ | ||
| |-- static/ | ||
| | |-- <css, JS, images> # CSS files, Javascripts files | ||
| | | ||
| |-- templates/ | ||
| | | | ||
| | |-- includes/ # Page chunks, components | ||
| | | | | ||
| | | |-- navigation.html # Top bar | ||
| | | |-- sidebar.html # Left sidebar | ||
| | | |-- scripts.html # JS scripts common to all pages | ||
| | | |-- footer.html # The common footer | ||
| | | | ||
| | |-- layouts/ # App Layouts (the master pages) | ||
| | | | | ||
| | | |-- base.html # Used by common pages like index, UI | ||
| | | |-- base-fullscreen.html # Used by auth pages (login, register) | ||
| | | | ||
| | |-- accounts/ # Auth Pages (login, register) | ||
| | | | | ||
| | | |-- login.html # Use layout `base-fullscreen.html` | ||
| | | |-- register.html # Use layout `base-fullscreen.html` | ||
| | | | ||
| | index.html # The default page | ||
| | page-404.html # Error 404 page (page not found) | ||
| | page-500.html # Error 500 page (server error) | ||
| | *.html # All other pages provided by the UI Kit | ||
| | ||
|-- requirements.txt | ||
| | ||
|-- run.py | ||
| | ||
|-- ************************************************************************ | ||
``` | ||
|
||
<br /> | ||
|
||
## Deployment | ||
|
||
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/). | ||
|
||
<br /> | ||
|
||
### [Docker](https://www.docker.com/) execution | ||
--- | ||
|
||
The application can be easily executed in a docker container. The steps: | ||
|
||
> Get the code | ||
```bash | ||
$ git clone https://github.com/app-generator/boilerplate-code-flask.git | ||
$ cd boilerplate-code-flask | ||
``` | ||
|
||
> Start the app in Docker | ||
```bash | ||
$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d | ||
``` | ||
|
||
Visit `http://localhost:5005` in your browser. The app should be up & running. | ||
|
||
<br /> | ||
|
||
### [Heroku](https://www.heroku.com/) | ||
--- | ||
|
||
Steps to deploy on **Heroku** | ||
|
||
- [Create a FREE account](https://signup.heroku.com/) on Heroku platform | ||
- [Install the Heroku CLI](https://devcenter.heroku.com/articles/getting-started-with-python#set-up) that match your OS: Mac, Unix or Windows | ||
- Open a terminal window and authenticate via `heroku login` command | ||
- Clone the sources and push the project for LIVE deployment | ||
|
||
```bash | ||
$ # Clone the source code: | ||
$ git clone https://github.com/app-generator/boilerplate-code-flask.git | ||
$ cd boilerplate-code-flask | ||
$ | ||
$ # Check Heroku CLI is installed | ||
$ heroku -v | ||
heroku/7.25.0 win32-x64 node-v12.13.0 # <-- All good | ||
$ | ||
$ # Check Heroku CLI is installed | ||
$ heroku login | ||
$ # this commaond will open a browser window - click the login button (in browser) | ||
$ | ||
$ # Create the Heroku project | ||
$ heroku create | ||
$ | ||
$ # Trigger the LIVE deploy | ||
$ git push heroku master | ||
$ | ||
$ # Open the LIVE app in browser | ||
$ heroku open | ||
``` | ||
|
||
<br /> | ||
|
||
### [Gunicorn](https://gunicorn.org/) | ||
--- | ||
|
||
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. | ||
|
||
> Install using pip | ||
```bash | ||
$ pip install gunicorn | ||
``` | ||
> Start the app using gunicorn binary | ||
```bash | ||
$ gunicorn --bind 0.0.0.0:8001 run:app | ||
Serving on http://localhost:8001 | ||
``` | ||
|
||
Visit `http://localhost:8001` in your browser. The app should be up & running. | ||
|
||
<br /> | ||
|
||
### [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/) | ||
--- | ||
|
||
Waitress (Gunicorn equivalent for Windows) is meant to be a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones that live in the Python standard library. | ||
|
||
> Install using pip | ||
```bash | ||
$ pip install waitress | ||
``` | ||
> Start the app using [waitress-serve](https://docs.pylonsproject.org/projects/waitress/en/stable/runner.html) | ||
```bash | ||
$ waitress-serve --port=8001 run:app | ||
Serving on http://localhost:8001 | ||
``` | ||
|
||
Visit `http://localhost:8001` in your browser. The app should be up & running. | ||
|
||
<br /> | ||
|
||
## Credits & Links | ||
|
||
- [Flask Framework](https://www.palletsprojects.com/p/flask/) - The official website | ||
- [Boilerplate Code](https://appseed.us/boilerplate-code) - Index provided by **AppSeed** | ||
- [Boilerplate Code](https://github.com/app-generator/boilerplate-code) - Index published on Github | ||
|
||
<br /> | ||
|
||
--- | ||
[Flask Boilerplate](https://appseed.us/boilerplate-code/flask-boilerplate) - Provided by **AppSeed** [App Generator](https://appseed.us/app-generator). |
Oops, something went wrong.