Skip to content

Commit f4e8740

Browse files
committed
some other improvements
1 parent 59e51ea commit f4e8740

File tree

1 file changed

+38
-30
lines changed

1 file changed

+38
-30
lines changed

README.md

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
</a>
1010
</p>
1111

12+
<p align="center">
13+
📚 <a href="https://benavlabs.github.io/FastAPI-boilerplate/">Docs</a> · 🧠 <a href="https://deepwiki.com/benavlabs/FastAPI-boilerplate">DeepWiki</a> · 💬 <a href="https://discord.com/invite/TEmPs22gqB">Discord</a>
14+
</p>
15+
1216
<p align="center">
1317
<a href="https://fastapi.tiangolo.com">
1418
<img src="https://img.shields.io/badge/FastAPI-005571?style=for-the-badge&logo=fastapi" alt="FastAPI">
@@ -24,12 +28,6 @@
2428
</a>
2529
</p>
2630

27-
**Docs:**
28-
29-
* 📚 [https://benavlabs.github.io/FastAPI-boilerplate/](https://benavlabs.github.io/FastAPI-boilerplate/)
30-
* 🧠 DeepWiki: [https://deepwiki.com/benavlabs/FastAPI-boilerplate](https://deepwiki.com/benavlabs/FastAPI-boilerplate)
31-
* 💬 Discord: [https://discord.com/invite/TEmPs22gqB](https://discord.com/invite/TEmPs22gqB)
32-
3331
## Features
3432

3533
* ⚡️ Fully async FastAPI + SQLAlchemy 2.0
@@ -43,26 +41,30 @@
4341
* 🐳 One-command Docker Compose
4442
* 🚀 NGINX & Gunicorn recipes for prod
4543

46-
## When to use it
44+
## Why and When to use it
4745

48-
* You want a pragmatic starter with auth, CRUD, jobs, caching and rate-limits.
49-
* You value **sensible defaults** with the freedom to opt-out of modules.
50-
* You prefer **docs over boilerplate** in README - depth lives in the site.
46+
**Perfect if you want:**
5147

52-
Not a fit if you need a monorepo microservices scaffold - see the docs for pointers.
48+
* A pragmatic starter with auth, CRUD, jobs, caching and rate-limits
49+
* **Sensible defaults** with the freedom to opt-out of modules
50+
* **Docs over boilerplate** in README - depth lives in the site
5351

54-
## What's inside (high-level)
52+
> **Not a fit** if you need a monorepo microservices scaffold - [see the docs](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/project-structure/) for pointers.
5553
56-
* **App**: FastAPI app factory, env-aware docs exposure
57-
* **Auth**: JWT access/refresh, logout via token blacklist
58-
* **DB**: Postgres + SQLAlchemy 2.0, Alembic migrations
59-
* **CRUD**: FastCRUD generics (get, get_multi, create, update, delete, joins)
60-
* **Caching**: decorator-based endpoints cache; client cache headers
61-
* **Queues**: ARQ worker (async jobs), Redis connection helpers
62-
* **Rate limits**: per-tier + per-path rules
63-
* **Admin**: CRUDAdmin views for common models (optional)
54+
**What you get:**
6455

65-
> The full tree and deep dives are in **Project Structure**, **Database**, **CRUD Operations**, **API**, **Caching**, **Background Tasks**, **Rate Limiting**, and **Production** sections of the docs.
56+
* **App**: FastAPI app factory, [env-aware docs](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/development/) exposure
57+
* **Auth**: [JWT access/refresh](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/authentication/), logout via token blacklist
58+
* **DB**: Postgres + SQLAlchemy 2.0, [Alembic migrations](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/database/)
59+
* **CRUD**: [FastCRUD generics](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/database/crud/) (get, get_multi, create, update, delete, joins)
60+
* **Caching**: [decorator-based endpoints cache](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/caching/); client cache headers
61+
* **Queues**: [ARQ worker](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/background-tasks/) (async jobs), Redis connection helpers
62+
* **Rate limits**: [per-tier + per-path rules](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/rate-limiting/)
63+
* **Admin**: [CRUDAdmin views](https://benavlabs.github.io/FastAPI-boilerplate/user-guide/admin-panel/) for common models (optional)
64+
65+
This is what we've been using in production apps. Several applications running in production started from this boilerplate as their foundation - from SaaS platforms to internal tools. It's proven, stable technology that works together reliably. Use this as the foundation for whatever you want to build on top.
66+
67+
> **Building an AI SaaS?** Skip even more setup with [**FastroAI**](https://fastro.ai) - our production-ready template with AI integration, payments, and frontend included.
6668
6769
## TL;DR - Quickstart
6870

@@ -77,15 +79,15 @@ The `scripts/` folder contains ready-to-use configurations for different deploym
7779

7880
### Option 1: Local development with Uvicorn
7981

80-
Best for: **Development and testing**
82+
Best for: **Development and testing**. Simply run:
8183

8284
```bash
8385
cp scripts/local_with_uvicorn/Dockerfile Dockerfile
8486
cp scripts/local_with_uvicorn/docker-compose.yml docker-compose.yml
8587
cp scripts/local_with_uvicorn/.env.example src/.env
8688
```
8789

88-
For local development, the example environment values work fine. You can modify them later if needed.
90+
For local development, the example environment values work fine. You can modify them later if needed. Then you just need to run:
8991

9092
```bash
9193
docker compose up
@@ -95,43 +97,49 @@ Your API will be running at http://127.0.0.1:8000 with auto-reload enabled. Open
9597

9698
### Option 2: Staging with Gunicorn managing Uvicorn workers
9799

98-
Best for: **Staging environments and load testing**
100+
Best for: **Staging environments and load testing**. Run:
99101

100102
```bash
101103
cp scripts/gunicorn_managing_uvicorn_workers/Dockerfile Dockerfile
102104
cp scripts/gunicorn_managing_uvicorn_workers/docker-compose.yml docker-compose.yml
103105
cp scripts/gunicorn_managing_uvicorn_workers/.env.example src/.env
104106
```
105107

106-
⚠️ **Recommended**: Change `SECRET_KEY` and passwords in the `.env` file for staging/testing environments.
108+
> [!WARNING]
109+
> Change `SECRET_KEY` and passwords in the `.env` file for staging/testing environments.
110+
111+
And start with:
107112

108113
```bash
109114
docker compose up
110115
```
111116

112117
### Option 3: Production with NGINX
113118

114-
Best for: **Production deployments**
119+
Best for: **Production deployments**. Just run these commands:
115120

116121
```bash
117122
cp scripts/production_with_nginx/Dockerfile Dockerfile
118123
cp scripts/production_with_nginx/docker-compose.yml docker-compose.yml
119124
cp scripts/production_with_nginx/.env.example src/.env
120125
```
121126

122-
🚨 **CRITICAL**: You MUST change `SECRET_KEY`, all passwords, and sensitive values in the `.env` file before deploying!
127+
> [!CAUTION]
128+
> You MUST change `SECRET_KEY`, all passwords, and sensitive values in the `.env` file before deploying!
129+
130+
And then, to sart:
123131

124132
```bash
125133
docker compose up
126134
```
127135

128136
Access your application via http://localhost (NGINX proxies to the FastAPI app).
129137

130-
> Full setup (from-scratch, .env examples, PostgreSQL & Redis, gunicorn, nginx) lives in the docs.
138+
> Full setup (from-scratch, .env examples, PostgreSQL & Redis, gunicorn, nginx) lives in the [docs](https://benavlabs.github.io/FastAPI-boilerplate/getting-started/installation/).
131139
132140
## Configuration (minimal)
133141

134-
Create `src/.env` and set **app**, **database**, **JWT**, and **environment** settings. See the docs for a copy-pasteable example and production guidance.
142+
Create `src/.env` and set **app**, **database**, **JWT**, and **environment** settings. See the [docs](https://benavlabs.github.io/FastAPI-boilerplate/getting-started/configuration/) for a copy-pasteable example and production guidance.
135143

136144
[https://benavlabs.github.io/FastAPI-boilerplate/getting-started/configuration/](https://benavlabs.github.io/FastAPI-boilerplate/getting-started/configuration/)
137145

@@ -151,7 +159,7 @@ cd src && uv run alembic revision --autogenerate && uv run alembic upgrade head
151159
curl -X POST 'http://127.0.0.1:8000/api/v1/tasks/task?message=hello'
152160
```
153161

154-
More examples (superuser creation, tiers, rate limits, admin usage) - **docs**.
162+
More examples (superuser creation, tiers, rate limits, admin usage) in the [docs](https://benavlabs.github.io/FastAPI-boilerplate/getting-started/first-run/).
155163

156164
## Contributing
157165

0 commit comments

Comments
 (0)