|
1 |
| -# [Django React Datta Able](https://appseed.us/product/django-react-datta-able) |
| 1 | +# [Django React Datta Able](https://appseed.us/product/datta-able/api-server-django/react/) |
2 | 2 |
|
3 |
| -Open-source full-stack seed project coded in React and Django on top of a modern design from CodedThemes. The **[Django React](https://appseed.us/product/django-react-datta-able)** codebase is already configured with an SQLite database, API (via **DRF**), 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. 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 | 4 |
|
5 |
| -<br /> |
| 5 | +- 👉 [Flask React Datta Able](https://appseed.us/product/datta-able/api-server-flask/react/) - `Product Page` |
| 6 | +- 👉 [Flask React Datta Able](https://flask-react-datta-able.appseed-srv1.com) - `LIVE Demo` |
6 | 7 |
|
7 |
| -> Features |
| 8 | + |
8 | 9 |
|
9 |
| -- Modern aesthetics UI design - Designed by [CodedThemes](https://bit.ly/37fF9RT) |
10 |
| -- React, Redux, Redux-persist |
11 |
| -- Authentication: JWT Login/Register/Logout |
12 |
| -- Backend: [Django API Server](https://github.com/app-generator/api-server-django) |
| 10 | +<br > |
13 | 11 |
|
14 |
| -<br /> |
| 12 | +## ✨ `React` Datta Able |
15 | 13 |
|
16 |
| -> Links |
| 14 | +- Modern aesthetics UI design - Designed by *[CodedThemes](https://bit.ly/37fF9RT)* |
| 15 | +- React, Redux, Redux-persist |
17 | 16 |
|
18 |
| -- [Django React Datta Able](https://appseed.us/product/django-react-datta-able) - product page |
19 |
| -- [Django React Datta Able](https://django-react-datta-able.appseed-srv1.com/) - LIVE Demo |
20 |
| -- [Django React Datta Able](https://docs.appseed.us/products/react/django-datta-able) - product documentation |
21 |
| -- Download Backend: [Django API Server 📥](https://github.com/app-generator/api-server-django/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) |
| 17 | +<br /> |
23 | 18 |
|
24 |
| -<br > |
| 19 | +> `Tests` (compatibility matrix) |
25 | 20 |
|
26 |
| -> **Note**: This product can be used with other API Servers for a complete fullstack experience. **ALL API servers use an unified interface** |
| 21 | +| NodeJS | NPM | YARN | |
| 22 | +| --- | --- | --- | |
| 23 | +| `v14.0.0` | ❌ | ✅ | |
| 24 | +| `v16.0.0` | ✅ | ✅ | |
| 25 | +| `v18.0.0` | ❌ | ❌ | |
27 | 26 |
|
28 |
| -- [Flask API Server](https://github.com/app-generator/api-server-flask) - 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 | 27 |
|
34 | 28 | <br />
|
35 | 29 |
|
36 |
| - |
| 30 | +## ✨ `Django API` Features |
| 31 | + |
| 32 | +- Stack: : `Django` / `DRF` / **SQLite** |
| 33 | +- `Up-to-date dependencies` |
| 34 | +- **DB Layer**: Django Native `ORM`, `SQLite` persistence |
| 35 | +- **Auth**: JWT tokens managed via `PyJWT` |
| 36 | +- [API Definition](https://docs.appseed.us/boilerplate-code/api-unified-definition) - the unified API structure implemented by this server |
37 | 37 |
|
38 |
| -<br /> |
39 | 38 |
|
40 |
| -## Start Django API Server |
| 39 | +<br /> |
41 | 40 |
|
42 |
| -Simple starter built with Python / Django Rest / Sqlite3 and JWT Auth. The authentication flow is based on [json web tokens](https://jwt.io). |
| 41 | +## ✨ How to use it |
43 | 42 |
|
44 |
| -> Requirements |
| 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: |
45 | 45 |
|
46 |
| -- Django==3.2.5 |
47 |
| -- djangorestframework==3.12.4 |
48 |
| -- PyJWT==2.1.0 |
49 |
| -- django-cors-headers==3.7.0 |
| 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 |
50 | 49 |
|
51 | 50 | <br />
|
52 | 51 |
|
53 |
| -> How to use the code |
| 52 | +### 👉 Start the Frontend |
54 | 53 |
|
55 |
| -**Clone the sources** |
| 54 | +> **Step 1** - Once the project is downloaded, change the directory to `react-ui`. |
56 | 55 |
|
57 | 56 | ```bash
|
58 |
| -$ git clone https://github.com/app-generator/api-server-django.git |
59 |
| -$ cd api-server-django |
| 57 | +$ cd react-ui |
60 | 58 | ```
|
61 | 59 |
|
62 |
| -**Create a virtual environment** |
63 |
| - |
64 |
| -```bash |
65 |
| -$ virtualenv -p python3 venv |
66 |
| -$ source venv/bin/activate |
67 |
| -``` |
| 60 | +<br > |
68 | 61 |
|
69 |
| -**Install dependencies** using pip |
| 62 | +> **Step 2** - Install dependencies via NPM or yarn |
70 | 63 |
|
71 | 64 | ```bash
|
72 |
| -$ pip install -r requirements.txt |
| 65 | +$ npm i |
| 66 | +// OR |
| 67 | +$ yarn |
73 | 68 | ```
|
74 | 69 |
|
75 |
| -**Start the API server** |
| 70 | +<br /> |
| 71 | + |
| 72 | +> **Step 3** - Start in development mode |
76 | 73 |
|
77 | 74 | ```bash
|
78 |
| -$ python manage.py migrate |
79 |
| -$ python manage.py runserver 5000 |
| 75 | +$ npm run start |
| 76 | +// OR |
| 77 | +$ yarn start |
80 | 78 | ```
|
81 | 79 |
|
82 |
| -The API server will start using the default port `5000`. |
83 |
| - |
84 | 80 | <br />
|
85 | 81 |
|
86 |
| -## Start React UI |
| 82 | +At this point, the app is available in the browser `localhost:3000` (the default address). |
87 | 83 |
|
88 |
| -To use the product Node JS (>= 12.x) is required and GIT to clone/download the project from the public repository. |
89 | 84 |
|
90 |
| -**Step #1** - Clone the project |
| 85 | +<br /> |
| 86 | + |
| 87 | +### 👉 Start the Backend Server |
| 88 | + |
| 89 | +> **Step 1** - Change the directory to `api-server-django` |
91 | 90 |
|
92 | 91 | ```bash
|
93 |
| -$ git clone https://github.com/app-generator/react-datta-able-dashboard.git |
94 |
| -$ cd react-datta-able-dashboard |
| 92 | +$ cd api-server-django |
95 | 93 | ```
|
96 | 94 |
|
97 | 95 | <br >
|
98 | 96 |
|
99 |
| -**Step #2** - Install dependencies via NPM or yarn |
| 97 | +> **Step 2** - Install dependencies using a `virtual environment` |
100 | 98 |
|
101 | 99 | ```bash
|
102 |
| -$ npm i |
103 |
| -// OR |
104 |
| -$ 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 |
105 | 109 | ```
|
106 | 110 |
|
107 | 111 | <br />
|
108 | 112 |
|
109 |
| -**Step #3** - Start in development mode |
| 113 | +> **Step 3** - Setup the database |
110 | 114 |
|
111 | 115 | ```bash
|
112 |
| -$ npm run start |
113 |
| -// OR |
114 |
| -$ yarn start |
| 116 | +$ python manage.py makemigrations |
| 117 | +$ python manage.py migrate |
115 | 118 | ```
|
116 | 119 |
|
117 | 120 | <br />
|
118 | 121 |
|
119 |
| -## Configure the backend server |
120 |
| - |
121 |
| -The product comes with a usable JWT Authentication flow that provides only the basic requests: login/logout/register. |
| 122 | +> **Step 4** - Start the API server (development mode) |
122 | 123 |
|
123 |
| -**API Server URL** - `src/config/constant.js` |
124 |
| - |
125 |
| -```javascript |
126 |
| -const config = { |
127 |
| - ... |
128 |
| - API_SERVER: 'http://localhost:5000/api/' // <-- The magic line |
129 |
| -}; |
| 124 | +```bash |
| 125 | +$ python manage.py runserver 5000 |
130 | 126 | ```
|
131 | 127 |
|
| 128 | +Use the API via `POSTMAN` or `Swagger Dashboard` at `localhost:5000`. |
| 129 | + |
132 | 130 | <br />
|
133 | 131 |
|
134 |
| -**API Server Descriptor** - POSTMAN Collection |
| 132 | +## [React Datta Able PRO](https://appseed.us/product/datta-able-pro/full-stack/) |
| 133 | + |
| 134 | +> For more components, pages and priority on support, feel free to take a look at this amazing starter: |
| 135 | +
|
| 136 | +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. |
135 | 137 |
|
136 |
| -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. |
| 138 | +- 👉 [React Datta Able PRO](https://appseed.us/product/datta-able-pro/full-stack/) - Product Page |
| 139 | + - ✅ `Enhanced UI` - more pages and components |
| 140 | + - ✅ `Priority` on support |
| 141 | + |
| 142 | +<br > |
137 | 143 |
|
138 |
| -- [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. |
| 144 | + |
139 | 145 |
|
140 | 146 | <br />
|
141 | 147 |
|
142 | 148 | ---
|
143 |
| -[Django React Datta Able](https://appseed.us/product/django-react-datta-able) - Provided by [CodedThemes](https://codedthemes.com/) and **AppSeed [App Generator](https://appseed.us/app-generator)**. |
| 149 | +**[Django React Datta Able](https://appseed.us/product/datta-able/api-server-django/react/)** - Full-Stack Seed project generated by **[App Generator](https://appseed.us/generator/)**. |
0 commit comments