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
Copy file name to clipboardExpand all lines: README.md
+57-21Lines changed: 57 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,56 @@
1
1
# FastAPI, Jinja2, PostgreSQL Webapp Template
2
2
3
+
3
4

4
5
5
-
## Documentation
6
+
## Quickstart
6
7
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.
8
+
This quickstart guide provides a high-level overview. See the full
*FastAPI, Jinja2, PostgreSQL Webapp Template* combines three of the most lightweight and performant open-source web development frameworks into a customizable webapp template with:
22
+
This template combines three of the most lightweight and performant
23
+
open-source web development frameworks into a customizable webapp
24
+
template with:
12
25
13
26
- Pure Python backend
14
-
-Low-Javascript frontend
15
-
- Powerful, easy-to-manage database layer
27
+
-Minimal-Javascript frontend
28
+
- Powerful, easy-to-manage database
16
29
17
30
The template also includes full-featured secure auth with:
18
31
19
32
- Token-based authentication
20
33
- Password recovery flow
21
34
- Role-based access control system
22
35
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.
36
+
## Design Philosophy
24
37
25
-
## Tech stack
38
+
The design philosophy of the template is to prefer low-level,
39
+
best-in-class open-source frameworks that offer flexibility,
40
+
scalability, and performance without vendor-lock-in. You’ll find the
41
+
template amazingly easy not only to understand and customize, but also
42
+
to deploy to any major cloud hosting platform.
43
+
44
+
## Tech Stack
26
45
27
46
**Core frameworks:**
28
47
29
-
-[FastAPI](https://fastapi.tiangolo.com/): scalable, high-performance, type-annotated Python web backend framework
30
-
-[PostgreSQL](https://www.postgresql.org/): the world's most advanced open-source database engine
31
-
-[Jinja2](https://jinja.palletsprojects.com/en/3.1.x/): frontend HTML templating engine
(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.)
118
+
(Note: You will need to activate the shell every time you open a new
119
+
terminal session. Alternatively, you can use the `poetry run` prefix
120
+
before other commands to run them without activating the shell.)
93
121
94
122
### Set environment variables
95
123
96
124
Copy .env.example to .env with `cp .env.example .env`.
97
125
98
-
Generate a 256 bit secret key with `openssl rand -base64 32` and paste it into the .env file.
126
+
Generate a 256 bit secret key with `openssl rand -base64 32` and paste
127
+
it into the .env file.
99
128
100
129
Set your desired database name, username, and password in the .env file.
101
130
102
-
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.
131
+
To use password recovery, register a [Resend](https://resend.com/)
132
+
account, verify a domain, get an API key, and paste the API key into the
133
+
.env file.
103
134
104
135
### Start development database
105
136
@@ -109,7 +140,8 @@ docker compose up -d
109
140
110
141
### Run the development server
111
142
112
-
Make sure the development database is running and tables and default permissions/roles are created first.
143
+
Make sure the development database is running and tables and default
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.
The advantage of the PRG pattern is that it is very straightforward to implement and keeps most of the rendering logic on the server side. The disadvantage is that it requires an extra round trip to the database to fetch the updated data, and re-rendering the entire page template may be less efficient than a partial page update on the client side.
Copy file name to clipboardExpand all lines: docs/contributing.qmd
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,17 @@ Fork the repository, create a new branch, make your changes, and submit a pull r
8
8
9
9
### Render the documentation
10
10
11
-
The documentation is rendered with [Quarto](https://quarto.org/docs/). Make changes to the `.qmd` files in the `docs` folder. Then run the following command to render:
11
+
The README and documentation website are rendered with [Quarto](https://quarto.org/docs/). Make changes to the `.qmd` files in the root folder and the `docs` folder. Then run the following commands to render:
12
12
13
13
```bash
14
+
# To render the documentation website
14
15
quarto render
16
+
# To render the README
17
+
quarto render index.qmd --output-dir . --output README.md --to gfm
15
18
```
16
19
20
+
Due to a quirk of Quarto, an unnecessary `index.html` file is created in the root folder when the README is rendered. This file can be safely deleted.
0 commit comments