# crismandev/dam-2 architecture

> Architecture diagram of the GitHub repository crismandev/dam-2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/crismandev/dam-2
- Repository: https://github.com/crismandev/dam-2

## Overview

Recetas App is a small SwiftUI app for browsing an in-memory recipe list, toggling favorites, and adding recipes through a validated form. The main flow starts at the welcome screen, enters the recipe list, and opens registration; saving a valid recipe updates the bound list and dismisses the form. Favorite state is also managed in the list. The graph reflects README-documented behavior and sampled Swift source; it has no persistent store or external service.

Main entry points: [`RecetasApp/Vistas/MisRecetasView.swift`](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/MisRecetasView.swift) (Recipe list), [`RecetasApp/ContentView.swift`](https://github.com/crismandev/dam-2/blob/main/RecetasApp/ContentView.swift) (Screen switch), [`RecetasApp/Vistas/RegistroView.swift`](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/RegistroView.swift) (Recipe registration), [`RecetasApp/Vistas/BienvenidaView.swift`](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/BienvenidaView.swift) (Welcome screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and navigation"]
  node_app["App entry"]
  node_content["Screen switch<br/>[ContentView.swift]"]
  node_welcome["Welcome screen"]
end

subgraph group_recipes["Recipe experience"]
  node_list["Recipe list"]
  node_row["Recipe row<br/>[FilaReceta.swift]"]
  node_registration["Recipe registration<br/>[RegistroView.swift]"]
end

subgraph group_model["Recipe data"]
  node_recipe["Recipe model<br/>[Receta.swift]"]
end

node_user(("User"))

node_user -->|"launches"| node_app
node_app -->|"shows"| node_content
node_content -->|"shows"| node_welcome
node_content -->|"shows"| node_list
node_user -->|"enters"| node_welcome
node_welcome -.->|"sets state"| node_content
node_list -->|"renders"| node_row
node_list -->|"opens"| node_registration
node_registration -->|"updates binding"| node_list
node_registration -->|"creates"| node_recipe
node_list -->|"loads examples"| node_recipe
node_row -->|"displays fields"| node_recipe
node_user -->|"toggles favorite"| node_list

click node_app "https://github.com/crismandev/dam-2/blob/main/RecetasApp/RecetasAppApp.swift"
click node_content "https://github.com/crismandev/dam-2/blob/main/RecetasApp/ContentView.swift"
click node_welcome "https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/BienvenidaView.swift"
click node_list "https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/MisRecetasView.swift"
click node_row "https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/FilaReceta.swift"
click node_registration "https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/RegistroView.swift"
click node_recipe "https://github.com/crismandev/dam-2/blob/main/RecetasApp/Modelo/Receta.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_content,node_welcome,node_user toneBlue
class node_list,node_row,node_registration toneAmber
class node_recipe toneMint
```

## Components

### App and navigation

- [App entry](https://github.com/crismandev/dam-2/blob/main/RecetasApp/RecetasAppApp.swift): `RecetasApp/RecetasAppApp.swift`
- [Screen switch](https://github.com/crismandev/dam-2/blob/main/RecetasApp/ContentView.swift): `RecetasApp/ContentView.swift`
- [Welcome screen](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/BienvenidaView.swift): `RecetasApp/Vistas/BienvenidaView.swift`

### Recipe experience

- [Recipe list](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/MisRecetasView.swift): `RecetasApp/Vistas/MisRecetasView.swift`
- [Recipe row](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/FilaReceta.swift): `RecetasApp/Vistas/FilaReceta.swift`
- [Recipe registration](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Vistas/RegistroView.swift): `RecetasApp/Vistas/RegistroView.swift`

### Recipe data

- [Recipe model](https://github.com/crismandev/dam-2/blob/main/RecetasApp/Modelo/Receta.swift): `RecetasApp/Modelo/Receta.swift`

### Other components

- **User**

## Connections

- User → App entry: launches
- App entry → Screen switch: shows (evidence: `RecetasApp/RecetasAppApp.swift`)
- Screen switch → Welcome screen: shows (evidence: `RecetasApp/ContentView.swift`)
- Screen switch → Recipe list: shows (evidence: `RecetasApp/ContentView.swift`)
- User → Welcome screen: enters (evidence: `README.md`)
- Welcome screen → Screen switch: sets state (evidence: `RecetasApp/ContentView.swift`)
- Recipe list → Recipe row: renders (evidence: `RecetasApp/Vistas/MisRecetasView.swift`)
- Recipe list → Recipe registration: opens (evidence: `RecetasApp/Vistas/MisRecetasView.swift`)
- Recipe registration → Recipe list: updates binding (evidence: `RecetasApp/Vistas/RegistroView.swift`)
- Recipe registration → Recipe model: creates (evidence: `RecetasApp/Vistas/RegistroView.swift`)
- Recipe list → Recipe model: loads examples (evidence: `RecetasApp/Vistas/MisRecetasView.swift`)
- Recipe row → Recipe model: displays fields (evidence: `RecetasApp/Vistas/FilaReceta.swift`)
- User → Recipe list: toggles favorite (evidence: `README.md`)
