# matiasarbz/mypastelitos architecture

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

- Interactive diagram: https://gitdiagram.com/matiasarbz/mypastelitos
- Repository: https://github.com/matiasarbz/mypastelitos

## Overview

MyPastelitos.Web is an ASP.NET application for browsing recipes and sections, managing accounts and users, and administering roles and permissions. The main management workflow is a browser or API request into a controller, through a domain service, and—where shown—to the EF data context. Account login is a separate web/API workflow; section and recipe browsing form the customer-facing domain. The tree and index identify additional capabilities, but their implementations were not sampled, so some links are intentionally omitted. Edges rely on indexed references or shown code; dashed edges indicate unverified routing.

Main entry points: [`MyPastelitos.Web/Data/DataContext.cs`](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/DataContext.cs) (Application data), [`MyPastelitos.Web/Services/Implementations/AccountService.cs`](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/AccountService.cs) (Account service), [`MyPastelitos.Web/Controllers/Api/AccountController.cs`](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/AccountController.cs) (API account), [`MyPastelitos.Web/Controllers/Api/SectionsController.cs`](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/SectionsController.cs) (Section API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Recipe browsing"]
  node_recipes_controller["Recipe endpoints"]
  node_recipes_service["Recipe service<br/>[RecipesService.cs]"]
  node_home_controller["Home pages<br/>[HomeController.cs]"]
  node_home_service["Home service<br/>[HomeService.cs]"]
end

subgraph group_identity["Accounts and users"]
  node_web_account["Web account"]
  node_api_account["API account"]
  node_account_service["Account service<br/>[AccountService.cs]"]
  node_users_controller["User management<br/>[UsersController.cs]"]
  node_users_service["Users service<br/>[UsersService.cs]"]
end

subgraph group_admin["Administration"]
  node_section_controller["Section management"]
  node_api_section_controller["Section API"]
  node_section_service["Section service<br/>[SectionsService.cs]"]
  node_roles_controller["Role management<br/>[RolesController.cs]"]
  node_roles_service["Roles service<br/>[RolesService.cs]"]
end

subgraph group_platform["Shared platform"]
  node_api_base["API responses<br/>[ApiController.cs]"]
  node_auth_attributes["Authorization rules"]
  node_query_ops["Query operations"]
  node_data_context[("Application data<br/>[DataContext.cs]")]
  node_user_entity["User records<br/>[User.cs]"]
  node_section_entity["Section records<br/>[Section.cs]"]
  node_role_entity["Private roles"]
  node_permission_entity["Permissions<br/>[Permission.cs]"]
  node_role_permission_entity["Role permissions<br/>[RolePermission.cs]"]
  node_recipe_entity["Recipe records<br/>[Recipe.cs]"]
end

node_browser(("Browser user"))
node_api_client(("API client"))

node_browser -.->|"submits login"| node_web_account
node_browser -.->|"manages users"| node_users_controller
node_browser -.->|"manages sections"| node_section_controller
node_browser -.->|"manages roles"| node_roles_controller
node_browser -.->|"browses"| node_home_controller
node_api_client -.->|"requests login"| node_api_account
node_api_client -.->|"requests sections"| node_api_section_controller
node_web_account -->|"delegates"| node_account_service
node_api_account -->|"delegates"| node_account_service
node_api_account -->|"uses responses"| node_api_base
node_api_section_controller -->|"uses responses"| node_api_base
node_users_controller -->|"delegates"| node_users_service
node_section_controller -->|"delegates"| node_section_service
node_api_section_controller -->|"delegates"| node_section_service
node_roles_controller -->|"delegates"| node_roles_service
node_account_service -->|"reads and writes"| node_data_context
node_users_service -->|"reads and writes"| node_data_context
node_home_service -->|"queries"| node_data_context
node_roles_service -->|"reads and writes"| node_data_context
node_home_service -->|"uses queries"| node_query_ops
node_roles_service -->|"uses queries"| node_query_ops
node_query_ops -->|"queries and saves"| node_data_context
node_data_context -->|"maps identity"| node_user_entity
node_data_context -->|"stores"| node_section_entity
node_data_context -->|"stores"| node_recipe_entity
node_data_context -->|"stores"| node_role_entity
node_data_context -->|"stores"| node_permission_entity
node_data_context -->|"stores"| node_role_permission_entity
node_data_context -->|"keys and relations"| node_role_permission_entity
node_recipes_controller -.->|"delegates"| node_recipes_service
node_home_controller -.->|"delegates"| node_home_service
node_auth_attributes -.->|"checks access"| node_account_service

click node_web_account "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/AccountController.cs"
click node_api_account "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/AccountController.cs"
click node_account_service "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/AccountService.cs"
click node_users_controller "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/UsersController.cs"
click node_users_service "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/UsersService.cs"
click node_recipes_controller "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/RecipeController.cs"
click node_recipes_service "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/RecipesService.cs"
click node_home_controller "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/HomeController.cs"
click node_home_service "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/HomeService.cs"
click node_section_controller "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/SectionsController.cs"
click node_api_section_controller "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/SectionsController.cs"
click node_section_service "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/SectionsService.cs"
click node_roles_controller "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/RolesController.cs"
click node_roles_service "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/RolesService.cs"
click node_api_base "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/ApiController.cs"
click node_auth_attributes "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Core/Attributes/CustomAuthorizeAttribute.cs"
click node_query_ops "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/CustomQueryableOperationsService.cs"
click node_data_context "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/DataContext.cs"
click node_user_entity "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/User.cs"
click node_section_entity "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/Section.cs"
click node_role_entity "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/PrivateRecipeRole.cs"
click node_permission_entity "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/Permission.cs"
click node_role_permission_entity "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/RolePermission.cs"
click node_recipe_entity "https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/Recipe.cs"

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_recipes_controller,node_recipes_service,node_home_controller,node_home_service,node_browser,node_api_client toneBlue
class node_web_account,node_api_account,node_account_service,node_users_controller,node_users_service toneAmber
class node_section_controller,node_api_section_controller,node_section_service,node_roles_controller,node_roles_service toneMint
class node_api_base,node_auth_attributes,node_query_ops,node_data_context,node_user_entity,node_section_entity,node_role_entity,node_permission_entity,node_role_permission_entity,node_recipe_entity toneRose
```

## Components

### Recipe browsing

- [Recipe endpoints](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/RecipeController.cs): `MyPastelitos.Web/Controllers/RecipeController.cs`
- [Recipe service](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/RecipesService.cs): `MyPastelitos.Web/Services/Implementations/RecipesService.cs`
- [Home pages](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/HomeController.cs): `MyPastelitos.Web/Controllers/HomeController.cs`
- [Home service](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/HomeService.cs): `MyPastelitos.Web/Services/Implementations/HomeService.cs`

### Accounts and users

- [Web account](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/AccountController.cs): `MyPastelitos.Web/Controllers/AccountController.cs`
- [API account](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/AccountController.cs): `MyPastelitos.Web/Controllers/Api/AccountController.cs`
- [Account service](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/AccountService.cs): `MyPastelitos.Web/Services/Implementations/AccountService.cs`
- [User management](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/UsersController.cs): `MyPastelitos.Web/Controllers/UsersController.cs`
- [Users service](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/UsersService.cs): `MyPastelitos.Web/Services/Implementations/UsersService.cs`

### Administration

- [Section management](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/SectionsController.cs): `MyPastelitos.Web/Controllers/SectionsController.cs`
- [Section API](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/SectionsController.cs): `MyPastelitos.Web/Controllers/Api/SectionsController.cs`
- [Section service](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/SectionsService.cs): `MyPastelitos.Web/Services/Implementations/SectionsService.cs`
- [Role management](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/RolesController.cs): `MyPastelitos.Web/Controllers/RolesController.cs`
- [Roles service](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/Implementations/RolesService.cs): `MyPastelitos.Web/Services/Implementations/RolesService.cs`

### Shared platform

- [API responses](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Controllers/Api/ApiController.cs): `MyPastelitos.Web/Controllers/Api/ApiController.cs`
- [Authorization rules](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Core/Attributes/CustomAuthorizeAttribute.cs): `MyPastelitos.Web/Core/Attributes/CustomAuthorizeAttribute.cs`
- [Query operations](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Services/CustomQueryableOperationsService.cs): `MyPastelitos.Web/Services/CustomQueryableOperationsService.cs`
- [Application data](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/DataContext.cs): `MyPastelitos.Web/Data/DataContext.cs`
- [User records](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/User.cs): `MyPastelitos.Web/Data/Entities/User.cs`
- [Section records](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/Section.cs): `MyPastelitos.Web/Data/Entities/Section.cs`
- [Private roles](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/PrivateRecipeRole.cs): `MyPastelitos.Web/Data/Entities/PrivateRecipeRole.cs`
- [Permissions](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/Permission.cs): `MyPastelitos.Web/Data/Entities/Permission.cs`
- [Role permissions](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/RolePermission.cs): `MyPastelitos.Web/Data/Entities/RolePermission.cs`
- [Recipe records](https://github.com/matiasarbz/mypastelitos/blob/main/MyPastelitos.Web/Data/Entities/Recipe.cs): `MyPastelitos.Web/Data/Entities/Recipe.cs`

### Other components

- **Browser user**
- **API client**

## Connections

- Browser user → Web account: submits login
- Browser user → User management: manages users
- Browser user → Section management: manages sections
- Browser user → Role management: manages roles
- Browser user → Home pages: browses
- API client → API account: requests login
- API client → Section API: requests sections
- Web account → Account service: delegates (evidence: `MyPastelitos.Web/Controllers/AccountController.cs`)
- API account → Account service: delegates (evidence: `MyPastelitos.Web/Controllers/Api/AccountController.cs`)
- API account → API responses: uses responses (evidence: `MyPastelitos.Web/Controllers/Api/AccountController.cs`)
- Section API → API responses: uses responses (evidence: `MyPastelitos.Web/Controllers/Api/SectionsController.cs`)
- User management → Users service: delegates (evidence: `MyPastelitos.Web/Controllers/UsersController.cs`)
- Section management → Section service: delegates (evidence: `MyPastelitos.Web/Controllers/SectionsController.cs`)
- Section API → Section service: delegates (evidence: `MyPastelitos.Web/Controllers/Api/SectionsController.cs`)
- Role management → Roles service: delegates (evidence: `MyPastelitos.Web/Controllers/RolesController.cs`)
- Account service → Application data: reads and writes (evidence: `MyPastelitos.Web/Services/Implementations/AccountService.cs`)
- Users service → Application data: reads and writes (evidence: `MyPastelitos.Web/Services/Implementations/UsersService.cs`)
- Home service → Application data: queries (evidence: `MyPastelitos.Web/Services/Implementations/HomeService.cs`)
- Roles service → Application data: reads and writes (evidence: `MyPastelitos.Web/Services/Implementations/RolesService.cs`)
- Home service → Query operations: uses queries (evidence: `MyPastelitos.Web/Services/Implementations/HomeService.cs`)
- Roles service → Query operations: uses queries (evidence: `MyPastelitos.Web/Services/Implementations/RolesService.cs`)
- Query operations → Application data: queries and saves (evidence: `MyPastelitos.Web/Services/CustomQueryableOperationsService.cs`)
- Application data → User records: maps identity (evidence: `MyPastelitos.Web/Data/DataContext.cs`)
- Application data → Section records: stores (evidence: `MyPastelitos.Web/Data/DataContext.cs`)
- Application data → Recipe records: stores (evidence: `MyPastelitos.Web/Data/DataContext.cs`)
- Application data → Private roles: stores (evidence: `MyPastelitos.Web/Data/DataContext.cs`)
- Application data → Permissions: stores (evidence: `MyPastelitos.Web/Data/DataContext.cs`)
- Application data → Role permissions: stores (evidence: `MyPastelitos.Web/Data/DataContext.cs`)
- Application data → Role permissions: keys and relations (evidence: `MyPastelitos.Web/Data/DataContext.cs`)
- Recipe endpoints → Recipe service: delegates
- Home pages → Home service: delegates
- Authorization rules → Account service: checks access
