Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
08d4256
готовая лр
razzzenya Feb 16, 2026
59cb056
фикс проблемы с CORS
razzzenya Feb 16, 2026
7867a56
обновил README
razzzenya Feb 18, 2026
af07609
Добавил скрины к README
razzzenya Feb 18, 2026
c496c33
правки по коду
razzzenya Feb 18, 2026
ab4a3a3
Фикс версий проекта
razzzenya Feb 18, 2026
edf7c15
правки
razzzenya Feb 19, 2026
9c915c1
правки версий
razzzenya Feb 19, 2026
4b76f33
Merge branch 'main' into main
razzzenya Feb 19, 2026
2a542d6
вернул base address
razzzenya Feb 19, 2026
3737e0c
обернул метод сервиса в try-catch
razzzenya Feb 19, 2026
cfde70f
лр 2
razzzenya Mar 3, 2026
db06212
правки
razzzenya Mar 3, 2026
a4d969e
обновил README.md
razzzenya Mar 3, 2026
b199d1c
Update README.md
razzzenya Mar 3, 2026
6998c3d
фикс балансировщика
razzzenya Mar 3, 2026
5235fc0
фикс ошибок работы балансировщика
razzzenya Mar 3, 2026
201a3f7
code cleanup
razzzenya Mar 3, 2026
6e6c406
поправил код
razzzenya Mar 4, 2026
be00daf
исправил логику балансировщика
razzzenya Mar 4, 2026
892fe8b
Убрал лишние проверки
razzzenya Mar 4, 2026
82be54c
3-я л/р
razzzenya Mar 15, 2026
66e2778
добавил minio и тесты
razzzenya Mar 15, 2026
f24b8ee
обновил readme
razzzenya Mar 15, 2026
f0623b7
правки
razzzenya Mar 17, 2026
0cb9edc
code-cleanup + небольшой фикс тестов
razzzenya Mar 17, 2026
fd31cfb
http эндпоинты
razzzenya Mar 17, 2026
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -416,3 +416,12 @@ FodyWeavers.xsd
*.msix
*.msm
*.msp

# Docker volumes and data
minio-data/
localstack-data/
redis-data/

