Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions backend/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,26 @@ app.get('/users/:id', async (req, res) => {
> [!NOTE]
> **Internal Routing:** For more context, refer back to the [Global Index](../README.md).


### 🔄 Request / Response Flow

```mermaid
sequenceDiagram
participant Client
participant Controller
participant Service
participant ORM
participant Database

Client->>Controller: GET /users/1
Controller->>Service: getUser(1)
Service->>ORM: findById(1)
ORM->>Database: SELECT * FROM users WHERE id = 1
Database-->>ORM: Result Set
ORM-->>Service: ORM Model
Service-->>Controller: DTO (Data Transfer Object)
Controller-->>Client: 200 OK (JSON)
```

### 🚀 Solution
Never allow Database Object Relational Mapping (ORM) models to bleed into standard HTTP responses. Always map through a DTO.
Loading