Skip to content

Commit 54f42a5

Browse files
Minor documentation changes
1 parent b277018 commit 54f42a5

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

docs/architecture.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Architecture"
33
---
44

5-
## Architecture
5+
## Data flow
66

77
This application uses a Post-Redirect-Get (PRG) pattern. The user submits a form, which sends a POST request to a FastAPI endpoint on the server. The database is updated, and the user is redirected to a GET endpoint, which fetches the updated data and re-renders the Jinja2 page template with the new data.
88

@@ -39,6 +39,6 @@ dot.edge('F', 'G')
3939
dot.render('static/webapp_flow', format='png', cleanup=True)
4040
```
4141

42-
![Webapp Flow](static/webapp_flow.png)
42+
![Data flow diagram](static/webapp_flow.png)
4343

4444
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.

docs/authentication.qmd

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Authentication"
33
---
44

5-
## Authentication Flow
5+
## Security features
66

77
This template implements a comprehensive authentication system with security best practices:
88

@@ -30,9 +30,9 @@ This template implements a comprehensive authentication system with security bes
3030
- Security-related errors don't leak information
3131
- Comprehensive error logging
3232

33-
The diagrams below show the main authentication flows and security measures.
33+
The diagrams below show the main authentication flows.
3434

35-
### Registration and Login Flow
35+
### Registration and login flow
3636

3737
``` {python}
3838
#| echo: false
@@ -85,9 +85,9 @@ auth.edge('generate_tokens', 'store_cookies', 'Set-Cookie')
8585
auth.render('static/auth_flow', format='png', cleanup=True)
8686
```
8787

88-
![Registration and Login Flow](static/auth_flow.png)
88+
![Registration and login flow](static/auth_flow.png)
8989

90-
### Password Reset Flow
90+
### Password reset flow
9191

9292
``` {python}
9393
#| echo: false
@@ -100,13 +100,11 @@ reset.attr(rankdir='TB')
100100
reset.attr('node', shape='box', style='rounded')
101101
102102
# Client-side nodes
103-
reset.attr(label='Client')
104103
reset.node('forgot', 'User submits forgot password form')
105104
reset.node('reset', 'User submits reset password form')
106105
reset.node('email_client', 'User clicks reset link')
107106
108107
# Server-side nodes
109-
reset.attr(label='Server')
110108
reset.node('validate', 'Validation')
111109
reset.node('token_gen', 'Generate reset token')
112110
reset.node('hash', 'Hash password')
@@ -126,4 +124,4 @@ reset.edge('hash', 'db', 'Update')
126124
reset.render('static/reset_flow', format='png', cleanup=True)
127125
```
128126

129-
![Password Reset Flow](static/reset_flow.png)
127+
![Password reset flow](static/reset_flow.png)

docs/static/reset_flow.png

-1022 Bytes
Loading

0 commit comments

Comments
 (0)