mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Update web docs for Infrastructure.Email move (#289)
This commit is contained in:
@@ -90,7 +90,7 @@ flowchart TB
|
|||||||
direction LR
|
direction LR
|
||||||
I1["Database.Connection"]
|
I1["Database.Connection"]
|
||||||
I3["Infrastructure.PasswordHashing"]
|
I3["Infrastructure.PasswordHashing"]
|
||||||
I4["Infrastructure.Email /<br/>Email.Templates"]
|
I4["Email.Templates"]
|
||||||
I5["Infrastructure.FileUpload"]
|
I5["Infrastructure.FileUpload"]
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ brewery photo upload command) rather than bound to an HTTP route directly.
|
|||||||
- `Domain.Entities`, `Domain.Exceptions`
|
- `Domain.Entities`, `Domain.Exceptions`
|
||||||
- `Database.Connection` (generic ADO.NET connection/command plumbing) plus
|
- `Database.Connection` (generic ADO.NET connection/command plumbing) plus
|
||||||
whichever infrastructure project the slice needs (`Infrastructure.PasswordHashing`
|
whichever infrastructure project the slice needs (`Infrastructure.PasswordHashing`
|
||||||
for Users, `Infrastructure.Email`/`Infrastructure.Email.Templates` for
|
for Users, `Infrastructure.Email.Templates` for
|
||||||
Emails, `Infrastructure.FileUpload` for PhotoUpload)
|
Emails, `Infrastructure.FileUpload` for PhotoUpload)
|
||||||
- `Shared.Contracts`, `Shared.Application`
|
- `Shared.Contracts`, `Shared.Application`
|
||||||
- No other `Features.*` project, with two exceptions: `Features.Users`
|
- No other `Features.*` project, with two exceptions: `Features.Users`
|
||||||
@@ -208,7 +208,6 @@ whichever slices need them
|
|||||||
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `Database.Connection` | Generic ADO.NET connection/command plumbing (`DefaultSqlConnectionFactory`, the abstract `DapperRepository` base class), not domain-specific; each slice's own `Repository/` folder builds on this. |
|
| `Database.Connection` | Generic ADO.NET connection/command plumbing (`DefaultSqlConnectionFactory`, the abstract `DapperRepository` base class), not domain-specific; each slice's own `Repository/` folder builds on this. |
|
||||||
| `Infrastructure.PasswordHashing` | Argon2id password hashing. |
|
| `Infrastructure.PasswordHashing` | Argon2id password hashing. |
|
||||||
| `Infrastructure.Email` | Email sending capabilities (SMTP/MailKit). |
|
|
||||||
| `Infrastructure.Email.Templates` | Email template rendering (Razor components). |
|
| `Infrastructure.Email.Templates` | Email template rendering (Razor components). |
|
||||||
| `Infrastructure.FileUpload` | `IFileStorageProvider` abstraction over S3-compatible object storage, implemented by `S3FileStorageProvider` (targets the SeaweedFS container in dev; any S3-compatible endpoint in other environments) using the AWS SDK's `AmazonS3Client` with `ForcePathStyle = true`. |
|
| `Infrastructure.FileUpload` | `IFileStorageProvider` abstraction over S3-compatible object storage, implemented by `S3FileStorageProvider` (targets the SeaweedFS container in dev; any S3-compatible endpoint in other environments) using the AWS SDK's `AmazonS3Client` with `ForcePathStyle = true`. |
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ see the notes for what else each of those foundation projects pulls in.
|
|||||||
- `Domain.Exceptions` (referenced by nearly every project directly, including
|
- `Domain.Exceptions` (referenced by nearly every project directly, including
|
||||||
all of `Shared.Contracts` and each feature slice)
|
all of `Shared.Contracts` and each feature slice)
|
||||||
- `Infrastructure.Configuration` (the shared options-binding project
|
- `Infrastructure.Configuration` (the shared options-binding project
|
||||||
referenced by `Database.Connection`, `Infrastructure.Email`,
|
referenced by `Database.Connection`, `Infrastructure.FileUpload`,
|
||||||
`Infrastructure.FileUpload`, and `Features.Emails` directly)
|
and `Features.Emails` directly)
|
||||||
- both are plumbing-level dependencies of nearly everything above, and drawing
|
- both are plumbing-level dependencies of nearly everything above, and drawing
|
||||||
them would just add a second copy of the same fan-in
|
them would just add a second copy of the same fan-in
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ subgraph INFRA["Slice-specific Infrastructure"]
|
|||||||
direction LR
|
direction LR
|
||||||
PwdHash["Infrastructure.PasswordHashing"]
|
PwdHash["Infrastructure.PasswordHashing"]
|
||||||
FileUpload["Infrastructure.FileUpload"]
|
FileUpload["Infrastructure.FileUpload"]
|
||||||
Email["Infrastructure.Email"]
|
|
||||||
EmailTemplates["Infrastructure.Email.Templates"]
|
EmailTemplates["Infrastructure.Email.Templates"]
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -36,5 +35,5 @@ LocationsSlice --> FOUNDATION
|
|||||||
BeersSlice --> FOUNDATION
|
BeersSlice --> FOUNDATION
|
||||||
PhotoSlice --> FOUNDATION & FileUpload
|
PhotoSlice --> FOUNDATION & FileUpload
|
||||||
UsersSlice --> FOUNDATION & PwdHash
|
UsersSlice --> FOUNDATION & PwdHash
|
||||||
EmailsSlice --> Email & EmailTemplates
|
EmailsSlice --> EmailTemplates
|
||||||
DBConn -- Dapper SQL, no ORM --> Tables[("SQL Server<br>Tables")]
|
DBConn -- Dapper SQL, no ORM --> Tables[("SQL Server<br>Tables")]
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ file (`development` in dev, `production` in prod).
|
|||||||
|
|
||||||
### SMTP configuration (backend)
|
### SMTP configuration (backend)
|
||||||
|
|
||||||
Read by `Infrastructure.Email/SmtpEmailProvider.cs` for sending confirmation and
|
Read by `Features.Emails/Services/SmtpEmailProvider.cs` for sending confirmation and
|
||||||
account emails.
|
account emails.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -246,7 +246,7 @@ SMTP_FROM_EMAIL=noreply@thebiergarten.app # Required, no default
|
|||||||
SMTP_FROM_NAME=The Biergarten App # Optional, defaults to "The Biergarten"
|
SMTP_FROM_NAME=The Biergarten App # Optional, defaults to "The Biergarten"
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Implementation**: `Infrastructure.Email/SmtpEmailProvider.cs` throws on
|
- **Implementation**: `Features.Emails/Services/SmtpEmailProvider.cs` throws on
|
||||||
startup if `SMTP_HOST` or `SMTP_FROM_EMAIL` is missing
|
startup if `SMTP_HOST` or `SMTP_FROM_EMAIL` is missing
|
||||||
- **Local dev**: point at the `mailpit` Docker service (SMTP on port 1025, web
|
- **Local dev**: point at the `mailpit` Docker service (SMTP on port 1025, web
|
||||||
UI on http://localhost:8025)
|
UI on http://localhost:8025)
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ API.Specs/
|
|||||||
│ └── ApiGeneralSteps.cs # Shared/general step definitions
|
│ └── ApiGeneralSteps.cs # Shared/general step definitions
|
||||||
├── Mocks/
|
├── Mocks/
|
||||||
│ ├── MockEmailDispatcher.cs # Substitutes Features.Emails' IEmailDispatcher
|
│ ├── MockEmailDispatcher.cs # Substitutes Features.Emails' IEmailDispatcher
|
||||||
│ └── MockEmailProvider.cs # Substitutes Infrastructure.Email's IEmailProvider
|
│ └── MockEmailProvider.cs # Substitutes Features.Emails' IEmailProvider
|
||||||
└── TestApiFactory.cs # Test server setup (swaps in the mocks above)
|
└── TestApiFactory.cs # Test server setup (swaps in the mocks above)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user