Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/agents/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## Стек

**Backend:** .NET 8, C#, Clean Architecture + CQRS, EF Core, PostgreSQL
**Backend:** .NET 11, C#, Clean Architecture + CQRS, EF Core, PostgreSQL
**Frontend:** React 18 + Vite + TypeScript + TailwindCSS, в `src/Trale/miniapp-src/`
**Тесты:** xUnit, builder-паттерн для test data (`tests/*/DSL/`)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start_new_app_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '11.0.x'

- name: Restore Nuget cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
dotnet-version: '11.0.x'

- name: Restore NuGet cache
uses: actions/cache@v4
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

TraleBot — Telegram mini-app for learning Georgian (ქართული). Прод бот: `@trale_bot`, лендинг: tralebot.com, локальный тест-бот: `@traletest_bot`.

Главный продукт — мини-апп внутри Telegram WebApp. Бэкенд .NET 10 отдаёт REST API + контент уроков, фронт — React-SPA в `src/Trale/wwwroot/`. Что учит пользователя: алфавит, числа, грамматика (падежи, послелоги, спряжение, аорист, имперфект, условия), тематический словарь (кафе, шопинг, такси и т.д.), личный словарь с квизами.
Главный продукт — мини-апп внутри Telegram WebApp. Бэкенд .NET 11 отдаёт REST API + контент уроков, фронт — React-SPA в `src/Trale/wwwroot/`. Что учит пользователя: алфавит, числа, грамматика (падежи, послелоги, спряжение, аорист, имперфект, условия), тематический словарь (кафе, шопинг, такси и т.д.), личный словарь с квизами.

Монетизация — Telegram Stars (XTR), pay-once Pro. 6 launch-модулей бесплатны, остальные за Pro. Без hearts/lives и без gating контента (после оплаты — всё доступно).

## Architecture

.NET 10 / C# / Clean Architecture, слои:
.NET 11 / C# / Clean Architecture, слои:

- **Domain** (`src/Domain/`) — сущности и доменная логика
- **Application** (`src/Application/`) — use cases, команды/запросы (CQRS, миграция от MediatR к services по ARCHITECTURE.md)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ COPY src/Trale/Lessons/ /build/src/Trale/Lessons/
RUN npm run build

# Stage 2: build the .NET solution, pulling in the freshly built static assets
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
WORKDIR /app
COPY . ./
COPY /src/Trale/appsettings.json .
Expand All @@ -33,7 +33,7 @@ COPY src/Trale/audio ./src/Trale/wwwroot/audio
RUN dotnet publish src/Trale/Trale.csproj -c Release -o output

# Stage 3: runtime — ASP.NET Core serves the API + the SPA bundle from wwwroot
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS runtime
WORKDIR /app
COPY --from=build /app/output .
EXPOSE 1402
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## Стек

