You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

3
4
4
-
## FastAPI, Jinja2, PostgreSQL Webapp
5
+
## Documentation
5
6
6
-

7
+
This README provides a high-level overview. See the **[full documentation website](https://promptlytechnologies.com/fastapi-jinja2-postgres-webapp/docs/)** for more detailed information on installation, features, architecture, conventions and code style, customization, and deployment to cloud platforms.
7
8
8
-
This project is still under development.
9
+
## Features
9
10
10
-
### Architecture
11
+
*FastAPI, Jinja2, PostgreSQL Webapp Template* combines three of the most lightweight and performant open-source web development frameworks in existence into a customizable webapp template with:
11
12
12
-
This application uses a Post-Redirect-Get (PRG) pattern. The user
13
-
submits a form, which sends a POST request to a FastAPI endpoint on the
14
-
server. The database is updated, and the user is redirected to a GET
15
-
endpoint, which fetches the updated data and re-renders the Jinja2 page
16
-
template with the new data.
13
+
- Pure Python backend
14
+
- Low-Javascript frontend
15
+
- Powerful, easy-to-manage database layer
17
16
18
-

17
+
The template also includes full-featured secure auth with:
19
18
20
-
The advantage of the PRG pattern is that it is very straightforward to
21
-
implement and keeps most of the rendering logic on the server side. The
22
-
disadvantage is that it requires an extra round trip to the database to
23
-
fetch the updated data, and re-rendering the entire page template may be
24
-
less efficient than a partial page update on the client side.
19
+
- Token-based authentication
20
+
- Password recovery flow
21
+
- Role-based access control system
25
22
26
-
### Install development dependencies in a VSCode Dev Container
23
+
The design philosophy of the template is to prefer low-level, best-in-class open-source frameworks that offer flexibility, scalability, and performance without vendor-lock-in. You'll find the template amazingly easy not only to understand and customize, but also to deploy to any major cloud hosting platform.
27
24
28
-
If you use VSCode with Docker to develop in a container, the following
29
-
VSCode Dev Container configuration will install all dependencies:
(Note: You will need to activate the shell every time you open a new
117
-
terminal session. Alternatively, you can use the `poetry run` prefix
118
-
before other commands to run them without activating the shell.)
90
+
(Note: You will need to activate the shell every time you open a new terminal session. Alternatively, you can use the `poetry run` prefix before other commands to run them without activating the shell.)
119
91
120
92
### Set environment variables
121
93
122
94
Copy .env.example to .env with `cp .env.example .env`.
123
95
124
-
Generate a 256 bit secret key with `openssl rand -base64 32` and paste
125
-
it into the .env file.
96
+
Generate a 256 bit secret key with `openssl rand -base64 32` and paste it into the .env file.
126
97
127
98
Set your desired database name, username, and password in the .env file.
128
99
129
-
To use password recovery, register a [Resend](https://resend.com/)
130
-
account, verify a domain, get an API key, and paste the API key into the
131
-
.env file.
100
+
To use password recovery, register a [Resend](https://resend.com/) account, verify a domain, get an API key, and paste the API key into the .env file.
132
101
133
102
### Start development database
134
103
@@ -138,8 +107,7 @@ docker compose up -d
138
107
139
108
### Run the development server
140
109
141
-
Make sure the development database is running and tables and default
142
-
permissions/roles are created first.
110
+
Make sure the development database is running and tables and default permissions/roles are created first.
@@ -153,22 +121,10 @@ Navigate to http://localhost:8000/
153
121
mypy .
154
122
```
155
123
156
-
### Render the README
157
-
158
-
When updating the documentation, remember to make changes in the
159
-
README.qmd file, not the README.md file. Then run the following command
160
-
to render the README.md file:
161
-
162
-
```bash
163
-
quarto render README.qmd
164
-
```
165
-
166
124
### Contributing
167
125
168
-
Fork the repository, create a new branch, make your changes, and submit
169
-
a pull request.
126
+
Your contributions are welcome! See the [issues page](https://github.com/promptly-technologies-llc/fastapi-jinja2-postgres-webapp/issues) for ideas. Fork the repository, create a new branch, make your changes, and submit a pull request.
170
127
171
128
### License
172
129
173
-
This project is licensed under the MIT License. See the LICENSE file for
174
-
more details.
130
+
This project is licensed under the MIT License. See the LICENSE file for more details.
0 commit comments