# Aspire generated files
*.dcproj.user
.aspire/
8 changes: 4 additions & 4 deletions Client.Wasm/Components/StudentCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
</CardHeader>
<CardBody>
<UnorderedList Unstyled>
<UnorderedListItem>Номер <Strong>№X "Название лабораторной"</Strong></UnorderedListItem>
<UnorderedListItem>Вариант <Strong>№Х "Название варианта"</Strong></UnorderedListItem>
<UnorderedListItem>Выполнена <Strong>Фамилией Именем 65ХХ</Strong> </UnorderedListItem>
<UnorderedListItem><Link To="https://puginarug.com/">Ссылка на форк</Link></UnorderedListItem>
<UnorderedListItem>Номер <Strong>№3 Интеграционное тестирование"</Strong></UnorderedListItem>
<UnorderedListItem>Вариант <Strong>№9 "Кредитная заявка"</Strong></UnorderedListItem>
<UnorderedListItem>Выполнена <Strong>Куненковым Иваном 6511</Strong> </UnorderedListItem>
<UnorderedListItem><Link To="https://github.com/razzzenya/cloud-development">Ссылка на форк</Link></UnorderedListItem>
</UnorderedList>
</CardBody>
</Card>
6 changes: 3 additions & 3 deletions Client.Wasm/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchBrowser": false,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5127",
"environmentVariables": {
Expand All @@ -22,7 +22,7 @@
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchBrowser": false,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7282;http://localhost:5127",
"environmentVariables": {
Expand All @@ -31,7 +31,7 @@
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchBrowser": false,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand Down
4 changes: 2 additions & 2 deletions Client.Wasm/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
}
},
"AllowedHosts": "*",
"BaseAddress": ""
}
"BaseAddress": "https://localhost:7138/api/credit"
}
45 changes: 43 additions & 2 deletions CloudDevelopment.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36811.4
VisualStudioVersion = 17.13.35931.197
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client.Wasm", "Client.Wasm\Client.Wasm.csproj", "{AE7EEA74-2FE0-136F-D797-854FD87E022A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApp.Api", "CreditApp.Api\CreditApp.Api.csproj", "{E7D4CA8B-53EA-9676-D96D-BE2F0CB11054}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApp.Domain", "CreditApp.Domain\CreditApp.Domain.csproj", "{CC5A9873-4CC3-4B71-83AF-E4FD09F7B1AD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApp.ServiceDefaults", "CreditApp.ServiceDefaults\CreditApp.ServiceDefaults.csproj", "{B2C3D4E5-F6A7-8901-BCDE-F12345678901}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApp.AppHost", "CreditApp.AppHost\CreditApp.AppHost.csproj", "{2A5FB573-9376-4FEB-9289-A8387F435C13}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApp.ApiGateway", "CreditApp.ApiGateway\CreditApp.ApiGateway.csproj", "{7F3E754C-DA95-9AEF-13A7-05AEE66771F8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApp.FileService", "CreditApp.FileService\CreditApp.FileService.csproj", "{9FB93C0A-039C-9B30-1599-38D087B50EBF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApp.Test", "CreditApp.Test\CreditApp.Test.csproj", "{F0BEC607-3BB6-43E6-BB44-C887447F7DCE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +28,34 @@ Global
{AE7EEA74-2FE0-136F-D797-854FD87E022A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE7EEA74-2FE0-136F-D797-854FD87E022A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE7EEA74-2FE0-136F-D797-854FD87E022A}.Release|Any CPU.Build.0 = Release|Any CPU
{E7D4CA8B-53EA-9676-D96D-BE2F0CB11054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7D4CA8B-53EA-9676-D96D-BE2F0CB11054}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7D4CA8B-53EA-9676-D96D-BE2F0CB11054}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7D4CA8B-53EA-9676-D96D-BE2F0CB11054}.Release|Any CPU.Build.0 = Release|Any CPU
{CC5A9873-4CC3-4B71-83AF-E4FD09F7B1AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC5A9873-4CC3-4B71-83AF-E4FD09F7B1AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC5A9873-4CC3-4B71-83AF-E4FD09F7B1AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC5A9873-4CC3-4B71-83AF-E4FD09F7B1AD}.Release|Any CPU.Build.0 = Release|Any CPU
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.Build.0 = Release|Any CPU
{2A5FB573-9376-4FEB-9289-A8387F435C13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A5FB573-9376-4FEB-9289-A8387F435C13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A5FB573-9376-4FEB-9289-A8387F435C13}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A5FB573-9376-4FEB-9289-A8387F435C13}.Release|Any CPU.Build.0 = Release|Any CPU
{7F3E754C-DA95-9AEF-13A7-05AEE66771F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F3E754C-DA95-9AEF-13A7-05AEE66771F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F3E754C-DA95-9AEF-13A7-05AEE66771F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F3E754C-DA95-9AEF-13A7-05AEE66771F8}.Release|Any CPU.Build.0 = Release|Any CPU
{9FB93C0A-039C-9B30-1599-38D087B50EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FB93C0A-039C-9B30-1599-38D087B50EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FB93C0A-039C-9B30-1599-38D087B50EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FB93C0A-039C-9B30-1599-38D087B50EBF}.Release|Any CPU.Build.0 = Release|Any CPU
{F0BEC607-3BB6-43E6-BB44-C887447F7DCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0BEC607-3BB6-43E6-BB44-C887447F7DCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0BEC607-3BB6-43E6-BB44-C887447F7DCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0BEC607-3BB6-43E6-BB44-C887447F7DCE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
26 changes: 26 additions & 0 deletions CreditApp.Api/Controllers/CreditController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using CreditApp.Api.Services.CreditApplicationService;
using CreditApp.Domain.Entities;
using Microsoft.AspNetCore.Mvc;

namespace CreditApp.Api.Controllers;

[Route("api/[controller]")]
[ApiController]
public class CreditController(CreditApplicationService applicationService, ILogger<CreditController> logger) : ControllerBase
{
/// <summary>
/// Получить кредитную заявку по ID, если не найдена в кэше генерируем новую
/// </summary>
/// <param name="id">ID кредитной заявки</param>
/// <param name="cancellationToken">Токен отмены операции</param>
/// <returns>Кредитная заявка</returns>
[HttpGet]
public async Task<ActionResult<CreditApplication>> GetById([FromQuery] int id, CancellationToken cancellationToken)
{
logger.LogInformation("Получен запрос на получение/генерацию заявки {Id}", id);

var application = await applicationService.GetByIdAsync(id, cancellationToken);

return Ok(application);
}
}
25 changes: 25 additions & 0 deletions CreditApp.Api/CreditApp.Api.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.StackExchange.Redis.DistributedCaching" Version="9.5.2" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.3.25" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="4.0.2.19" />
<PackageReference Include="Bogus" Version="35.6.5" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.24" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CreditApp.Domain\CreditApp.Domain.csproj" />
<ProjectReference Include="..\CreditApp.ServiceDefaults\CreditApp.ServiceDefaults.csproj" />
</ItemGroup>

</Project>
83 changes: 83 additions & 0 deletions CreditApp.Api/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
using Amazon.SimpleNotificationService;
using CreditApp.Api.Services.CreditApplicationService;
using CreditApp.Api.Services.SnsPublisher;
using CreditApp.ServiceDefaults;

var builder = WebApplication.CreateBuilder(args);

builder.AddServiceDefaults();

builder.AddRedisDistributedCache("cache");

var awsOptions = new Amazon.Extensions.NETCore.Setup.AWSOptions
{
DefaultClientConfig =
{
ServiceURL = builder.Configuration["AWS:ServiceURL"]
}
};

builder.Services.AddDefaultAWSOptions(awsOptions);
builder.Services.AddAWSService<IAmazonSimpleNotificationService>();

builder.Services.AddScoped<SnsPublisherService>();

builder.Services.AddCors(options =>
{
options.AddPolicy("AllowBlazorWasm", policy =>
{
policy.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader();
});
});

builder.Services.AddHttpClient();

builder.Services.AddHttpClient("creditapp-fileservice", client =>
{
client.BaseAddress = new Uri("http://creditapp-fileservice");
}).AddServiceDiscovery();

builder.Services.AddScoped<CreditApplicationGenerator>();
builder.Services.AddScoped<CreditApplicationCacheService>();
builder.Services.AddScoped<CreditApplicationStorageService>();
builder.Services.AddScoped<CreditApplicationService>();

builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new Microsoft.OpenApi.OpenApiInfo
{
Title = "CreditApp API"
});

var xmlFilename = $"{System.Reflection.Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFilename);
if (File.Exists(xmlPath))
{
options.IncludeXmlComments(xmlPath);
}

var domainXmlPath = Path.Combine(AppContext.BaseDirectory, "CreditApp.Domain.xml");
if (File.Exists(domainXmlPath))
{
options.IncludeXmlComments(domainXmlPath);
}
});

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();
app.UseCors("AllowBlazorWasm");
app.MapControllers();
app.MapDefaultEndpoints();

app.Run();
41 changes: 41 additions & 0 deletions CreditApp.Api/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:46825",
"sslPort": 44333
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5179",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7170;http://localhost:5179",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Loading