Skip to content

Commit 7ba0f3f

Browse files
author
App Generator
committed
Release v1.0.1 - Bump React & API version
1 parent 4b07747 commit 7ba0f3f

File tree

321 files changed

+38688
-47
lines changed

Some content is hidden

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

321 files changed

+38688
-47
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
react-ui/yarn.lock

CHANGELOG.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# Change Log
22

3+
## [1.0.1] 2022-01-28
4+
### Improvements
5+
6+
- React UI: [React Soft UI Dashboard](https://github.com/app-generator/react-soft-ui-dashboard) **v2.0.5**
7+
- `Logout` fixes
8+
- API: [Django API Server](https://github.com/app-generator/api-server-django) **v1.0.1**
9+
- Update for `Django==4.0.1`
10+
311
## [1.0.0] 2021-10-20
412
### Initial Release
513

6-
- UI: [React Soft UI Dashboard](https://github.com/app-generator/react-soft-ui-dashboard) **v2.0.4**
7-
- Backend Version: [Django API Server](https://github.com/app-generator/api-server-django) **v1.0.0**
14+
- React UI: [React Soft UI Dashboard](https://github.com/app-generator/react-soft-ui-dashboard) **v2.0.4**
15+
- API: [Django API Server](https://github.com/app-generator/api-server-django) **v1.0.0**
816

README.md

+118-45
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,87 @@ Start your Development with an Innovative Admin Template for **Material-UI** and
1616
1717
- [Django React Soft Dashboard](https://appseed.us/product/django-react-soft-dashboard) - product page
1818
- [Django React Soft Dashboard](https://django-react-soft-dashboard.appseed-srv1.com/authentication/sign-in) - LIVE Demo
19-
- Download Backend: [Django API Server 📥](https://github.com/app-generator/api-server-django/archive/refs/heads/main.zip)
20-
- Donwnload Frontend: [React Soft Dashboard 📥](https://github.com/app-generator/react-soft-ui-dashboard/archive/refs/heads/main.zip)
21-
* Free Support via Github (issues tracker) and [Discord](https://discord.gg/fZC6hup).
22-
* Related Products:
23-
- Node JS API Backend - [Node React Soft Dashboard](https://appseed.us/product/node-js-react-soft-dashboard) - `open-source` project
19+
- Free Support via Github (issues tracker) and [Discord](https://discord.gg/fZC6hup).
2420

25-
<br >
21+
<br />
22+
23+
> React UI Tests:
24+
25+
| NodeJS | NPM | YARN | Status |
26+
| --- | --- | --- | --- |
27+
| `v16.13.0` | `v8.1.0` | `v1.22.5` | ✔️ |
28+
| `v14.15.0` | `v6.14.8` | `v1.22.5` | ✔️ |
29+
| `v12.22.0` | `v6.14.11` | `v1.22.5` | ✔️ |
30+
31+
<br />
32+
33+
## Quick-start
34+
35+
> Clone/Download the source code
36+
37+
```bash
38+
$ git clone https://github.com/app-generator/django-react-soft-dashboard.git
39+
```
40+
41+
<br />
42+
43+
> Start the Django API using `Docker`
44+
45+
```bash
46+
$ cd django-api
47+
$ docker-compose up --build
48+
```
49+
50+
At this point, the API should be up & running at `http://localhost:5000`, and we can test the interface using POSTMAN or `curl`.
51+
52+
<br />
53+
54+
> Start the React UI (using another terminal)
55+
56+
```bash
57+
$ cd react-ui
58+
$ yarn # install dependencies
59+
$ yarn start # start the app
60+
```
61+
62+
Once all the above commands are executed, the `React UI` should be visible in the browser. By default, the app redirects the guest users to authenticate.
63+
After we register a new user and Sign IN, all the private pages become accessible.
64+
65+
<br />
2666

2767
![React Soft Dashboard - Open-source full-stack product with Django API Backend.](https://user-images.githubusercontent.com/51070104/136687466-1dfeeb6b-d474-45df-879b-0857b27eb615.gif)
2868

2969
<br >
3070

31-
> **Note**: This product can be used with other API Servers for a complete fullstack experience. **ALL API servers use an unified interface**
71+
## General Information
3272

33-
- [Flask API Server](https://github.com/app-generator/api-server-flask) - open-source product
34-
- [Node JS API Server](https://github.com/app-generator/api-server-nodejs) - open-source product / Typescript / SQLite / TypeORM / Joy for validation
35-
- [Node JS API Server PRO](https://github.com/app-generator/api-server-nodejs-pro) - **commercial product**
36-
- SQLite / TypeORM / Joy / Docker
37-
- MongoDB / Mongoose / Joy Docker (separate branch, same project)
73+
The product is built using a `two-tier` pattern where the React frontend is decoupled logically and physically from the API backend. How to use the product:
74+
75+
- `Compile and start` the **Django API Backend**
76+
- by default the server starts on port `5000`
77+
- `Compile and start` the **React UI**
78+
- UI will start on port `3000` and expects a running backend on port `5000`
79+
- `Configuration` (Optional)
80+
- Change the API port
81+
- Configure the API port used by the React UI to communicate with the backend
3882

3983
<br />
4084

41-
## Start Django API Server
85+
## Manual build
86+
87+
### Start the Django API
4288

4389
Simple starter built with Python / DRF Library / Sqlite3 and JWT Auth. The authentication flow is based on [json web tokens](https://jwt.io).
4490

4591
<br />
4692

47-
> How to use the code
48-
49-
**Step #1** - Clone the sources
93+
> **Step #1** - Change the directory to `django-api`
5094
5195
```bash
52-
$ git clone https://github.com/app-generator/api-server-django.git
53-
$ cd api-server-django
96+
$ cd flask-api
5497
```
5598

56-
**Step #2** - Create a virtual environment
99+
> **Step #2** - Create a virtual environment
57100
58101
```bash
59102
$ # Virtualenv modules installation (Unix based systems)
@@ -82,42 +125,33 @@ The API server will start using the explicit port `5000`.
82125

83126
<br />
84127

85-
## Start React UI
86-
87-
To use the product Node JS (>= 12.x) is required and GIT to clone/download the project from the public repository.
88-
89-
**Step #1** - Clone the project
90-
91-
```bash
92-
$ git clone https://github.com/app-generator/react-soft-ui-dashboard.git
93-
$ cd react-soft-ui-dashboard
94-
```
95-
96-
<br >
97-
98-
**Step #2** - Install dependencies via NPM or yarn
128+
### Compile & start the React UI
99129

100130
```bash
101-
$ npm i
102-
// OR
131+
$ cd react-ui
132+
$
133+
$ # Install Modules
103134
$ yarn
135+
$
136+
$ # Start for development (LIVE Reload)
137+
$ yarn start
104138
```
105139

106140
<br />
107141

108-
**Step #3** - Start in development mode
142+
### Configuration (Optional)
143+
144+
> Change the port exposed by the Flask API
109145
110146
```bash
111-
$ npm run start
112-
// OR
113-
$ yarn start
147+
$ flask run --port=5001
114148
```
115149

116-
<br />
150+
Now, the API starts on port `5001`.
117151

118-
## Configure the backend server
152+
<br />
119153

120-
The product comes with a usable JWT Authentication flow that provides only the basic requests: login/logout/register.
154+
> Update the API port used by the React Frontend
121155
122156
**API Server URL** - `src/config/constant.js`
123157

@@ -130,11 +164,50 @@ const config = {
130164

131165
<br />
132166

133-
**API Server Descriptor** - POSTMAN Collection
167+
## API
168+
169+
For a fast set up, use this POSTMAN file: [api_sample](https://github.com/app-generator/api-server-unified/blob/main/api.postman_collection.json)
170+
171+
> **Register** - `api/users/register` (**POST** request)
172+
173+
```
174+
POST api/users/register
175+
Content-Type: application/json
176+
177+
{
178+
"username":"test",
179+
"password":"pass",
180+
181+
}
182+
```
183+
184+
<br />
185+
186+
> **Login** - `api/users/login` (**POST** request)
134187
135-
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.
188+
```
189+
POST /api/users/login
190+
Content-Type: application/json
136191
137-
- [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.
192+
{
193+
"password":"pass",
194+
195+
}
196+
```
197+
198+
<br />
199+
200+
> **Logout** - `api/users/logout` (**POST** request)
201+
202+
```
203+
POST api/users/logout
204+
Content-Type: application/json
205+
authorization: JWT_TOKEN (returned by Login request)
206+
207+
{
208+
"token":"JWT_TOKEN"
209+
}
210+
```
138211

139212
<br />
140213

django-api/.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
env
2+
.dockerignore
3+
Dockerfile
4+
venv

django-api/.gitignore

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/

django-api/CHANGELOG.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Change Log
2+
3+
## [1.0.1] 2022-01-28
4+
### Improvements
5+
6+
- Dependencies update (all packages)
7+
- `Django==4.0.1`
8+
9+
## [1.0.0] 2021-07-20
10+
### First stable version
11+
12+
> Features:
13+
14+
- API:
15+
- Sign UP: `/api/users/register`
16+
- Sign IN: `/api/users/login`
17+
- Logout: `/api/users/logout`
18+
- Check Session: `/api/users/checkSession`
19+
- Edit User: `/api/users/edit`
20+
- Docker

0 commit comments

Comments
 (0)