CleanArchitecture.Template
7 subscribers
1 photo
2 links
Communication channel for CleanArchitecture.Template

https://github.com/Annaklychev/CleanArchitecture.Template
Download Telegram
Please open Telegram to view this post
VIEW IN TELEGRAM
Channel photo updated
A unified Git workflow for developers.
Working on issues through separate branches
The main working branch is "develop"
The branch name is associated with the issue (e.g., feature/1234). All changes to the issue—code, tests, configurations, migrations—should be committed to this branch.
Do not develop directly in develop or main.
Before pushing, you must merge with develop and resolve any conflicts, if any.
Verify that everything builds and tests pass.
A unified Git workflow for developers.
Working on issues through separate branches
The main working branch is "develop"
The branch name is associated with the issue (e.g., feature/1234). All changes to the issue—code, tests, configurations, migrations—should be committed to this branch.
Do not develop directly in develop or main.
Before pushing, you must merge with develop and resolve any conflicts, if any.
Verify that everything builds and tests pass.
It would be advisable to let me know what you plan to work on before starting work. @Annaklychev

Repository: https://github.com/Annaklychev/CleanArchitecture.Template
CleanArchitecture.Template pinned «A unified Git workflow for developers. Working on issues through separate branches The main working branch is "develop" The branch name is associated with the issue (e.g., feature/1234). All changes to the issue—code, tests, configurations, migrations—should…»
ID: FT-1
#Task
Set up CI to run tests automatically

Configure Continuous Integration (CI) so that all unit and integration tests run automatically on every pull request. Ensure that the CI pipeline fails on test failures and provides clear feedback to developers.

Priority: High

Status: Done

Assignee: @Mr_Ravshanbekk
ID: FT-2
#Task
Set up infrastructure for Redis and Kafka

Provision Redis and Kafka services for development and testing environments. Ensure they are configured according to best practices and are ready for integration with the application. Include basic connection tests and documentation for developers.

Priority: High

Status: 📉 In Progress

Assignee: @Mr_Ravshanbekk, @kapilkaushall
ID: FT-3
#Task
Configure Docker and Docker Compose

Set up Docker and Docker Compose to provide a reproducible development environment. Tasks include:
Create a single docker-compose.yml with:
- Postgres (for EF Core)
- Redis
- Kafka
- Enable environment variables via a .env file.
- Configure HealthChecks for all services at this stage.
- Provide instructions for running the environment locally.

Priority: High

Status: Done

Assignee: @kapilkaushall
Application is a use case orchestrator.
#Note
It answers the question: "What does the system do?", not "How" or "Where is it stored?"

Application owns the contracts. Infrastructure/Backend adapts to them.
Domain = Enterprise Business Rules
#Note
Domain:
Knows NOTHING about:
- UI
- Web / HTTP
- EF Core
- DB
- Kafka
- Redis
- Identity
- ASP.NET

Can live:
- in the console
- in tests
- in another application
- in 10 years

📌 If you throw out everything except the Domain, the business should still make sense.
I compiled a summary table that describes what the project CAN reference and what it SHOULD NOT
#Note
ID: FT-4
#Task
Implement a user fingerprint identification mechanism without violating Clean Architecture principles

Implement all necessary migrations in the Migrations project

Domain Task:
- Describe the fingerprint model
- Define invariants
- Formulate business rules

Application Task:
- Orchestration
- Validation
- Domain ↔️ Infrastructure Relationship
- Contracts live in the Application, implementation is below

Infrastructure Task:
- Contract implementation
- Integrations
- No business logic

Persistence Task:
- EF Core
- DbContext
- Entity configuration

WASM Task:
- Fingerprint collection
- Sending to the API

Priority: High

Status: 🟢 New

Assignee: @Annaklychev
ID: FT-5
#Task
Implement Multilingual Localization in Blazor Using Toolbelt.Blazor.I18nText
Implement a clean, scalable, and architecture-safe localization system in a Blazor application that:
▪️strictly follows Clean Architecture principles,
▪️keeps business logic language-agnostic,
▪️uses localization keys instead of texts across backend layers,
▪️performs localization only at the UI layer,
▪️allows easy addition of new languages without code changes.

Constraints
Domain and Application must not contain localized strings
API must not return localized messages
Only localization keys are allowed outside UI
Toolbelt.Blazor.I18nText is used exclusively in Blazor

Domain Layer — Localization Keys Only
Replace all user-facing messages in Domain with stable localization keys.
Requirements
No human-readable text in Domain
Errors must expose only a localization key
Keys must be stable and descriptive
Example
public static class DomainErrorKeys
{
public const string UserNotFound = "errors.user.not_found";
public const string InvalidPassword = "errors.auth.invalid_password";
}


Usage:

throw new DomainException(DomainErrorKeys.UserNotFound);


Application Layer — Propagate Keys Without Translation
Ensure localization keys and parameters flow through Application without interpretation.
Requirements
▪️Application does not translate messages
▪️Errors include code + parameters
▪️Support formatted messages
Example
public record AppError(string Code, object? Params = null);

return Result.Fail(new AppError(
DomainErrorKeys.InvalidPassword,
new { attempts = 3 }
));

Infrastructure / Persistence — No Localization
Ensure Infrastructure does not contain user-facing texts.
Requirements
▪️Logs only (English)
▪️No dependency on localization
▪️No UI-oriented messages

Blazor UI — Install Toolbelt.Blazor.I18nText
Install and configure the localization library.
builder.Services.AddI18nText(options =>
{
options.Assembly = typeof(Program).Assembly;
options.BaseName = "Resources";
options.SupportedCultures = new[]
{
new CultureInfo("en"),
new CultureInfo("ru")
};
});
await app.UseI18nTextAsync();

Blazor
└─ Resources
├─ en.json
└─ ru.json

Example en.json
{
"errors": {
"auth": {
"invalid_password": "Invalid password. Attempts left: {attempts}"
}
},
"buttons": {
"save": "Save"
}
}


Blazor UI — Usage in Components
Render localized strings using I18nText.
@inject I18nText I18n

<button>@I18n["buttons.save"]</button>
<button @onclick="() => I18n.SetCulture("en")">EN</button>
<button @onclick="() => I18n.SetCulture("ru")">RU</button>

The project gains:
▪️strict separation of concerns
▪️scalable multilingual support
▪️a clean error contract
▪️long-term maintainability

Priority: High

Status: 🟢 New

Assignee: @kapilkaushall