Skip to content

Commit

Permalink
Release v1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
app-generator committed May 30, 2022
1 parent 39ddf3d commit 3c97053
Show file tree
Hide file tree
Showing 1,991 changed files with 632,226 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
__pycache__
*.pyc
*.pyo
*.pyd
10 changes: 10 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DEBUG=False
FLASK_APP=run.py
FLASK_ENV=development
ASSETS_ROOT=/static/assets
DB_ENGINE=mysql
DB_HOST=localhost
DB_NAME=appseed_db
DB_USERNAME=appseed_db_usr
DB_PASS=pass
DB_PORT=3306
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# tests and coverage
*.pytest_cache
.coverage

# database & logs
*.db
*.sqlite3
*.log

# venv
env
venv

# other
.DS_Store

# sphinx docs
_build
_static
_templates

# javascript
package-lock.json
.vscode/symbols.json

apps/static/assets/node_modules
apps/static/assets/yarn.lock
apps/static/assets/.temp

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.8] 2022-05-30
### Improvements

- Built with [AdminLTE Generator](https://appseed.us/generator/adminlte/)
- Timestamp: `2022-05-30 20:53`

## [1.0.7] 2022-01-16
### Improvements

Expand Down
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.9

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

COPY requirements.txt .

# install python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# gunicorn
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
32 changes: 32 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 |
| Production deployment assistance | 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 < *support@appseed.us* >
264 changes: 264 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
# [AdminLTE](https://appseed.us/generator/adminlte/) Flask

Open-source **Flask Dashboard** generated by `AppSeed` op top of an iconic design. For newcomers, **[AdminLTE](https://appseed.us/generator/adminlte/)** is one of the best open-source admin dashboard & control panel theme. Built on top of Bootstrap, `AdminLTE` provides a range of responsive, reusable, and commonly used components.

- 👉 [AdminLTE Flask](https://appseed.us/product/adminlte/flask/) - product page
- 👉 [AdminLTE Flask](https://adminlte-flask.appseed-srv1.com/) - LIVE Deployment

<br />

> Built with [AdminLTE Generator](https://appseed.us/generator/adminlte/)
- Timestamp: `2022-05-30 20:53`
- Build ID: `c948e10d-52fb-4b6b-b80e-e2740735eb3c`
- **Free [Support](https://appseed.us/support/)** (registered users) via `Email` and `Discord`

<br />

> Features
- `Up-to-date dependencies`
- Database: `mysql`
- `DB Tools`: SQLAlchemy ORM, Flask-Migrate (schema migrations)
- Session-Based authentication (via **flask_login**), Forms validation

<br />

![AdminLTE - Full-Stack Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/168842202-9b80a957-a375-4e6d-8247-2cc459267a86.png)

<br />


## ✨ Start the app in Docker

> **Step 1** - Download the code from the GH repository (using `GIT`)
```bash
$ # Get the code
$ git clone https://github.com/app-generator/flask-adminlte.git
$ cd flask-adminlte
```

<br />

> **Step 2** - Edit `.env` and set `DEBUG=True`. This will activate the `SQLite` persistance.
```txt
DEBUG=True
```

<br />

> **Step 3** - Start the APP in `Docker`
```bash
$ docker-compose up --build
```

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

<br />



## ✨ Set up the MySql Database

**Note:** Make sure your Mysql server is properly installed and accessible.

> **Step 1** - Create the MySql Database to be used by the app
- `Create a new MySql` database
- `Create a new user` and assign full privilegies (read/write)

<br />

> **Step 2** - Edit the `.env` to match your MySql DB credentials. Make sure `DB_ENGINE` is set to `mysql`.
- `DB_ENGINE` : `mysql`
- `DB_NAME` : default value = `appseed_db`
- `DB_HOST` : default value = `localhost`
- `DB_PORT` : default value = `3306`
- `DB_USERNAME`: default value = `appseed_db_usr`
- `DB_PASS` : default value = `pass`

<br />

Here is a sample:

```txt
# .env sample
DEBUG=False # False enables the MySql Persistence
DB_ENGINE=mysql # Database Driver
DB_NAME=appseed_flask # Database Name
DB_USERNAME=appseed_flask_usr # Database User
DB_PASS=STRONG_PASS_HERE # Password
DB_HOST=localhost # Database HOST, default is localhost
DB_PORT=3306 # MySql port, default = 3306
```

<br />


## ✨ How to use it

> Download the code
```bash
$ # Get the code
$ git clone https://github.com/app-generator/flask-adminlte.git
$ cd flask-adminlte
```

<br />

### 👉 Set Up for `Unix`, `MacOS`

> Install modules via `VENV`
```bash
$ virtualenv env
$ source env/bin/activate
$ pip3 install -r requirements.txt
```

<br />

> Set Up Flask Environment
```bash
$ export FLASK_APP=run.py
$ export FLASK_ENV=development
```

<br />

> Start the app
```bash
$ flask run
```

At this point, the app runs at `http://127.0.0.1:5000/`.

<br />

### 👉 Set Up for `Windows`

> Install modules via `VENV` (windows)
```
$ virtualenv env
$ .\env\Scripts\activate
$ pip3 install -r requirements.txt
```

<br />

> Set Up Flask Environment
```bash
$ # CMD
$ set FLASK_APP=run.py
$ set FLASK_ENV=development
$
$ # Powershell
$ $env:FLASK_APP = ".\run.py"
$ $env:FLASK_ENV = "development"
```

<br />

> Start the app
```bash
$ flask run
```

At this point, the app runs at `http://127.0.0.1:5000/`.

<br />

### 👉 Create Users

By default, the app redirects guest users to authenticate. In order to access the private pages, follow this set up:

- Start the app via `flask run`
- Access the `registration` page and create a new user:
- `http://127.0.0.1:5000/register`
- Access the `sign in` page and authenticate
- `http://127.0.0.1:5000/login`

<br />

## ✨ Code-base structure

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

```bash
< PROJECT ROOT >
|
|-- apps/
| |
| |-- home/ # A simple app that serve HTML files
| | |-- routes.py # Define app routes
| |
| |-- authentication/ # Handles auth routes (login and register)
| | |-- routes.py # Define authentication routes
| | |-- models.py # Defines models
| | |-- forms.py # Define auth forms (login and register)
| |
| |-- static/
| | |-- <css, JS, images> # CSS files, Javascripts files
| |
| |-- templates/ # Templates used to render pages
| | |-- includes/ # HTML chunks and components
| | | |-- navigation.html # Top menu component
| | | |-- sidebar.html # Sidebar component
| | | |-- footer.html # App Footer
| | | |-- scripts.html # Scripts common to all pages
| | |
| | |-- layouts/ # Master pages
| | | |-- base-fullscreen.html # Used by Authentication pages
| | | |-- base.html # Used by common pages
| | |
| | |-- accounts/ # Authentication pages
| | | |-- login.html # Login page
| | | |-- register.html # Register page
| | |
| | |-- home/ # UI Kit Pages
| | |-- index.html # Index page
| | |-- 404-page.html # 404 page
| | |-- *.html # All other pages
| |
| config.py # Set up the app
| __init__.py # Initialize the app
|
|-- requirements.txt # App Dependencies
|
|-- .env # Inject Configuration via Environment
|-- run.py # Start the app - WSGI gateway
|
|-- ************************************************************************
```

<br />

## ✨ PRO Version

> For more components, pages and priority on support, feel free to take a look at this amazing starter:
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.

- 👉 [Soft UI Dashboard PRO Flask](https://appseed.us/product/soft-ui-dashboard-pro/flask/) - Product Page
- 👉 [Soft UI Dashboard PRO Flask](https://flask-soft-ui-dashboard-pro.appseed-srv1.com/) - LIVE Demo

<br >

![Soft UI Dashboard PRO - Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/170829870-8acde5af-849a-4878-b833-3be7e67cff2d.png)

<br />

---
[AdminLTE](https://appseed.us/generator/adminlte/) Flask - Open-source starter generated by **[AppSeed Generator](https://appseed.us/generator/)**.
Loading

0 comments on commit 3c97053

Please sign in to comment.