Skip to content

Commit a6e5812

Browse files
authored
📝 Add Mailcatcher setup instructions for local email testing (#2038)
1 parent a886384 commit a6e5812

File tree

2 files changed

+32
-19
lines changed

2 files changed

+32
-19
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- 🔒 Secure password hashing by default.
2121
- 🔑 JWT (JSON Web Token) authentication.
2222
- 📫 Email based password recovery.
23+
- 📬 [Mailcatcher](https://mailcatcher.me) for local email testing during development.
2324
- ✅ Tests with [Pytest](https://pytest.org).
2425
- 📞 [Traefik](https://traefik.io) as a reverse proxy / load balancer.
2526
- 🚢 Deployment instructions using Docker Compose, including how to set up a frontend Traefik proxy to handle automatic HTTPS certificates.

development.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ docker compose watch
1010

1111
* Now you can open your browser and interact with these URLs:
1212

13-
Frontend, built with Docker, with routes handled based on the path: http://localhost:5173
13+
Frontend, built with Docker, with routes handled based on the path: <http://localhost:5173>
1414

15-
Backend, JSON based web API based on OpenAPI: http://localhost:8000
15+
Backend, JSON based web API based on OpenAPI: <http://localhost:8000>
1616

17-
Automatic interactive documentation with Swagger UI (from the OpenAPI backend): http://localhost:8000/docs
17+
Automatic interactive documentation with Swagger UI (from the OpenAPI backend): <http://localhost:8000/docs>
1818

19-
Adminer, database web administration: http://localhost:8080
19+
Adminer, database web administration: <http://localhost:8080>
2020

21-
Traefik UI, to see how the routes are being handled by the proxy: http://localhost:8090
21+
Traefik UI, to see how the routes are being handled by the proxy: <http://localhost:8090>
2222

2323
**Note**: The first time you start your stack, it might take a minute for it to be ready. While the backend waits for the database to be ready and configures everything. You can check the logs to monitor it.
2424

@@ -34,6 +34,18 @@ To check the logs of a specific service, add the name of the service, e.g.:
3434
docker compose logs backend
3535
```
3636

37+
## Mailcatcher
38+
39+
Mailcatcher is a simple SMTP server that catches all emails sent by the backend during local development. Instead of sending real emails, they are captured and displayed in a web interface.
40+
41+
This is useful for:
42+
43+
* Testing email functionality during development
44+
* Verifying email content and formatting
45+
* Debugging email-related functionality without sending real emails
46+
47+
The backend is automatically configured to use Mailcatcher when running with Docker Compose locally (SMTP on port 1025). All captured emails can be viewed at <http://localhost:1080>.
48+
3749
## Local Development
3850

3951
The Docker Compose files are configured so that each of the services is available in a different port in `localhost`.
@@ -174,34 +186,34 @@ The production or staging URLs would use these same paths, but with your own dom
174186

175187
Development URLs, for local development.
176188

177-
Frontend: http://localhost:5173
189+
Frontend: <http://localhost:5173>
178190

179-
Backend: http://localhost:8000
191+
Backend: <http://localhost:8000>
180192

181-
Automatic Interactive Docs (Swagger UI): http://localhost:8000/docs
193+
Automatic Interactive Docs (Swagger UI): <http://localhost:8000/docs>
182194

183-
Automatic Alternative Docs (ReDoc): http://localhost:8000/redoc
195+
Automatic Alternative Docs (ReDoc): <http://localhost:8000/redoc>
184196

185-
Adminer: http://localhost:8080
197+
Adminer: <http://localhost:8080>
186198

187-
Traefik UI: http://localhost:8090
199+
Traefik UI: <http://localhost:8090>
188200

189-
MailCatcher: http://localhost:1080
201+
MailCatcher: <http://localhost:1080>
190202

191203
### Development URLs with `localhost.tiangolo.com` Configured
192204

193205
Development URLs, for local development.
194206

195-
Frontend: http://dashboard.localhost.tiangolo.com
207+
Frontend: <http://dashboard.localhost.tiangolo.com>
196208

197-
Backend: http://api.localhost.tiangolo.com
209+
Backend: <http://api.localhost.tiangolo.com>
198210

199-
Automatic Interactive Docs (Swagger UI): http://api.localhost.tiangolo.com/docs
211+
Automatic Interactive Docs (Swagger UI): <http://api.localhost.tiangolo.com/docs>
200212

201-
Automatic Alternative Docs (ReDoc): http://api.localhost.tiangolo.com/redoc
213+
Automatic Alternative Docs (ReDoc): <http://api.localhost.tiangolo.com/redoc>
202214

203-
Adminer: http://localhost.tiangolo.com:8080
215+
Adminer: <http://localhost.tiangolo.com:8080>
204216

205-
Traefik UI: http://localhost.tiangolo.com:8090
217+
Traefik UI: <http://localhost.tiangolo.com:8090>
206218

207-
MailCatcher: http://localhost.tiangolo.com:1080
219+
MailCatcher: <http://localhost.tiangolo.com:1080>

0 commit comments

Comments
 (0)