docs: README for component/default/sonar-test-nest4 #12

Closed
demo-bot wants to merge 1 commits from documentor-agent-component-default-sonar-test-nest4-doc-c36e042daba8 into main

View File

@@ -1,7 +1,7 @@
--- ---
title: "Sonar Test Nest4" title: "Sonar Test Nest4"
generated_by: documentor-agent generated_by: documentor-agent
generated_at: "2026-05-14T12:03:00+00:00" generated_at: "2026-05-14T12:03:54+00:00"
human_edited: false human_edited: false
source_entity: "Component/default/sonar-test-nest4" source_entity: "Component/default/sonar-test-nest4"
source_repo: "https://gitea.kyndemo.live/validate/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 # 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 ## 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). This service follows a structured branch model (`devstaging → prod → main`) to ensure smooth CI/CD workflows. The `dev` branch supports active development with automatic deployments to the development environment, while `staging` and `prod` require PR-based promotions with CI gates and approvals. The `main` branch serves as the system of record for platform metadata and workflow files.
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 through OpenTelemetry instrumentation and Prometheus metrics, with dashboards available in Grafana.
## Repository ## Repository
@@ -34,15 +34,16 @@ Sonar Test Nest4 is built using the `typescript-nestjs` runtime and deployed as
- **Runtime**: TypeScript with NestJS framework. - **Runtime**: TypeScript with NestJS framework.
- **Container Port**: `3000`. - **Container Port**: `3000`.
- **Health Check Endpoint**: `/health`. - **Endpoints**:
- **Metrics Endpoint**: `/metrics` (Prometheus format). - `/health`: Health check endpoint returning `{"status":"UP"}`.
- **Image Repository**: Azure Container Registry (`bstagecjotdevacr`). - `/metrics`: Prometheus metrics exposition.
- `/api/items`: RESTful API 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: The service is integrated with observability tools such as Grafana and Prometheus, ensuring robust monitoring and alerting capabilities.
- `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.
## Configuration ## Configuration
@@ -54,21 +55,27 @@ Promotions between environments (`dev`, `staging`, `prod`) are triggered through
## Operations ## 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. 1. Push changes to the `dev` branch for automatic deployment to the development environment.
- **staging**: Pre-production environment; changes are promoted from `dev` via PR with CI gate and approval. 2. Open a PR for promotion to `staging` or `prod`. Ensure CI tests pass and obtain one approval.
- **prod**: Production environment; changes are promoted from `staging` via PR with CI gate and approval. 3. Merge PR to promote the service to the target environment.
- **main**: System of record; receives merges from `prod` after releases. 4. Use Backstage CI/CD tab for environment promotions.
Deployment workflows are runtime-agnostic and rely on `.platform/config.yaml` for configuration. ### Branch Model
| Branch | Purpose |
|---|---|
| dev | Active development with automatic deployments. |
| staging | Pre-production environment, promoted from `dev`. |
| prod | Production environment, promoted from `staging`. |
| main | System of record for platform metadata and workflow files. |
## Observability ## 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. - [Grafana Dashboard](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4)
- Prometheus metrics exposed at `/metrics`. - Prometheus metrics available at `/metrics`.
- Health check endpoint at `/health`.
## Dependencies ## Dependencies
_No declared dependencies._ - api:default/sonar-test-nest4-api