Skip to content

Commit 03975dd

Browse files
committed
Document API Generator usage
1 parent e1102af commit 03975dd

File tree

1 file changed

+45
-15
lines changed

1 file changed

+45
-15
lines changed

README.md

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@ Open-source **Flask Dashboard** generated by `AppSeed` op top of a modern design
88

99
<br />
1010

11-
> 🚀 Built with [Able Generator](https://appseed.us/generator/)
12-
13-
- `Up-to-date dependencies`, active versioning
14-
- `DB Tools`: SQLAlchemy ORM, `Flask-Migrate` (schema migrations)
15-
- `Persistence`:
16-
- `SQLite` for development - `DEBUG=True` in `.env`
17-
- `MySql` for production - `DEBUG=False` in `.env`
18-
- `Authentication`
19-
- Session Based (via **flask_login**)
20-
- `Social Login` (optional) for **Github**
21-
- `Deployment`
22-
- `Docker`, HEROKU
23-
- Page Compression via `Flask-Minify` (for production)
24-
- `Dark Mode` (enhancement)
25-
- Persistent via browser `local storage`
11+
> Roadmap & Features
12+
13+
| Status | Item | info |
14+
| --- | --- | --- |
15+
|| **Up-to-date Dependencies** | Tested with Django `v3.2.x`, `v4.x` |
16+
|| **UI Kit** | `Bootstrap 5`, `Dark-Mode` (persistent) |
17+
|| **Docker** | Simple Setup (local usage) |
18+
|| **Persistence** | `SQLite`, `MySql` |
19+
|| **Authentication** | Basic, `OAuth` via **AllAuth** for Github |
20+
|| **API Generator** | Secure API via `Flask-restX` |
21+
|| **Dynamic DataTables** | `Server-side` pagination, `Search`, Export |
22+
|| **Stripe Payments** | `One-Time` and `Subscriptions` |
23+
|| **Async Tasks** | via `Celery` |
24+
25+
26+
> Something is missing? Submit a new `product feature request` using the [issues tracker](https://github.com/app-generator/flask-soft-ui-dashboard/issues).
2627
2728
<br />
2829

@@ -148,6 +149,35 @@ At this point, the app runs at `http://127.0.0.1:5000/`.
148149

149150
<br />
150151

152+
## ✨ API Generator
153+
154+
This module helps to generate secure APIs using DRF via a simple workflow:
155+
156+
- Edit/add your model in `apps/models.py`
157+
- Migrate the database:
158+
159+
```bash
160+
$ flask shell
161+
>>> from apps import db
162+
>>> db.create_all()
163+
```
164+
165+
- Update Configuration:
166+
- `apps/config .py`, section `API_GENERATOR`
167+
- Generate the API code:
168+
- `$ flask gen_api` # the new code is saved in `apps/api`
169+
- Access the API in the browser:
170+
- `/api/MODEL_NAME/`
171+
172+
The API is secured using the JWT mechanism provided by DRF.
173+
174+
- GET requests are public (GET all, get Item)
175+
- Mutating requests are protected by token generated based on the user credentials (`username`, `pass`).
176+
177+
> A POSTMAN Collection Sample can be found [here](./media).
178+
179+
<br />
180+
151181
### 👉 Create Users
152182

153183
By default, the app redirects guest users to authenticate. In order to access the private pages, follow this set up:

0 commit comments

Comments
 (0)