docs: generate README for component/default/sonar-test-nest4 [documentor-agent]

This commit is contained in:
2026-05-14 12:04:38 +00:00
parent 3b72673506
commit 192f2f311d

View File

@@ -1,7 +1,7 @@
---
title: "Sonar Test Nest4"
generated_by: documentor-agent
generated_at: "2026-05-14T12:03:00+00:00"
generated_at: "2026-05-14T12:03:53+00:00"
human_edited: false
source_entity: "Component/default/sonar-test-nest4"
source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4"
@@ -9,15 +9,15 @@ source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4"
# Sonar Test Nest4
> A stateless microservice built with TypeScript and NestJS, providing API endpoints for item management and Prometheus-based observability.
> A stateless microservice built with TypeScript and NestJS, providing API endpoints for item management and integrated observability features.
## Overview
Sonar Test Nest4 is a stateless microservice scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. It is designed to manage items through a RESTful API and includes built-in observability features such as health checks and Prometheus metrics.
Sonar Test Nest4 is a stateless microservice scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. It is implemented using the `typescript-nestjs` runtime and is designed to manage items through a RESTful API. The service includes built-in observability features such as health checks and Prometheus metrics.
The service is implemented using the `typescript-nestjs` runtime and follows a structured branch model (`dev`, `staging`, `prod`, and `main`) to ensure smooth CI/CD workflows. It is deployed to Azure Kubernetes Service (AKS) via Humanitec, with container images stored in Azure Container Registry (ACR).
The service follows a structured branch model (`devstaging → prod → main`) to ensure smooth CI/CD workflows. Application code resides in the `dev` branch, which triggers automatic builds and deployments to the development environment. Promotions to staging and production require pull requests with CI gates and approvals.
This service plays a key role in the broader system by providing item management capabilities and adhering to platform standards for observability, deployment, and runtime configuration.
Sonar Test Nest4 integrates with Azure Container Registry for image storage and Humanitec for deployment orchestration, targeting an AKS cluster. Observability is enhanced with OpenTelemetry instrumentation and a Grafana dashboard for monitoring.
## Repository
@@ -34,15 +34,16 @@ Sonar Test Nest4 is built using the `typescript-nestjs` runtime and deployed as
- **Runtime**: TypeScript with NestJS framework.
- **Container Port**: `3000`.
- **Health Check Endpoint**: `/health`.
- **Metrics Endpoint**: `/metrics` (Prometheus format).
- **Image Repository**: Azure Container Registry (`bstagecjotdevacr`).
- **Endpoints**:
- `/health` for health checks.
- `/metrics` for Prometheus metrics.
- `/api/items` for item management.
- **Image Storage**: Azure Container Registry (`bstagecjotdevacr`).
- **Deployment Flow**:
- CI/CD pipelines (`build-push.yml` and `deploy-humanitec.yml`) handle image building, testing, and deployment.
- Humanitec orchestrates deployments to AKS using Score files.
The CI/CD pipeline is managed through Gitea Actions workflows:
- `build-push.yml`: Builds and tests the application, then pushes the container image to ACR.
- `deploy-humanitec.yml`: Deploys the service to AKS via Humanitec using Score files.
Promotions between environments (`dev`, `staging`, `prod`) are triggered through Backstage's CI/CD tab, ensuring controlled and gated deployments.
The service is integrated with Gitea Actions for CI/CD and Humanitec for deployment orchestration. Observability is provided through Prometheus metrics and a Grafana dashboard.
## Configuration
@@ -54,20 +55,29 @@ Promotions between environments (`dev`, `staging`, `prod`) are triggered through
## Operations
The service follows a structured branch model for development and deployment:
### Deployment Steps
- **dev**: Active development branch; commits trigger automatic builds and deployments to the dev environment.
- **staging**: Pre-production environment; changes are promoted from `dev` via PR with CI gate and approval.
- **prod**: Production environment; changes are promoted from `staging` via PR with CI gate and approval.
- **main**: System of record; receives merges from `prod` after releases.
1. Push changes to the `dev` branch to trigger automatic builds and deployments to the development environment.
2. Open a pull request for promotion to `staging` or `prod`. Ensure CI tests pass and obtain one approval.
3. Merge the pull request to promote the service to the target environment.
4. Application code is merged into the `main` branch from `prod` after releases.
Deployment workflows are runtime-agnostic and rely on `.platform/config.yaml` for configuration.
### Branch Model
| Branch | Purpose |
|---|---|
| dev | Active development — push freely, deploys to dev environment automatically. |
| staging | Pre-production — promoted from dev via PR (CI gate + 1 approval). |
| prod | Production — promoted from staging via PR (CI gate + 1 approval). |
| main | System of record — receives merges from prod after releases. |
## Observability
- [Grafana Dashboard](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4): OpenTelemetry-based application observability.
- Prometheus metrics exposed at `/metrics`.
- Health check endpoint at `/health`.
| Observability Feature | Description |
|---|---|
| Health Check | `/health` endpoint returns `{"status":"UP"}`. |
| Metrics | `/metrics` endpoint exposes Prometheus metrics. |
| Grafana Dashboard | [OpenTelemetry Application Observability](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4). |
## Dependencies