# georgidimitrovx/healthsphere architecture

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

- Interactive diagram: https://gitdiagram.com/georgidimitrovx/healthsphere
- Repository: https://github.com/georgidimitrovx/healthsphere

## Overview

HealthSphere is an early-stage health-service web application: its visible workflow is sign-in or sign-up from an Angular client, through a gateway, to an authentication service. The gateway also hosts middleware that checks tokens with the authentication service before allowing other requests. The authentication endpoints currently return sample tokens; the README names no further product capabilities. The client components and shared account types are represented, but their detailed templates and the gateway’s service-routing helper were not sampled.

Main entry points: [`HealthSphere.Server/Controllers/GatewayController.cs`](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Controllers/GatewayController.cs) (Request gateway), [`healthsphere.client/src/app/app.component.ts`](https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/app.component.ts) (Client requests), [`healthsphere.client/src/app/app-routing.module.ts`](https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/app-routing.module.ts) (Client routes), [`HealthSphere.Server/Program.cs`](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Program.cs) (Server setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_routes["Client routes"]
  node_signin["Sign-in screen"]
  node_signup["Sign-up screen"]
  node_app["Client requests<br/>[app.component.ts]"]
end

subgraph group_gateway["API gateway"]
  node_gateway["Request gateway"]
  node_helpers["Service routing<br/>[Helpers.cs]"]
  node_middleware["Token middleware"]
  node_server["Server setup<br/>[Program.cs]"]
end

subgraph group_auth["Authentication"]
  node_authsetup["Auth setup<br/>[Program.cs]"]
  node_authapi["Sign-in and sign-up"]
end

node_user(("User"))
node_shared["Account types<br/>[AccountTypes.cs]"]
node_credentials["Credentials DTO"]

node_user -->|"navigates"| node_routes
node_routes -->|"routes to"| node_signin
node_routes -->|"routes to"| node_signup
node_app -->|"posts credentials"| node_gateway
node_app -->|"uses"| node_credentials
node_app -->|"uses account types"| node_shared
node_server -->|"installs"| node_middleware
node_server -->|"maps controllers"| node_gateway
node_gateway -->|"resolves service"| node_helpers
node_gateway -->|"forwards requests"| node_authapi
node_middleware -.->|"requests token validation"| node_authsetup
node_authsetup -->|"maps controllers"| node_authapi

click node_routes "https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/app-routing.module.ts"
click node_signin "https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/sign-in/sign-in.component.ts"
click node_signup "https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/sign-up/sign-up.component.ts"
click node_app "https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/app.component.ts"
click node_shared "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.SharedKernel/Interfaces/AccountTypes.cs"
click node_credentials "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.SharedKernel/DTOs/UserCredentialsDto.cs"
click node_gateway "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Controllers/GatewayController.cs"
click node_helpers "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Helpers.cs"
click node_middleware "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/AuthenticationMiddleware.cs"
click node_server "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Program.cs"
click node_authsetup "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.AuthenticationService/Program.cs"
click node_authapi "https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.AuthenticationService/API/Controllers/AuthenticationController.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_routes,node_signin,node_signup,node_app,node_user toneBlue
class node_gateway,node_helpers,node_middleware,node_server toneAmber
class node_authsetup,node_authapi toneMint
class node_shared,node_credentials toneTeal
```

## Components

### Web client

- [Client routes](https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/app-routing.module.ts): `healthsphere.client/src/app/app-routing.module.ts`
- [Sign-in screen](https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/sign-in/sign-in.component.ts): `healthsphere.client/src/app/sign-in/sign-in.component.ts`
- [Sign-up screen](https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/sign-up/sign-up.component.ts): `healthsphere.client/src/app/sign-up/sign-up.component.ts`
- [Client requests](https://github.com/georgidimitrovx/healthsphere/blob/master/healthsphere.client/src/app/app.component.ts): `healthsphere.client/src/app/app.component.ts`

### API gateway

- [Request gateway](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Controllers/GatewayController.cs): `HealthSphere.Server/Controllers/GatewayController.cs`
- [Service routing](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Helpers.cs): `HealthSphere.Server/Helpers.cs`
- [Token middleware](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/AuthenticationMiddleware.cs): `HealthSphere.Server/AuthenticationMiddleware.cs`
- [Server setup](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.Server/Program.cs): `HealthSphere.Server/Program.cs`

### Authentication

- [Auth setup](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.AuthenticationService/Program.cs): `HealthSphere.AuthenticationService/Program.cs`
- [Sign-in and sign-up](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.AuthenticationService/API/Controllers/AuthenticationController.cs): `HealthSphere.AuthenticationService/API/Controllers/AuthenticationController.cs`

### Other components

- **User**
- [Account types](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.SharedKernel/Interfaces/AccountTypes.cs): `HealthSphere.SharedKernel/Interfaces/AccountTypes.cs`
- [Credentials DTO](https://github.com/georgidimitrovx/healthsphere/blob/master/HealthSphere.SharedKernel/DTOs/UserCredentialsDto.cs): `HealthSphere.SharedKernel/DTOs/UserCredentialsDto.cs`

## Connections

- User → Client routes: navigates
- Client routes → Sign-in screen: routes to
- Client routes → Sign-up screen: routes to
- Client requests → Request gateway: posts credentials
- Client requests → Credentials DTO: uses
- Client requests → Account types: uses account types
- Server setup → Token middleware: installs
- Server setup → Request gateway: maps controllers
- Request gateway → Service routing: resolves service
- Request gateway → Sign-in and sign-up: forwards requests
- Token middleware → Auth setup: requests token validation
- Auth setup → Sign-in and sign-up: maps controllers
