Skip to content

Commit 3fe8290

Browse files
Render README from Quarto
1 parent ac6d24c commit 3fe8290

File tree

3 files changed

+143
-29
lines changed

3 files changed

+143
-29
lines changed

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2024 Promptly Technologies, LLC
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
# FastAPI, Jinja2, PostgreSQL Webapp
1+
# README
2+
3+
4+
## FastAPI, Jinja2, PostgreSQL Webapp
25

36
![Screenshot of homepage](static/Screenshot.png)
47

58
This project is still under development.
69

7-
## Installation
10+
### Install development dependencies
811

9-
### Prerequisites
12+
#### Python and Docker
1013

11-
- Python 3.12 or higher
12-
- Docker and Docker Compose
13-
- PostgreSQL development headers
14-
- Poetry (Python package manager)
14+
- [Python 3.12 or higher](https://www.python.org/downloads/)
15+
- [Docker and Docker Compose](https://docs.docker.com/get-docker/)
1516

16-
### System Dependencies
17+
#### PostgreSQL headers
1718

1819
For Ubuntu/Debian:
1920

20-
```bash
21+
``` bash
2122
sudo apt update && sudo apt install -y python3-dev libpq-dev
2223
```
24+
2325
For macOS:
2426

25-
```bash
27+
``` bash
2628
brew install postgresql
2729
```
2830

@@ -31,58 +33,66 @@ For Windows:
3133
- No additional system dependencies required
3234
- Install Python from the official Python website
3335

34-
### Install Python dependencies
36+
#### Python dependencies
3537

36-
1. Install Poetry
38+
1. Install Poetry
3739

38-
```bash
40+
``` bash
3941
pipx install poetry
4042
```
4143

42-
2. Install project dependencies
44+
2. Install project dependencies
4345

44-
```bash
46+
``` bash
4547
poetry install
4648
```
4749

48-
3. Activate shell
50+
3. Activate shell
4951

50-
```bash
52+
``` bash
5153
poetry shell
5254
```
5355

54-
(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.)
56+
(Note: You will need to activate the shell every time you open a new
57+
terminal session. Alternatively, you can use the `poetry run` prefix
58+
before other commands to run them without activating the shell.)
5559

56-
## Set environment variables
60+
### Set environment variables
5761

5862
Copy .env.example to .env with `cp .env.example .env`.
5963

60-
Generate a 256 bit secret key with `openssl rand -base64 32` and paste it into the .env file.
64+
Generate a 256 bit secret key with `openssl rand -base64 32` and paste
65+
it into the .env file.
6166

6267
Set your desired database name, username, and password in the .env file.
6368

64-
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.
69+
To use password recovery, register a [Resend](https://resend.com/)
70+
account, verify a domain, get an API key, and paste the API key into the
71+
.env file.
6572

66-
## Start development database
73+
### Start development database
6774

6875
`docker compose up -d`
6976

70-
## Create database tables and default permissions/roles
77+
### Create database tables and default permissions/roles
7178

7279
`python migrations/set_up_db.py --drop`
7380

74-
## Run the development server
81+
### Run the development server
7582

76-
Make sure the development database is running and tables and default permissions/roles are created first.
83+
Make sure the development database is running and tables and default
84+
permissions/roles are created first.
7785

7886
`uvicorn main:app --host 0.0.0.0 --port 8000 --reload`
7987

8088
Navigate to http://localhost:8000/
8189

82-
## Contributing
90+
### Contributing
8391

84-
Fork the repository, create a new branch, make your changes, and submit a pull request.
92+
Fork the repository, create a new branch, make your changes, and submit
93+
a pull request.
8594

86-
## License
95+
### License
8796

88-
This project is licensed under the MIT License. See the LICENSE file for more details.
97+
This project is licensed under the MIT License. See the LICENSE file for
98+
more details.

README.qmd

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: "README"
3+
format: gfm
4+
---
5+
6+
## FastAPI, Jinja2, PostgreSQL Webapp
7+
8+
![Screenshot of homepage](static/Screenshot.png)
9+
10+
This project is still under development.
11+
12+
### Install development dependencies
13+
14+
#### Python, Docker, and Quarto CLI
15+
16+
- [Python 3.12 or higher](https://www.python.org/downloads/)
17+
- [Docker and Docker Compose](https://docs.docker.com/get-docker/)
18+
- [Quarto CLI](https://quarto.org/docs/get-started/)
19+
20+
#### PostgreSQL headers
21+
22+
For Ubuntu/Debian:
23+
24+
```bash
25+
sudo apt update && sudo apt install -y python3-dev libpq-dev
26+
```
27+
28+
For macOS:
29+
30+
```bash
31+
brew install postgresql
32+
```
33+
34+
For Windows:
35+
36+
- No additional system dependencies required
37+
- Install Python from the official Python website
38+
39+
#### Python dependencies
40+
41+
1. Install Poetry
42+
43+
```bash
44+
pipx install poetry
45+
```
46+
47+
2. Install project dependencies
48+
49+
```bash
50+
poetry install
51+
```
52+
53+
3. Activate shell
54+
55+
```bash
56+
poetry shell
57+
```
58+
59+
(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.)
60+
61+
### Set environment variables
62+
63+
Copy .env.example to .env with `cp .env.example .env`.
64+
65+
Generate a 256 bit secret key with `openssl rand -base64 32` and paste it into the .env file.
66+
67+
Set your desired database name, username, and password in the .env file.
68+
69+
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.
70+
71+
### Start development database
72+
73+
`docker compose up -d`
74+
75+
### Create database tables and default permissions/roles
76+
77+
`python migrations/set_up_db.py --drop`
78+
79+
### Run the development server
80+
81+
Make sure the development database is running and tables and default permissions/roles are created first.
82+
83+
`uvicorn main:app --host 0.0.0.0 --port 8000 --reload`
84+
85+
Navigate to http://localhost:8000/
86+
87+
### Render the README
88+
89+
`quarto render README.qmd`
90+
91+
### Contributing
92+
93+
Fork the repository, create a new branch, make your changes, and submit a pull request.
94+
95+
### License
96+
97+
This project is licensed under the MIT License. See the LICENSE file for more details.

0 commit comments

Comments
 (0)