Skip to content

Commit 06e6934

Browse files
committed
Update Codebase
1 parent 32cc063 commit 06e6934

File tree

194 files changed

+48867
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+48867
-67
lines changed

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: 104 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,173 @@
1-
# [Flask React Datta Able](https://appseed.us/product/flask-react-datta-able)
1+
# [Flask React Datta Able](https://appseed.us/product/datta-able/api-server-flask/react/)
22

3-
Open-source full-stack seed project coded in React and Flask on top of a modern design from CodedThemes. The **[Flask React](https://appseed.us/product/flask-react-datta-able)** codebase is already configured with an SQLite database, API (via **Flask-RextX**), and JWT token-based authentication flow. **Datta Able** is an open-source **React Dashboard** that provides a colorful and modern design.
3+
Full-Stack Seed project generated by **[React App Generator](https://appseed.us/generator/react/)** top of *Datta Able* design from **[CodedThemes](https://codedthemes.com/?ref=appseed)**.
4+
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).
45

5-
<br />
6+
- 👉 [Flask React Datta Able](https://appseed.us/product/datta-able/api-server-flask/react/) - `Product Page`
7+
- 👉 [Flask React Datta Able](https://flask-react-datta-able.appseed-srv1.com) - `LIVE Demo`
8+
9+
![React Datta Able - Full-Stack Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/174488189-7bbb3e82-b319-487e-94ec-e295aca3f6d7.png)
10+
11+
<br >
612

7-
> Features
13+
## `React` Datta Able
814

9-
- Modern aesthetics UI design - Designed by [CodedThemes](https://bit.ly/37fF9RT)
15+
- Modern aesthetics UI design - crafted by *[CodedThemes](https://bit.ly/37fF9RT)*
1016
- React, Redux, Redux-persist
11-
- Authentication: JWT Login/Register/Logout
12-
- Backend: [Flask API Server](https://github.com/app-generator/api-server-flask)
1317

1418
<br />
1519

16-
> Links
20+
> `Tests` (compatibility matrix)
1721
18-
- [Flask React Datta Able](https://appseed.us/product/flask-react-datta-able) - product page
19-
- [Flask React Datta Able](https://flask-react-datta-able.appseed-srv1.com/) - LIVE Demo
20-
- [Flask React Datta Able](https://docs.appseed.us/products/react/flask-datta-able) - product documentation
21-
- Download Backend: [Flask API Server 📥](https://github.com/app-generator/api-server-flask/archive/refs/heads/main.zip)
22-
- Donwnload Frontend: [React Datta Able 📥](https://github.com/app-generator/react-node-js-datta-able/archive/refs/heads/main.zip)
22+
| NodeJS | NPM | YARN |
23+
| --- | --- | --- |
24+
| `v14.0.0` |||
25+
| `v16.0.0` |||
26+
| `v18.0.0` |||
2327

24-
<br >
2528

26-
> **Note**: This product can be used with other API Servers for a complete fullstack experience. **ALL API servers use an unified interface**
29+
<br />
30+
31+
## `Flask API` Features
2732

28-
- [Django API Server](https://github.com/app-generator/api-server-django) - open-source product
29-
- [Node JS API Server](https://github.com/app-generator/api-server-nodejs) - open-source product / Typescript / SQLite / TypeORM / Joy for validation
30-
- [Node JS API Server PRO](https://github.com/app-generator/api-server-nodejs-pro) - **commercial product**
31-
- SQLite / TypeORM / Joy / Docker
32-
- MongoDB / Mongoose / Joy Docker (separate branch, same project)
33+
- Stack: `Flask` / `Flask-RestX` / **SQLite**
34+
- **DB Layer**: `SqlAlchemyORM`, `SQLite` persistence
35+
- **Auth**: JWT tokens managed via `Flask-jwt_extended`
36+
- [API Definition](https://docs.appseed.us/boilerplate-code/api-unified-definition) - the unified API structure implemented by this server
3337

34-
<br />
3538

36-
![Flask React Datta Able - Open-source full stack product built in Flask and React.](https://user-images.githubusercontent.com/51070104/127129620-bae3b6b3-eb4f-4ad7-a694-5a3c1d6e37cb.png)
39+
<br />
3740

38-
<br />
41+
## ✨ How to use it
3942

40-
## Start Flask API Server
43+
Being a full-stack product, the backend and the frontend should be compiled and started separately.
44+
Before starting to compile the product, make sure you have the following tools installed in the environment:
4145

42-
Simple starter built with Python / Flask-RestX / Sqlite3 and JWT Auth. The authentication flow is based on [json web tokens](https://jwt.io).
46+
- [NodeJS](https://nodejs.org/en/) - version `14.x` or higher
47+
- [GIT](https://git-scm.com/) - used to clone tjhe sources from Github
48+
- [Python3](https://www.python.org/) - used in many tools
4349

4450
<br />
4551

46-
> How to use the code
52+
### 👉 Start the Frontend
4753

48-
**Clone the sources**
54+
> **Step 1** - Once the project is downloaded, change the directory to `react-ui`.
4955
5056
```bash
51-
$ git clone https://github.com/app-generator/api-server-flask.git
52-
$ cd api-server-flask
57+
$ cd react-ui
5358
```
5459

55-
**Create a virtual environment**
56-
57-
```bash
58-
$ virtualenv -p python3 venv
59-
$ source venv/bin/activate
60-
```
60+
<br >
6161

62-
**Install dependencies** using pip
62+
> **Step 2** - Install dependencies via NPM or yarn
6363
6464
```bash
65-
$ pip install -r requirements.txt
65+
$ npm i
66+
// OR
67+
$ yarn
6668
```
6769

68-
**Set up the environment**
70+
<br />
71+
72+
> **Step 3** - Start in development mode
6973
7074
```bash
71-
$ export FLASK_APP=run.py
72-
$ export FLASK_ENV=development
75+
$ npm run start
76+
// OR
77+
$ yarn start
7378
```
7479

75-
The API server will start using the default port `5000`.
76-
7780
<br />
7881

79-
## Start React UI
82+
At this point, the app is available in the browser `localhost:3000` (the default address).
83+
8084

81-
To use the product Node JS (>= 12.x) is required and GIT to clone/download the project from the public repository.
85+
<br />
8286

83-
**Step #1** - Clone the project
87+
### 👉 Start the Backend Server
88+
89+
> **Step 1** - Change the directory to `api-server-flask`
8490
8591
```bash
86-
$ git clone https://github.com/app-generator/react-datta-able-dashboard.git
87-
$ cd react-datta-able-dashboard
92+
$ cd api-server-flask
8893
```
8994

9095
<br >
9196

92-
**Step #2** - Install dependencies via NPM or yarn
97+
> **Step 2** - Install dependencies using a `virtual environment`
9398
9499
```bash
95-
$ npm i
96-
// OR
97-
$ yarn
100+
$ # Virtualenv modules installation (Unix based systems)
101+
$ virtualenv env
102+
$ source env/bin/activate
103+
$
104+
$ # Virtualenv modules installation (Windows based systems)
105+
$ # virtualenv env
106+
$ # .\env\Scripts\activate
107+
$
108+
$ pip install -r requirements.txt
98109
```
99110

100111
<br />
101112

102-
**Step #3** - Start in development mode
113+
> **Step 3** - Setup the `Flask` environment
103114
104115
```bash
105-
$ npm run start
106-
// OR
107-
$ yarn start
116+
$ export FLASK_APP=run.py
117+
$ export FLASK_ENV=development
118+
// OR
119+
$ (Windows CMD) set FLASK_APP=run.py
120+
$ (Windows CMD) set FLASK_ENV=development
121+
$
122+
$ (Powershell) $env:FLASK_APP = ".\run.py"
123+
$ (Powershell) $env:FLASK_ENV = "development"
108124
```
109125

110126
<br />
111127

112-
## Configure the backend server
128+
> **Step 4** - Start the API server (development mode)
129+
130+
```bash
131+
$ flask run
132+
```
133+
134+
Use the API via `POSTMAN` or `Swagger Dashboard` at `localhost:5000`.
113135

114-
The product comes with a usable JWT Authentication flow that provides only the basic requests: login/logout/register.
136+
<br />
115137

116-
**API Server URL** - `src/config/constant.js`
138+
## 👉 Codebase Structure
117139

118-
```javascript
119-
const config = {
120-
...
121-
API_SERVER: 'http://localhost:5000/api/' // <-- The magic line
122-
};
140+
```bash
141+
< ROOT >
142+
|
143+
api-server-flask/
144+
├── api
145+
│ ├── config.py
146+
│ ├── __init__.py
147+
│ ├── models.py
148+
│ └── routes.py
149+
├── requirements.txt
150+
├── run.py
151+
└── tests.py
123152
```
124153

125154
<br />
126155

127-
**API Server Descriptor** - POSTMAN Collection
156+
## [React Datta Able PRO](https://appseed.us/product/datta-able-pro/full-stack/)
157+
158+
> For more components, pages and priority on support, feel free to take a look at this amazing starter:
159+
160+
Datta Able 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, Datta Able PRO is ready to help you create stunning websites and web apps.
128161

129-
The backend server uses an [Unified API defition](https://docs.appseed.us/boilerplate-code/api-server/api-unified-definition) maintained and actively supported by AppSeed across multiple frameworks: Flask, Node JS, FastAPI.
162+
- 👉 [React Datta Able PRO](https://appseed.us/product/datta-able-pro/full-stack/) - Product Page
163+
-`Enhanced UI` - more pages and components
164+
-`Priority` on support
165+
166+
<br >
130167

131-
- [API POSTMAN Collection](https://github.com/app-generator/api-unified-definition/blob/main/api.postman_collection.json) - can be used to mock (simulate) the backend server or code a new one in your preferred framework.
168+
![React Datta Able PRO - Full-Stack Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/174492290-a581dc5f-6b4a-4f5e-822e-419a8b96a480.png)
132169

133170
<br />
134171

135172
---
136-
[Flask React Datta Able](https://appseed.us/product/flask-react-datta-able) - Provided by [CodedThemes](https://codedthemes.com/) and **AppSeed [App Generator](https://appseed.us/app-generator)**.
173+
[Flask React Datta Able](https://appseed.us/product/datta-able/api-server-flask/react/) - Full-Stack Seed project generated by **[AppSeed](https://appseed.us/)**.

api-server-flask/.env

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
DEBUG=True
2+
3+
FLASK_APP=run.py
4+
FLASK_ENV=development
5+
6+
# SECRET_KEY=... # edit value, (generated used if not provided)
7+
# JWT_SECRET_KEY=... # edit value, (generated used if not provided)
8+
9+
# GITHUB_CLIENT_ID=... # edit value
10+
# GITHUB_SECRET_KEY=... # edit value
11+
12+
# If DB credentials (if NOT provided, or wrong values SQLite is used)
13+
# DB_ENGINE=mysql
14+
# DB_HOST=localhost
15+
# DB_NAME=appseed_db
16+
# DB_USERNAME=appseed_db_usr
17+
# DB_PASS=pass
18+
# DB_PORT=3306

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

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* >

0 commit comments

Comments
 (0)