Skip to content

Commit 4ad535b

Browse files
committed
Release v1.0.2 - Generated Version
1 parent bd502cc commit 4ad535b

File tree

295 files changed

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

295 files changed

+62472
-0
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Change Log
2+
3+
## [1.0.2] 2022-11-20
4+
### Improvements
5+
6+
- Build the project using the [App Generator](https://appseed.us/generator/react/)
7+
- Timestamp `2022-11-20 06:43`
8+
- Go LIVE using the [LIVE Deployer](https://appseed.us/go-live/)
9+
- [Drag & Drop](https://www.youtube.com/watch?v=gwWfahWPt2A) Deployment Service
10+
11+
## [1.0.1] 2022-01-28
12+
### Improvements
13+
14+
- Minor changes (Flask API & React)
15+
16+
## [1.0.0] 2021-11-18
17+
### Initial Release
18+
19+
- UI: [Soft UI Dashboard React](https://github.com/app-generator/react-soft-ui-dashboard) **v2.0.5**
20+
- Backend Version: [Flask API Server](https://github.com/app-generator/api-server-flask) **v1.0.1**
21+

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 < *support@appseed.us* >

README.md

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# React Soft Ui Dashboard `full-stack`
2+
3+
Full-Stack Seed project generated by **[React App Generator](https://appseed.us/generator/react/)** top of *Soft Ui Dashboard* design. The backend logic is provided by a simple, `easy-to-extend` API Server that manages the Authentication flow (login, registration, logout) using `JSON Web Tokens` (JWT).
4+
5+
- 👉 [Flask React Soft UI Dashboard](https://appseed.us/product/flask-react-soft-dashboard) - product page
6+
- 👉 [Flask React Soft UI Dashboard](https://flask-react-soft-dashboard.appseed-srv1.com/authentication/sign-in) - LIVE Demo
7+
8+
<br />
9+
10+
## [Black Friday](https://appseed.us/discounts/) - `75%OFF`
11+
12+
> The campaign is active until `30.NOV` and applies to all products and licenses.
13+
14+
[![AppSeed - Black Friday 2022 Campaign, 75% OFF Discount (all products).](https://user-images.githubusercontent.com/51070104/201829599-9fe6bdd7-3f19-46f3-9115-962eeb13bf29.jpg)](https://appseed.us/discounts/)
15+
16+
<br />
17+
18+
> Features
19+
20+
- Innovative **Material UI** Design - Crafted by [Creative-Tim](https://bit.ly/3fKQZaL)
21+
- React, Redux, Redux-persist
22+
- Authentication: JWT Login/Register/Logout
23+
- **Full-stack Ready** using a **Flask API Server** (open-source project) - Server Features
24+
- Flask / Flask-RestX / SQLite3 - a simple, easy to use backend
25+
- Authentication with JWT (login, logout, register)
26+
- Docker, Unitary tests
27+
28+
<br />
29+
30+
## `Video Presentation`
31+
32+
> This material explains how to build the project using the [App Generator](https://appseed.us/generator/react/) and deploy with [LIVE Deployer](https://appseed.us/go-live/) service.
33+
34+
https://user-images.githubusercontent.com/51070104/202889957-ea8f6808-7a72-45ec-91f7-4a02b19e63d9.mp4
35+
36+
<br />
37+
38+
## `React` Soft UI Dashboard
39+
40+
- `M-UI` based design crafted by *[Creative-Tim](https://bit.ly/3fKQZaL)*
41+
- `UI Kit`: 70+ components, `8 Sample Pages`, `3 Customized Plugins`
42+
43+
<br />
44+
45+
> `Tests` (compatibility matrix)
46+
47+
| NodeJS | NPM | YARN |
48+
| --- | --- | --- |
49+
| `v14.15.0` |||
50+
| `v16.0.0` |||
51+
| `v18.0.0` |||
52+
53+
54+
<br />
55+
56+
## `Flask API` Features
57+
58+
- Stack: `Flask` / `Flask-RestX` / **SQLite**
59+
- **DB Layer**: `SqlAlchemyORM`, `SQLite` persistence
60+
- **Auth**: JWT tokens managed via `Flask-jwt_extended`
61+
- [API Definition](https://docs.appseed.us/boilerplate-code/api-unified-definition) - the unified API structure implemented by this server
62+
63+
64+
<br />
65+
66+
## ✨ How to use it
67+
68+
Being a full-stack product, the backend and the frontend should be compiled and started separately.
69+
Before starting to compile the product, make sure you have the following tools installed in the environment:
70+
71+
- [NodeJS](https://nodejs.org/en/) - version `14.x` or higher
72+
- [GIT](https://git-scm.com/) - used to clone tjhe sources from Github
73+
- [Python3](https://www.python.org/) - used in many tools
74+
75+
<br />
76+
77+
### 👉 Start the Frontend
78+
79+
> **Step 1** - Once the project is downloaded, change the directory to `react-ui`.
80+
81+
```bash
82+
$ cd react-ui
83+
```
84+
85+
<br >
86+
87+
> **Step 2** - Install dependencies via NPM or yarn
88+
89+
```bash
90+
$ npm i
91+
// OR
92+
$ yarn
93+
```
94+
95+
<br />
96+
97+
> **Step 3** - Start in development mode
98+
99+
```bash
100+
$ npm run start
101+
// OR
102+
$ yarn start
103+
```
104+
105+
<br />
106+
107+
At this point, the app is available in the browser `localhost:3000` (the default address).
108+
109+
110+
<br />
111+
112+
### 👉 Start the Backend Server
113+
114+
> **Step 1** - Change the directory to `api-server-flask`
115+
116+
```bash
117+
$ cd api-server-flask
118+
```
119+
120+
<br >
121+
122+
> **Step 2** - Install dependencies using a `virtual environment`
123+
124+
```bash
125+
$ # Virtualenv modules installation (Unix based systems)
126+
$ virtualenv env
127+
$ source env/bin/activate
128+
$
129+
$ # Virtualenv modules installation (Windows based systems)
130+
$ # virtualenv env
131+
$ # .\env\Scripts\activate
132+
$
133+
$ pip install -r requirements.txt
134+
```
135+
136+
<br />
137+
138+
> **Step 3** - Setup the `Flask` environment
139+
140+
```bash
141+
$ export FLASK_APP=run.py
142+
$ export FLASK_ENV=development
143+
// OR
144+
$ (Windows CMD) set FLASK_APP=run.py
145+
$ (Windows CMD) set FLASK_ENV=development
146+
$
147+
$ (Powershell) $env:FLASK_APP = ".\run.py"
148+
$ (Powershell) $env:FLASK_ENV = "development"
149+
```
150+
151+
<br />
152+
153+
> **Step 4** - Start the API server (development mode)
154+
155+
```bash
156+
$ flask run
157+
```
158+
159+
Use the API via `POSTMAN` or `Swagger Dashboard` at `localhost:5000`.
160+
161+
<br />
162+
163+
## 👉 Codebase Structure
164+
165+
```bash
166+
< ROOT >
167+
|
168+
api-server-flask/
169+
├── api
170+
│ ├── config.py
171+
│ ├── __init__.py
172+
│ ├── models.py
173+
│ └── routes.py
174+
├── requirements.txt
175+
├── run.py
176+
└── tests.py
177+
```
178+
179+
<br />
180+
181+
182+
183+
<br />
184+
185+
## PRO Version
186+
187+
> For more components, pages and priority on support, feel free to take a look at this amazing starter:
188+
189+
Soft UI Dashboard is a premium React Design now available for download as a full-stack app. 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.
190+
191+
- 👉 [React Soft UI Dashboard PRO](https://appseed.us/product/soft-ui-dashboard-pro/full-stack/) - Product Page
192+
-`Enhanced UI` - more pages and components
193+
-`Priority` on support
194+
195+
<br >
196+
197+
![Soft UI Dashboard PRO - Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/170829870-8acde5af-849a-4878-b833-3be7e67cff2d.png)
198+
199+
<br />
200+
201+
---
202+
**React Soft Ui Dashboard** - Full-Stack Seed project generated by **[App Generator](https://appseed.us/generator/)**.

api-server-flask/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SECRET_KEY=S3cr3t_K#Key

api-server-flask/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
flask/
2+
*.pyc
3+
dev
4+
api/apidata.db
5+
yarn.lock
6+
yarn-error.log
7+
*.psd
8+
env/
9+
env__/
10+
.vscode/symbols.json
11+
app/db.sqlite3

api-server-flask/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Change Log
2+
3+
## [1.0.3] 2022-11-05
4+
### Improvements
5+
6+
- Updated for Deploy on RENDER using [Python Deployer](https://github.com/app-generator/deploy-automation-render)
7+
- `python.exe .\deployer.py flask https://github.com/app-generator/api-server-flask`
8+
- The new API is usable via `https://api-server-flask-<RANDOM>.onrender.com/api/`
9+
10+
## [1.0.2] 2022-06-07
11+
### Improvements
12+
13+
- Update dependencies
14+
15+
## [1.0.1] 2021-11-16
16+
### Improvements
17+
18+
- Tables automatic creation
19+
- Dependencies Update:
20+
- Flask==2.0.2
21+
- flask-restx==0.5.1
22+
- Docker Scripts
23+
24+
## [1.0.0] 2021-07-20
25+
### Stable release
26+
27+
- Persistance: SQLite3
28+
- Stack: Flask / Flask-JWT-Extended / SQLAlchemy
29+
- API:
30+
- Sign UP: `/api/users/register`
31+
- Sign IN: `/api/users/login`
32+
- Logout: `/api/users/logout`
33+

api-server-flask/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"]

api-server-flask/LICENSE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# MIT License
2+
3+
Copyright (c) 2019 - present [AppSeed](http://appseed.us/)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
23+
<br />
24+
25+
---
26+
For more information regarding licensing, please contact AppSeed < *support @ appseed.us* >

api-server-flask/api/__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+
import json
7+
8+
from flask import Flask
9+
from flask_cors import CORS
10+
11+
from .routes import rest_api
12+
from .models import db
13+
14+
app = Flask(__name__)
15+
16+
app.config.from_object('api.config.BaseConfig')
17+
18+
db.init_app(app)
19+
rest_api.init_app(app)
20+
CORS(app)
21+
22+
# Setup database
23+
@app.before_first_request
24+
def initialize_database():
25+
db.create_all()
26+
27+
"""
28+
Custom responses
29+
"""
30+
31+
@app.after_request
32+
def after_request(response):
33+
"""
34+
Sends back a custom error with {"success", "msg"} format
35+
"""
36+
37+
if int(response.status_code) >= 400:
38+
response_data = json.loads(response.get_data())
39+
if "errors" in response_data:
40+
response_data = {"success": False,
41+
"msg": list(response_data["errors"].items())[0][1]}
42+
response.set_data(json.dumps(response_data))
43+
response.headers.add('Content-Type', 'application/json')
44+
return response

0 commit comments

Comments
 (0)