1.4 KiB
1.4 KiB
Clarity — Copilot Instructions
What is Clarity?
Clarity is the tenant-facing product in ClarityStack. Each tenant gets their own isolated Clarity instance, provisioned and managed by OPC (the ControlPlane).
Projects
| Project | Role |
|---|---|
Clarity.AppHost |
.NET Aspire host — owns Postgres, Keycloak, Redis, MinIO, frontend |
Clarity.Server |
REST API — main backend, EF Core, Keycloak auth, MinIO, Redis output caching |
Clarity.MigrationService |
Worker that runs EF Core migrations on startup before the server starts |
Clarity.ServiceDefaults |
Shared Aspire service defaults (OTel, resilience, service discovery) |
Aspire-owned Infrastructure
postgreson port5432— databases:postgresdb,authdb(Keycloak)- Keycloak on port
8080with realm imported fromKeycloakConfig/ - Redis cache
- MinIO object storage
- Vite React frontend at
../frontend
Auth
- Keycloak is the identity provider — realm per tenant in production,
clarityrealm in dev Clarity.ServerusesAspire.Keycloak.Authentication
Conventions
- Commit format:
OPC # XXXX: Description - Target framework: .NET 10
- Nullable and ImplicitUsings enabled globally via root
Directory.Build.props - Central package management via root
Directory.Packages.props - EF Core migrations are handled by
Clarity.MigrationService, not inline in the server - Frontend is a Vite React app at
Clarity/frontend/