# praveen-kumar-karthikeyan/healthy.option.api.user-service architecture

> Architecture diagram of the GitHub repository praveen-kumar-karthikeyan/healthy.option.api.user-service, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/praveen-kumar-karthikeyan/healthy.option.api.user-service
- Repository: https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service

## Overview

This is a small Spring Boot user-service exposing `/hello` and `/home`. The application entry point starts Spring; Spring maps requests to the controller and applies the configured security chain. Despite the `/hello` method’s `publicApi` name, the security configuration requires authentication for every path. Credentials are held in memory. The excerpts show the application, routes, and security setup; framework dispatch details are inferred from Spring annotations and configuration.

Main entry points: [`api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java`](https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java) (Security policy), [`api.user-service/src/main/java/com/healthy/option/api/user_service/controller/UserController.java`](https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/controller/UserController.java) (User routes), [`api.user-service/src/main/java/com/healthy/option/api/user_service/UserServiceAPI.java`](https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/UserServiceAPI.java) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Web service"]
  node_entry["Application entry"]
  node_routes["User routes"]
end

subgraph group_security["Authentication"]
  node_security_config["Security policy"]
  node_credentials[("In-memory users")]
end

node_client(("HTTP client"))
node_spring{{"Spring runtime"}}

node_entry -->|"starts"| node_spring
node_client -.->|"sends requests"| node_spring
node_spring -.->|"dispatches routes"| node_routes
node_spring -.->|"loads configuration"| node_security_config
node_security_config -->|"provides users"| node_credentials
node_security_config -.->|"requires authentication"| node_routes

click node_entry "https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/UserServiceAPI.java"
click node_routes "https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/controller/UserController.java"
click node_security_config "https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java"
click node_credentials "https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java"

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_entry,node_routes,node_client toneBlue
class node_security_config,node_credentials toneAmber
class node_spring toneIndigo
```

## Components

### Web service

- [Application entry](https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/UserServiceAPI.java): `api.user-service/src/main/java/com/healthy/option/api/user_service/UserServiceAPI.java`
- [User routes](https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/controller/UserController.java): `api.user-service/src/main/java/com/healthy/option/api/user_service/controller/UserController.java`

### Authentication

- [Security policy](https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java): `api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java`
- [In-memory users](https://github.com/praveen-kumar-karthikeyan/healthy.option.api.user-service/blob/main/api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java): `api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java`

### Other components

- **HTTP client**
- **Spring runtime**

## Connections

- Application entry → Spring runtime: starts (evidence: `api.user-service/src/main/java/com/healthy/option/api/user_service/UserServiceAPI.java`)
- HTTP client → Spring runtime: sends requests
- Spring runtime → User routes: dispatches routes
- Spring runtime → Security policy: loads configuration
- Security policy → In-memory users: provides users (evidence: `api.user-service/src/main/java/com/healthy/option/api/user_service/config/SecurityConfig.java`)
- Security policy → User routes: requires authentication