- **Backend:** .NET 10, C#, Clean Architecture (Domain / Application / Infrastructure / Persistence / Trale Web API), EF Core, PostgreSQL.
- **Backend:** .NET 11, C#, Clean Architecture (Domain / Application / Infrastructure / Persistence / Trale Web API), EF Core, PostgreSQL.
- **Mini-app:** React 18 + Vite + TypeScript + Tailwind, в `src/Trale/miniapp-src/`. Сборка статики в `src/Trale/wwwroot/`.
- **Тесты:** xUnit (unit + integration с Testcontainers/Postgres), Playwright (E2E мини-аппа), vitest + @testing-library/react (компоненты).
- **TTS:** Piper (локальный нейросетевой грузинский голос ka_GE-natia-medium).
Expand Down
4 changes: 2 additions & 2 deletions deploy/agents/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ RUN apt-get update && apt-get install -y \
ENV TZ=Asia/Tbilisi
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# --- .NET 10 SDK (official Microsoft packages) ---------------------------------
# --- .NET 11 SDK (official Microsoft packages) ---------------------------------
# Needed so: (a) developer/qa agents can actually run `dotnet test` (previously
# silently failed — no SDK in image), (b) the dotnet/skills LSP server
# (roslyn-language-server) is usable by the developer/tech-lead/qa agents.
RUN curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o /tmp/packages-microsoft-prod.deb \
&& dpkg -i /tmp/packages-microsoft-prod.deb \
&& rm /tmp/packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y dotnet-sdk-10.0 \
&& apt-get install -y dotnet-sdk-11.0 \
&& rm -rf /var/lib/apt/lists/*

# Install Claude Code CLI
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Application.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Application</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MediatR" Version="12.3.0" />
<PackageReference Include="MediatR" Version="12.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.25" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Domain</RootNamespace>
Expand Down
35 changes: 18 additions & 17 deletions src/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Infrastructure</RootNamespace>
Expand All @@ -12,29 +12,30 @@
<PackageReference Include="Google.Cloud.Translation.V2" Version="3.5.0" />
<PackageReference Include="Hangfire.NetCore" Version="1.8.25" />
<PackageReference Include="Hangfire.PostgreSql" Version="1.21.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.3.9" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.3.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.25">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.12" />
<PackageReference Include="OpenAI" Version="2.14.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="11.0.0" />
<PackageReference Include="OpenAI" Version="2.15.0" />
<!-- Translation agent pipeline (Application/Translation/Pipeline): Microsoft Agent Framework over IChatClient. -->
<PackageReference Include="Microsoft.Agents.AI" Version="1.23.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.10.1" />
<PackageReference Include="Microsoft.Agents.AI" Version="1.28.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="11.0.0" />
<!-- OpenTelemetry.* is capped at 1.17.0: the Prometheus exporter has no stable release, and with
OpenTelemetry 1.18+ the 1.7.0-rc.1 exporter answers /metrics with an empty body. Move them together. -->
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.7.0-rc.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.15.3" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.15.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.15.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.15.0" />
<PackageReference Include="Prometheus.Client" Version="5.2.0" />
<PackageReference Include="Prometheus.Client.AspNetCore" Version="5.0.0" />
<PackageReference Include="Prometheus.Client.HttpRequestDurations" Version="3.6.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.17.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.17.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.17.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.17.0" />
<PackageReference Include="Prometheus.Client" Version="6.3.0" />
<PackageReference Include="Prometheus.Client.AspNetCore" Version="6.0.0" />
<PackageReference Include="Prometheus.Client.HttpRequestDurations" Version="4.1.0" />
<PackageReference Include="Telegram.Bot" Version="19.0.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.12.4" />
<!-- Security pin: overrides transitive 8.0.2 pulled via Microsoft.AspNetCore.Authentication (CVE-2026-33116, CVE-2026-26171) -->
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.3" />
<PackageReference Include="HtmlAgilityPack" Version="1.13.1" />
<!-- Security pin: overrides transitive 8.0.x pulled via Microsoft.AspNetCore.Authentication (CVE-2026-33116, CVE-2026-26171) -->
<PackageReference Include="System.Security.Cryptography.Xml" Version="11.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions src/Persistence/Persistence.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Persistence</RootNamespace>
Expand All @@ -18,11 +18,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.25" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
</ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/Trale/Trale.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<RootNamespace>Trale</RootNamespace>
<LangVersion>14</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.25">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="11.0.0" />
<PackageReference Include="NEST" Version="7.17.5" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Serilog.Sinks.Grafana.Loki" Version="8.3.2" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="Serilog.Sinks.Grafana.Loki" Version="9.0.2" />
<PackageReference Include="Serilog.Sinks.Loki" Version="3.0.0" />
<PackageReference Include="Telegram.Bot" Version="19.0.0" />
</ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions tests/Application.UnitTests/Application.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -12,11 +12,11 @@

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.25" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NUnit" Version="4.5.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.12.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.11.1" />
<PackageReference Include="Moq" Version="4.21.0" />
<PackageReference Include="NUnit" Version="5.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.1" />
<PackageReference Include="NUnit.Analyzers" Version="4.15.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions tests/Domain.UnitTests/Domain.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NUnit" Version="4.5.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.12.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.11.1" />
<PackageReference Include="NUnit" Version="5.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.1" />
<PackageReference Include="NUnit.Analyzers" Version="4.15.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
12 changes: 6 additions & 6 deletions tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -11,11 +11,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NUnit" Version="4.5.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.12.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.11.1" />
<PackageReference Include="Moq" Version="4.21.0" />
<PackageReference Include="NUnit" Version="5.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.1" />
<PackageReference Include="NUnit.Analyzers" Version="4.15.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
20 changes: 10 additions & 10 deletions tests/IntegrationTests/IntegrationTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -11,18 +11,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.25" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.25" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NUnit" Version="4.5.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.12.0">
<PackageReference Include="FluentAssertions" Version="7.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="11.0.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="11.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.11.1" />
<PackageReference Include="NUnit" Version="5.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.1" />
<PackageReference Include="NUnit.Analyzers" Version="4.15.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Testcontainers" Version="3.10.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="3.10.0" />
<PackageReference Include="Testcontainers" Version="4.16.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="4.16.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions tests/IntegrationTests/TestDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ private static async Task<PostgreSqlContainer> StartContainer()
// Fixtures run side by side, each with its own application, connection pool and Hangfire workers,
// hence far more connections than the default 100. fsync is off: a test database never has to
// survive a crash, and the data lives in memory, so the run touches no disk at all.
var container = new PostgreSqlBuilder()
var container = new PostgreSqlBuilder("postgres:16.1")
.WithAutoRemove(true)
.WithImage("postgres:16.1")
.WithTmpfsMount("/var/lib/postgresql/data")
.WithCommand("-c", "max_connections=1000", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off")
.Build();
Expand Down
Loading