+
Skip to content

timdeschryver/Sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET and Angular Sandbox

Open in GitHub Codespaces

Some buzzwords that are used:

graph TD
    User["Browser (User)"] --> Gateway

    subgraph "External Facing Components"
        Gateway["API Gateway (YARP)<br>Sandbox.Gateway"]
        Keycloak["Keycloak<br>Authentication Provider"]
    end

    subgraph "Internal Components"
        AngularApp["Angular Frontend<br>Sandbox.AngularWorkspace"]
        ApiService["API Service<br>Sandbox.ApiService<br>"]
        SqlDatabase["SQL Server Database"]
        DbMigrations["Database Migrations<br>Sandbox.ApiService.Migrations"]

        Gateway --> AngularApp
        Gateway --> ApiService
        ApiService --> SqlDatabase
        SqlDatabase -.-o DbMigrations
        Gateway -.-> Keycloak
    end

    subgraph "Monitoring"
        OpenTelemetry["OpenTelemetry Collector<br>Metrics, Traces, Logs"]
        Gateway -.-> OpenTelemetry
        AngularApp -.-> OpenTelemetry
        ApiService -.-> OpenTelemetry
        SqlDatabase -.-> OpenTelemetry
    end

    classDef externalFacing fill:#f96,stroke:#333,stroke-width:3px,stroke-dasharray: 5 5;
    classDef gateway fill:#f9f,stroke:#333,stroke-width:2px;
    classDef frontend fill:#bbf,stroke:#333,stroke-width:1px;
    classDef backend fill:#bfb,stroke:#333,stroke-width:1px;
    classDef database fill:#fbb,stroke:#333,stroke-width:1px;
    classDef secrets fill:#9cf,stroke:#333,stroke-width:1px;
    classDef auth fill:#f99,stroke:#333,stroke-width:1px;
    classDef monitoring fill:#ffd,stroke:#333,stroke-width:1px;

    class Gateway gateway,externalFacing;
    class Keycloak auth,externalFacing;
    class AngularApp frontend;
    class ApiService backend;
    class SqlDatabase,DbMigrations database;
    class OpenTelemetry monitoring;
Loading

Prerequisites

Secret Management with SOPS

The project uses SOPS (Secrets Operations) to encrypt sensitive configuration values:

  • Encrypted Configuration: appsettings.encrypted.json files contain encrypted secrets
  • Selective Encryption: Only fields matching secret patterns (Secret, Password, Key, Token) are encrypted
  • Development Friendly: Non-sensitive configuration remains in plain text for easy reading

SOPS Quick Start

$env:SOPS_AGE_KEY_FILE = "./config/sops/age/keys.txt"
sops --decrypt "config/appsettings.encrypted.json" > "Sandbox.AppHost/appsettings.json"
sops --encrypt "Sandbox.AppHost/appsettings.json" > "config/appsettings.encrypted.json"

Run the project locally

Clone the project and run the dotnet run command in the root folder to start the project.

dotnet run --project ./Sandbox.AppHost

Result

Aspire dashboard

The .NET Aspire dashboard provides a comprehensive view of all running services, their health status, and resource utilization in the development environment.

.NET Aspire dashboard showing running services including API Gateway, Angular app, API service, SQL Server database, and Keycloak authentication provider with their respective health statuses and resource metrics

Grafana Stack with OpenTelemetry data

The monitoring stack uses Grafana to visualize OpenTelemetry data collected from all services, providing insights into application performance, logs, traces, and health metrics.

Grafana dashboard displaying application metrics and performance data collected via OpenTelemetry, showing service response times, request rates, and system resource utilization

Grafana Loki logs interface showing structured application logs from all services with filtering and search capabilities for debugging and monitoring

Grafana Tempo distributed tracing view displaying request traces across microservices, showing the complete request flow from gateway through API services to database

Application health monitoring dashboard showing the status of all services, endpoints, and dependencies with visual indicators for system health

Authentication using Keycloak

Keycloak serves as the identity and access management solution, providing secure authentication and authorization for the application.

Keycloak admin console interface showing user management, realm settings, and authentication configuration for the Sandbox application

OpenAPI Specification with Scalar

Scalar provides an interactive API documentation interface generated from the OpenAPI specification, allowing developers to explore and test API endpoints.

Scalar API documentation interface displaying the Sandbox API endpoints with interactive request/response examples, authentication requirements, and detailed parameter documentation

Deploy to Azure

To deploy the project, make sure you have an Azure subscription and azd installed.

Then, run the following commands to provision the resources and deploy the project:

azd init
azd up

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载