# greentetrahedron/flower-forest architecture

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

- Interactive diagram: https://gitdiagram.com/greentetrahedron/flower-forest
- Repository: https://github.com/greentetrahedron/flower-forest

## Overview

Flower Forest is a flower-portfolio application: users register or sign in, organize plants into catalogues, and manage catalogue visibility and plant details. The Angular client fronts two alternative backend implementations: a monolithic API and a microservices version with separate user, catalogue, and plant services. The monolith’s plant controller delegates ownership and public-catalogue checks to authorization logic; the sampled microservices catalogue controller delegates authorized operations to its repository. RabbitMQ-based user-data replication is documented and a catalogue consumer is present. Frontend service wiring and several service internals were not sampled, so uncertain calls are omitted.

Main entry points: [`FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/views/components`](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/views/components) (User views), [`FlowerForestAPI/FlowerForestAPI/Controllers`](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestAPI/FlowerForestAPI/Controllers) (Monolith controllers), [`FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/services/catalogue.service.ts`](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/services/catalogue.service.ts) (Catalogue client), [`FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/services/plant.service.ts`](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/services/plant.service.ts) (Plant client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Angular client"]
  node_app["Angular app<br/>[app.component.ts]"]
  node_views["User views"]
  node_catalogue_ui["Catalogue UI"]
  node_plant_ui["Plant UI"]
  node_user_ui["Account UI"]
  node_catalogue_client["Catalogue client"]
  node_plant_client["Plant client<br/>[plant.service.ts]"]
  node_user_client["User client<br/>[user.service.ts]"]
  node_token_client["Token handling"]
  node_storage["Browser storage<br/>[storage.service.ts]"]
end

subgraph group_mono["Monolithic API"]
  node_mono_api["Monolith controllers"]
  node_mono_auth["Catalogue authorization"]
  node_mono_repos["Monolith repositories"]
  node_mono_db["Monolith database context"]
end

subgraph group_services["Microservices API"]
  node_user_service["User service<br/>[UserController.cs]"]
  node_catalogue_service["Catalogue service"]
  node_plant_service["Plant service<br/>[PlantController.cs]"]
  node_user_db[("User database<br/>[UserDbContext.cs]")]
  node_catalogue_db[("Catalogue database")]
  node_plant_db[("Plant database<br/>[PlantDbContext.cs]")]
  node_catalogue_repo["Catalogue repository"]
  node_plant_repo["Plant repository<br/>[PlantRepository.cs]"]
end

subgraph group_shared["Shared infrastructure"]
  node_auth_tokens["Token services<br/>[JwtTokenService.cs]"]
  node_broker_client["RabbitMQ client<br/>[RabbitMQClient.cs]"]
end

node_user(("Portfolio user"))
node_broker["RabbitMQ broker"]

node_user -->|"uses"| node_views
node_app -->|"presents"| node_views
node_views -->|"opens"| node_catalogue_ui
node_views -->|"opens"| node_plant_ui
node_views -->|"opens"| node_user_ui
node_catalogue_ui -->|"requests"| node_catalogue_client
node_plant_ui -->|"requests"| node_plant_client
node_user_ui -->|"requests"| node_user_client
node_token_client -->|"reads token"| node_storage
node_catalogue_client -.->|"HTTP requests"| node_mono_api
node_plant_client -.->|"HTTP requests"| node_mono_api
node_user_client -.->|"HTTP requests"| node_mono_api
node_catalogue_client -.->|"HTTP requests"| node_catalogue_service
node_plant_client -.->|"HTTP requests"| node_plant_service
node_user_client -.->|"HTTP requests"| node_user_service
node_mono_api -->|"checks access"| node_mono_auth
node_mono_api -->|"handles data"| node_mono_repos
node_mono_auth -->|"reads catalogue"| node_mono_repos
node_mono_repos -->|"queries"| node_mono_db
node_catalogue_service -->|"authorized operations"| node_catalogue_repo
node_catalogue_repo -->|"queries"| node_catalogue_db
node_plant_service -->|"plant operations"| node_plant_repo
node_plant_service -->|"loads catalogue"| node_catalogue_repo
node_plant_repo -->|"queries"| node_plant_db
node_user_service -->|"user operations"| node_user_db
node_broker_client -.->|"publishes or consumes"| node_broker
node_catalogue_service -.->|"receives user events"| node_broker_client

click node_app "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/app.component.ts"
click node_views "https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/views/components"
click node_catalogue_ui "https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/components"
click node_plant_ui "https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/components"
click node_user_ui "https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/user/components"
click node_catalogue_client "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/services/catalogue.service.ts"
click node_plant_client "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/services/plant.service.ts"
click node_user_client "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/user/services/user.service.ts"
click node_token_client "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/http-interceptors/services/append-token-interceptor/append-token-interceptor.service.ts"
click node_storage "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/storage/services/storage.service.ts"
click node_mono_api "https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestAPI/FlowerForestAPI/Controllers"
click node_mono_auth "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestAPI/FlowerForestAPI/AuthorizeUserServices/AuthorizeUserService.cs"
click node_mono_repos "https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestAPI/FlowerForestAPI/Repositories"
click node_mono_db "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestAPI/FlowerForestAPI/DbContexts/FlowerForestContext.cs"
click node_user_service "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/UserMicroservice/Controllers/UserController.cs"
click node_catalogue_service "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/Controllers/CatalogueController.cs"
click node_plant_service "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/Controllers/PlantController.cs"
click node_user_db "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/UserMicroservice/DbContexts/UserDbContext.cs"
click node_catalogue_db "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/DbContexts/CatalogueDbContext.cs"
click node_plant_db "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/DbContexts/PlantDbContext.cs"
click node_catalogue_repo "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/Repositories/CatalogueRepositories/CatalogueRepository.cs"
click node_plant_repo "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/Repositories/PlantRepositories/PlantRepository.cs"
click node_auth_tokens "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/AuthenticationUtility/TokenServices/JwtTokenService.cs"
click node_broker_client "https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/MessageBrokerClient/Clients/RabbitMQClient.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_app,node_views,node_catalogue_ui,node_plant_ui,node_user_ui,node_catalogue_client,node_plant_client,node_user_client,node_token_client,node_storage,node_user toneBlue
class node_mono_api,node_mono_auth,node_mono_repos,node_mono_db toneAmber
class node_user_service,node_catalogue_service,node_plant_service,node_user_db,node_catalogue_db,node_plant_db,node_catalogue_repo,node_plant_repo toneMint
class node_auth_tokens,node_broker_client toneRose
class node_broker toneIndigo
```

## Components

### Angular client

- [Angular app](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/app.component.ts): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/app.component.ts`
- [User views](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/views/components): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/views/components`
- [Catalogue UI](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/components): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/components`
- [Plant UI](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/components): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/components`
- [Account UI](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/user/components): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/user/components`
- [Catalogue client](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/services/catalogue.service.ts): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/catalogue/services/catalogue.service.ts`
- [Plant client](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/services/plant.service.ts): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/plant/services/plant.service.ts`
- [User client](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/user/services/user.service.ts): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/user/services/user.service.ts`
- [Token handling](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/http-interceptors/services/append-token-interceptor/append-token-interceptor.service.ts): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/http-interceptors/services/append-token-interceptor/append-token-interceptor.service.ts`
- [Browser storage](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/storage/services/storage.service.ts): `FlowerForestFrontEnd/FlowerForestFrontEnd/src/app/storage/services/storage.service.ts`

### Monolithic API

- [Monolith controllers](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestAPI/FlowerForestAPI/Controllers): `FlowerForestAPI/FlowerForestAPI/Controllers`
- [Catalogue authorization](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestAPI/FlowerForestAPI/AuthorizeUserServices/AuthorizeUserService.cs): `FlowerForestAPI/FlowerForestAPI/AuthorizeUserServices/AuthorizeUserService.cs`
- [Monolith repositories](https://github.com/greentetrahedron/flower-forest/tree/main/FlowerForestAPI/FlowerForestAPI/Repositories): `FlowerForestAPI/FlowerForestAPI/Repositories`
- [Monolith database context](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestAPI/FlowerForestAPI/DbContexts/FlowerForestContext.cs): `FlowerForestAPI/FlowerForestAPI/DbContexts/FlowerForestContext.cs`

### Microservices API

- [User service](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/UserMicroservice/Controllers/UserController.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/UserMicroservice/Controllers/UserController.cs`
- [Catalogue service](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/Controllers/CatalogueController.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/Controllers/CatalogueController.cs`
- [Plant service](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/Controllers/PlantController.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/Controllers/PlantController.cs`
- [User database](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/UserMicroservice/DbContexts/UserDbContext.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/UserMicroservice/DbContexts/UserDbContext.cs`
- [Catalogue database](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/DbContexts/CatalogueDbContext.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/DbContexts/CatalogueDbContext.cs`
- [Plant database](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/DbContexts/PlantDbContext.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/DbContexts/PlantDbContext.cs`
- [Catalogue repository](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/Repositories/CatalogueRepositories/CatalogueRepository.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/CatalogueMicroservice/Repositories/CatalogueRepositories/CatalogueRepository.cs`
- [Plant repository](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/Repositories/PlantRepositories/PlantRepository.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/PlantMicroservice/Repositories/PlantRepositories/PlantRepository.cs`

### Shared infrastructure

- [Token services](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/AuthenticationUtility/TokenServices/JwtTokenService.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/AuthenticationUtility/TokenServices/JwtTokenService.cs`
- [RabbitMQ client](https://github.com/greentetrahedron/flower-forest/blob/main/FlowerForestMicroserviceAPI/FlowerForestAPI/MessageBrokerClient/Clients/RabbitMQClient.cs): `FlowerForestMicroserviceAPI/FlowerForestAPI/MessageBrokerClient/Clients/RabbitMQClient.cs`

### Other components

- **Portfolio user**
- **RabbitMQ broker**

## Connections

- Portfolio user → User views: uses
- Angular app → User views: presents
- User views → Catalogue UI: opens
- User views → Plant UI: opens
- User views → Account UI: opens
- Catalogue UI → Catalogue client: requests
- Plant UI → Plant client: requests
- Account UI → User client: requests
- Token handling → Browser storage: reads token
- Catalogue client → Monolith controllers: HTTP requests
- Plant client → Monolith controllers: HTTP requests
- User client → Monolith controllers: HTTP requests
- Catalogue client → Catalogue service: HTTP requests
- Plant client → Plant service: HTTP requests
- User client → User service: HTTP requests
- Monolith controllers → Catalogue authorization: checks access
- Monolith controllers → Monolith repositories: handles data
- Catalogue authorization → Monolith repositories: reads catalogue
- Monolith repositories → Monolith database context: queries
- Catalogue service → Catalogue repository: authorized operations
- Catalogue repository → Catalogue database: queries
- Plant service → Plant repository: plant operations
- Plant service → Catalogue repository: loads catalogue
- Plant repository → Plant database: queries
- User service → User database: user operations
- RabbitMQ client → RabbitMQ broker: publishes or consumes
- Catalogue service → RabbitMQ client: receives user events
