Skip to content

Commit daa043c

Browse files
committed
Initial commit
0 parents  commit daa043c

File tree

342 files changed

+58203
-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.

342 files changed

+58203
-0
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SECRET_KEY=S3cr3t_K#Key

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
flask/
2+
*.pyc
3+
dev
4+
node_modules
5+
app/database.db
6+
app/build
7+
yarn.lock
8+
yarn-error.log
9+
*.psd
10+
env/
11+
env__/
12+
.vscode/symbols.json
13+
app/db.sqlite3
14+
15+
app/static/assets/node_modules
16+
app/static/assets/yarn.lock
17+
app/static/assets/.temp

CHANGELOG.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Change Log
2+
3+
## [1.0.4] 2021-01-19
4+
### Improvements
5+
6+
- Migrate all UI kit pages to Jinja
7+
8+
## [1.0.3] 2022-01-17
9+
### Improvements
10+
11+
- Bump Flask Codebase to [v2.0.0](https://github.com/app-generator/boilerplate-code-flask/releases)
12+
- Dependencies update (all packages)
13+
- Flask==2.0.2 (latest stable version)
14+
- flask_wtf==1.0.0
15+
- jinja2==3.0.3
16+
- flask-restx==0.5.1
17+
18+
## [1.0.2] 2021-10-30
19+
### Improvements
20+
21+
- Bump UI: Material Kit v3.0.0
22+
- Update Bootstrap to v5.1.1
23+
- Update to Material Design 2
24+
- Bump Codebase: [Flask Boilerplate](https://github.com/app-generator/boilerplate-code-flask) v1.0.7
25+
- Dependencies update (all packages)
26+
- Flask==2.0.1 (latest stable version)
27+
- Better Code formatting
28+
- Improved Files organization
29+
- Optimize imports
30+
- Docker Scripts Update
31+
- Gulp Tooling (SASS Compilation)
32+
33+
## [1.0.1] 2021-05-29
34+
### Improvements
35+
36+
- Bump UI: Material Kit - v2.0.7
37+
- Bump Codebase: [Flask Boilerplate](https://github.com/app-generator/boilerplate-code-flask) v1.0.5
38+
39+
## [1.0.0] 2020-02-07
40+
### Initial Release

Dockerfile

+14
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

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
| Create HTML/CSS template for sale | NO |
25+
| Create Theme/Template for CMS for sale | NO |
26+
| Separate sale of our UI Elements | NO |
27+
28+
<br />
29+
30+
---
31+
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* >

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn run:app --log-file=-

README.md

+277
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
# [Flask Material Kit](https://appseed.us/apps/flask-apps/flask-material-kit)
2+
3+
`Open-Source` seed project generated by AppSeed in **[Flask](https://appseed.us/admin-dashboards/flask)** Framework on top of **[Material Kit](https://appseed.us/apps/flask-apps/flask-material-kit)** design. Designed for those who like bold elements and beautiful websites, **Material Kit 2** is ready to help you create stunning websites and web apps. `Material Kit 2` is built with over 60 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+
> Features:
8+
9+
- `Up-to-date dependencies`
10+
- [SCSS compilation](#recompile-css) via **Gulp**
11+
- UI Kit: **Material Kit - v3.0.0** (Bootstrap 5 Version) by **Creative-Tim**
12+
- SQLite database, Flask-SQLAlchemy ORM
13+
- Session-Based auth flow (login, register)
14+
- `Deployment`: **Docker**, Gunicorn / Nginx, Heroku
15+
- Support via **Github** (issues tracker) and [Discord](https://discord.gg/fZC6hup).
16+
17+
<br />
18+
19+
> Links
20+
21+
- 👉 [Flask Material Kit](https://appseed.us/apps/flask-apps/flask-material-kit) - product page
22+
- 👉 [Flask Material Kit](https://flask-material-kit.appseed-srv1.com) - LIVE Demo
23+
- 👉 More [Flask Apps](https://appseed.us/apps/flask-apps) - provided by AppSeed
24+
25+
<br />
26+
27+
## ✨ Quick Start in `Docker`
28+
29+
> Get the code
30+
31+
```bash
32+
$ git clone https://github.com/app-generator/flask-material-kit.git
33+
$ cd flask-material-kit
34+
```
35+
36+
> Start the app in Docker
37+
38+
```bash
39+
$ docker-compose up --build
40+
```
41+
42+
Visit `http://localhost:85` in your browser. The app should be up & running.
43+
44+
<br />
45+
46+
![Flask Material Kit 2 - Starter provided by AppSeed.](https://user-images.githubusercontent.com/51070104/139474054-a223e8e0-d441-4f9f-8237-627a77bdd49c.gif)
47+
48+
<br />
49+
50+
## ✨ Build from sources
51+
52+
```bash
53+
$ # Clone the sources
54+
$ git clone https://github.com/app-generator/flask-material-kit.git
55+
$ cd flask-material-kit
56+
$
57+
$ # Virtualenv modules installation (Unix based systems)
58+
$ virtualenv env
59+
$ source env/bin/activate
60+
$
61+
$ # Virtualenv modules installation (Windows based systems)
62+
$ # virtualenv env
63+
$ # .\env\Scripts\activate
64+
$
65+
$ # Install requirements
66+
$ pip3 install -r requirements.txt
67+
$
68+
$ # Set the FLASK_APP environment variable
69+
$ (Unix/Mac) export FLASK_APP=run.py
70+
$ (Windows) set FLASK_APP=run.py
71+
$ (Powershell) $env:FLASK_APP = ".\run.py"
72+
$
73+
$ # Set up the DEBUG environment
74+
$ # (Unix/Mac) export FLASK_ENV=development
75+
$ # (Windows) set FLASK_ENV=development
76+
$ # (Powershell) $env:FLASK_ENV = "development"
77+
$
78+
$ # Run the application
79+
$ # --host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1)
80+
$ # --port=5000 - specify the app port (default 5000)
81+
$ flask run --host=0.0.0.0 --port=5000
82+
$
83+
$ # Access the app in browser: http://127.0.0.1:5000/
84+
```
85+
86+
> Note: To use the app, please access the registration page and create a new user. After authentication, the app will unlock the private pages.
87+
88+
<br />
89+
90+
## ✨ Code-base structure
91+
92+
The project has a super simple structure, represented as bellow:
93+
94+
```bash
95+
< PROJECT ROOT >
96+
|
97+
|-- app/
98+
| |-- static/
99+
| | |-- <css, JS, images> # CSS files, Javascripts files
100+
| |
101+
| |-- templates/
102+
| | |
103+
| | |-- includes/ # Page chunks, components
104+
| | | |
105+
| | | |-- navigation.html # Top bar
106+
| | | |-- sidebar.html # Left sidebar
107+
| | | |-- scripts.html # JS scripts common to all pages
108+
| | | |-- footer.html # The common footer
109+
| | |
110+
| | |-- layouts/ # App Layouts (the master pages)
111+
| | | |
112+
| | | |-- base.html # Used by common pages like index, UI
113+
| | | |-- base-fullscreen.html # Used by auth pages (login, register)
114+
| | |
115+
| | |-- accounts/ # Auth Pages (login, register)
116+
| | | |
117+
| | | |-- login.html # Use layout `base-fullscreen.html`
118+
| | | |-- register.html # Use layout `base-fullscreen.html`
119+
| | |
120+
| | |-- home/ # UI Kit Pages
121+
| | |-- index.html # Index page
122+
| | |-- 404-page.html # 404 page
123+
| | |-- *.html # All other pages
124+
| |
125+
| config.py # Provides APP Configuration
126+
| forms.py # Defines Forms (login, register)
127+
| models.py # Defines app models
128+
| views.py # Application Routes
129+
|
130+
|-- Dockerfile # Deployment
131+
|-- docker-compose.yml # Deployment
132+
|-- gunicorn-cfg.py # Deployment
133+
|-- nginx # Deployment
134+
| |-- appseed-app.conf # Deployment
135+
|
136+
|-- requirements.txt
137+
|-- run.py
138+
|
139+
|-- ************************************************************************
140+
```
141+
142+
<br />
143+
144+
## ✨ Recompile CSS
145+
146+
To recompile SCSS files, follow this setup:
147+
148+
<br />
149+
150+
**Step #1** - Install tools
151+
152+
- [NodeJS](https://nodejs.org/en/) 12.x or higher
153+
- [Gulp](https://gulpjs.com/) - globally
154+
- `npm install -g gulp-cli`
155+
- [Yarn](https://yarnpkg.com/) (optional)
156+
157+
<br />
158+
159+
**Step #2** - Change the working directory to `assets` folder
160+
161+
```bash
162+
$ cd app/static/assets
163+
```
164+
165+
<br />
166+
167+
**Step #3** - Install modules (this will create a classic `node_modules` directory)
168+
169+
```bash
170+
$ npm install
171+
// OR
172+
$ yarn
173+
```
174+
175+
<br />
176+
177+
**Step #4** - Edit & Recompile SCSS files
178+
179+
```bash
180+
$ gulp scss
181+
```
182+
183+
The generated file is saved in `static/assets/css` directory.
184+
185+
<br />
186+
187+
## ✨ Deployment
188+
189+
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/).
190+
191+
### [Heroku](https://www.heroku.com/)
192+
---
193+
194+
Steps to deploy on **Heroku**
195+
196+
- [Create a FREE account](https://signup.heroku.com/) on Heroku platform
197+
- [Install the Heroku CLI](https://devcenter.heroku.com/articles/getting-started-with-python#set-up) that match your OS: Mac, Unix or Windows
198+
- Open a terminal window and authenticate via `heroku login` command
199+
- Clone the sources and push the project for LIVE deployment
200+
201+
```bash
202+
$ # Clone the source code:
203+
$ git clone https://github.com/app-generator/flask-material-kit.git
204+
$ cd flask-material-kit
205+
$
206+
$ # Check Heroku CLI is installed
207+
$ heroku -v
208+
heroku/7.25.0 win32-x64 node-v12.13.0 # <-- All good
209+
$
210+
$ # Check Heroku CLI is installed
211+
$ heroku login
212+
$ # this commaond will open a browser window - click the login button (in browser)
213+
$
214+
$ # Create the Heroku project
215+
$ heroku create
216+
$
217+
$ # Trigger the LIVE deploy
218+
$ git push heroku master
219+
$
220+
$ # Open the LIVE app in browser
221+
$ heroku open
222+
```
223+
224+
<br />
225+
226+
### [Gunicorn](https://gunicorn.org/)
227+
---
228+
229+
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX.
230+
231+
> Install using pip
232+
233+
```bash
234+
$ pip install gunicorn
235+
```
236+
> Start the app using gunicorn binary
237+
238+
```bash
239+
$ gunicorn --bind 0.0.0.0:8001 run:app
240+
Serving on http://localhost:8001
241+
```
242+
243+
Visit `http://localhost:8001` in your browser. The app should be up & running.
244+
245+
<br />
246+
247+
### [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/)
248+
---
249+
250+
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.
251+
252+
> Install using pip
253+
254+
```bash
255+
$ pip install waitress
256+
```
257+
> Start the app using [waitress-serve](https://docs.pylonsproject.org/projects/waitress/en/stable/runner.html)
258+
259+
```bash
260+
$ waitress-serve --port=8001 run:app
261+
Serving on http://localhost:8001
262+
```
263+
264+
Visit `http://localhost:8001` in your browser. The app should be up & running.
265+
266+
<br />
267+
268+
## ✨ Credits & Links
269+
270+
- [Flask Framework](https://www.palletsprojects.com/p/flask/) - The official website
271+
- [Boilerplate Code](https://appseed.us/boilerplate-code) - Index provided by **AppSeed**
272+
- [Boilerplate Code](https://github.com/app-generator/boilerplate-code) - Index published on Github
273+
274+
<br />
275+
276+
---
277+
[Flask Material Kit](https://appseed.us/apps/flask-apps/flask-material-kit) - Provided by **AppSeed** [App Generator](https://appseed.us/app-generator).

0 commit comments

Comments
 (0)