From 6d2c46d9710ba9a65189828d457c9347fdef62b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Sat, 11 Oct 2025 11:33:46 +0200 Subject: [PATCH] App name refactor --- .../BimAI.API.csproj | 52 +++---- BimAI.API/BimAI.API.http | 6 + .../Controllers/AuthController.cs | 6 +- .../Controllers/ProductsController.cs | 13 +- .../Controllers/SyncController.cs | 4 +- {Bimix.API => BimAI.API}/Program.cs | 140 +++++++++--------- .../Properties/launchSettings.json | 26 ++-- .../Services/GoogleAuthService.cs | 14 +- .../Services/JwtTokenService.cs | 7 +- BimAI.API/appsettings.Development.json | 27 ++++ {Bimix.UI.Web => BimAI.API}/appsettings.json | 0 .../BimAI.Application.csproj | 26 ++-- .../DTOModels/AuthDto.cs | 2 +- .../DTOModels/Common/PagedResult.cs | 2 +- .../DTOModels/ProductDto.cs | 2 +- .../BimAI.Domain.csproj | 18 +-- .../Entities/BaseEntity.cs | 2 +- .../Entities/Product.cs | 2 +- .../Entities/SyncState.cs | 2 +- .../Entities/User.cs | 2 +- .../BimAI.Infrastructure.csproj | 46 +++--- .../Data/BimixDbContext.cs | 6 +- .../20250619185202_InitDatabase.Designer.cs | 8 +- .../Migrations/20250619185202_InitDatabase.cs | 2 +- .../20250623184943_AddSyncState.Designer.cs | 10 +- .../Migrations/20250623184943_AddSyncState.cs | 2 +- ...250623194653_ResizeProductName.Designer.cs | 10 +- .../20250623194653_ResizeProductName.cs | 2 +- ...50624193445_Products-NewFields.Designer.cs | 10 +- .../20250624193445_Products-NewFields.cs | 2 +- .../20250718162313_AddUsersTable.Designer.cs | 12 +- .../20250718162313_AddUsersTable.cs | 2 +- .../Migrations/BimixDbContextModelSnapshot.cs | 14 +- .../Sync/ProductSyncService.cs | 10 +- {Bimix.UI.Mobile => BimAI.UI.Mobile}/App.xaml | 0 .../App.xaml.cs | 2 +- .../BimAI.UI.Mobile.csproj | 31 +--- .../MainPage.xaml | 0 .../MainPage.xaml.cs | 2 +- .../MauiProgram.cs | 10 +- .../Properties/launchSettings.json | 0 .../Resources/AppIcon/appicon.svg | 0 .../Resources/AppIcon/appiconfg.svg | 0 .../Resources/Fonts/OpenSans-Regular.ttf | Bin .../Resources/Images/dotnet_bot.svg | 0 .../Resources/Raw/AboutAssets.txt | 0 .../Resources/Splash/splash.svg | 0 .../Services/ScannerService.cs | 4 +- .../appsettings.Development.json | 0 .../appsettings.json | 0 .../wwwroot/css/app.css | 0 .../wwwroot/index.html | 0 .../BimAI.UI.Shared.csproj | 60 ++++---- .../Components/AuthGuard.razor | 2 +- .../Components/Dashboard.razor | 0 .../Components/Index.razor | 0 .../Components/LoginCard.razor | 4 +- .../Components/NavMenu.razor | 0 .../Components/ProductListComponent.razor | 0 .../Components/ProductListComponent.razor.cs | 11 +- .../Components/Routes.razor | 0 .../EmptyLayout.razor | 0 .../Extensions/ServiceCollectionExtensions.cs | 4 +- .../Interfaces/IScannerService.cs | 2 +- .../MainLayout.razor | 2 +- .../Pages/LoginPage.razor | 2 +- .../Pages/ProductListPage.razor | 1 + .../Services/AuthService.cs | 2 +- .../Services/GoogleAuthConfig.cs | 2 +- .../Services/NoOpScannerService.cs | 4 +- .../Services/ProductService.cs | 6 +- .../_Imports.razor | 9 +- .../wwwroot/images/login-background.jpg | Bin .../wwwroot/js/auth.js | 16 +- .../BimAI.UI.Web.csproj | 2 +- .../Components/App.razor | 6 +- .../Components/Layout/MainLayout.razor | 0 .../Components/Layout/MainLayout.razor.css | 0 .../Components/Pages/Error.razor | 0 .../Components}/_Imports.razor | 22 +-- {Bimix.UI.Web => BimAI.UI.Web}/Program.cs | 10 +- .../Properties/launchSettings.json | 0 BimAI.UI.Web/appsettings.Development.json | 11 ++ {Bimix.API => BimAI.UI.Web}/appsettings.json | 18 +-- Bimix.sln => BimAI.sln | 116 +++++++-------- Bimix.API/Bimix.API.http | 6 - Bimix.API/appsettings.Development.json | Bin 903 -> 0 bytes Bimix.UI.Web/appsettings.Development.json | Bin 256 -> 0 bytes 88 files changed, 437 insertions(+), 419 deletions(-) rename Bimix.API/Bimix.API.csproj => BimAI.API/BimAI.API.csproj (86%) create mode 100644 BimAI.API/BimAI.API.http rename {Bimix.API => BimAI.API}/Controllers/AuthController.cs (96%) rename {Bimix.API => BimAI.API}/Controllers/ProductsController.cs (87%) rename {Bimix.API => BimAI.API}/Controllers/SyncController.cs (83%) rename {Bimix.API => BimAI.API}/Program.cs (89%) rename {Bimix.API => BimAI.API}/Properties/launchSettings.json (96%) rename {Bimix.API => BimAI.API}/Services/GoogleAuthService.cs (86%) rename {Bimix.API => BimAI.API}/Services/JwtTokenService.cs (98%) create mode 100644 BimAI.API/appsettings.Development.json rename {Bimix.UI.Web => BimAI.API}/appsettings.json (100%) rename Bimix.Application/Bimix.Application.csproj => BimAI.Application/BimAI.Application.csproj (76%) rename {Bimix.Application => BimAI.Application}/DTOModels/AuthDto.cs (92%) rename {Bimix.Application => BimAI.Application}/DTOModels/Common/PagedResult.cs (88%) rename {Bimix.Application => BimAI.Application}/DTOModels/ProductDto.cs (94%) rename Bimix.Domain/Bimix.Domain.csproj => BimAI.Domain/BimAI.Domain.csproj (95%) rename {Bimix.Domain => BimAI.Domain}/Entities/BaseEntity.cs (82%) rename {Bimix.Domain => BimAI.Domain}/Entities/Product.cs (86%) rename {Bimix.Domain => BimAI.Domain}/Entities/SyncState.cs (81%) rename {Bimix.Domain => BimAI.Domain}/Entities/User.cs (89%) rename Bimix.Infrastructure/Bimix.Infrastructure.csproj => BimAI.Infrastructure/BimAI.Infrastructure.csproj (82%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Data/BimixDbContext.cs (96%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250619185202_InitDatabase.Designer.cs (89%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250619185202_InitDatabase.cs (96%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250623184943_AddSyncState.Designer.cs (88%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250623184943_AddSyncState.cs (95%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250623194653_ResizeProductName.Designer.cs (88%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250623194653_ResizeProductName.cs (96%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250624193445_Products-NewFields.Designer.cs (90%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250624193445_Products-NewFields.cs (97%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250718162313_AddUsersTable.Designer.cs (93%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/20250718162313_AddUsersTable.cs (98%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Migrations/BimixDbContextModelSnapshot.cs (92%) rename {Bimix.Infrastructure => BimAI.Infrastructure}/Sync/ProductSyncService.cs (92%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/App.xaml (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/App.xaml.cs (84%) rename Bimix.UI.Mobile/Bimix.UI.Mobile.csproj => BimAI.UI.Mobile/BimAI.UI.Mobile.csproj (80%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/MainPage.xaml (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/MainPage.xaml.cs (79%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/MauiProgram.cs (91%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Properties/launchSettings.json (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Resources/AppIcon/appicon.svg (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Resources/AppIcon/appiconfg.svg (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Resources/Fonts/OpenSans-Regular.ttf (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Resources/Images/dotnet_bot.svg (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Resources/Raw/AboutAssets.txt (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Resources/Splash/splash.svg (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/Services/ScannerService.cs (98%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/appsettings.Development.json (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/appsettings.json (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/wwwroot/css/app.css (100%) rename {Bimix.UI.Mobile => BimAI.UI.Mobile}/wwwroot/index.html (100%) rename Bimix.UI.Shared/Bimix.UI.Shared.csproj => BimAI.UI.Shared/BimAI.UI.Shared.csproj (82%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/AuthGuard.razor (97%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/Dashboard.razor (100%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/Index.razor (100%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/LoginCard.razor (97%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/NavMenu.razor (100%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/ProductListComponent.razor (100%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/ProductListComponent.razor.cs (93%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Components/Routes.razor (100%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/EmptyLayout.razor (100%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Extensions/ServiceCollectionExtensions.cs (84%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Interfaces/IScannerService.cs (80%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/MainLayout.razor (97%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Pages/LoginPage.razor (93%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Pages/ProductListPage.razor (81%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Services/AuthService.cs (99%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Services/GoogleAuthConfig.cs (78%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Services/NoOpScannerService.cs (80%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/Services/ProductService.cs (92%) rename {Bimix.UI.Web/Components => BimAI.UI.Shared}/_Imports.razor (69%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/wwwroot/images/login-background.jpg (100%) rename {Bimix.UI.Shared => BimAI.UI.Shared}/wwwroot/js/auth.js (88%) rename Bimix.UI.Web/Bimix.UI.Web.csproj => BimAI.UI.Web/BimAI.UI.Web.csproj (84%) rename {Bimix.UI.Web => BimAI.UI.Web}/Components/App.razor (85%) rename {Bimix.UI.Web => BimAI.UI.Web}/Components/Layout/MainLayout.razor (100%) rename {Bimix.UI.Web => BimAI.UI.Web}/Components/Layout/MainLayout.razor.css (100%) rename {Bimix.UI.Web => BimAI.UI.Web}/Components/Pages/Error.razor (100%) rename {Bimix.UI.Shared => BimAI.UI.Web/Components}/_Imports.razor (76%) rename {Bimix.UI.Web => BimAI.UI.Web}/Program.cs (82%) rename {Bimix.UI.Web => BimAI.UI.Web}/Properties/launchSettings.json (100%) create mode 100644 BimAI.UI.Web/appsettings.Development.json rename {Bimix.API => BimAI.UI.Web}/appsettings.json (94%) rename Bimix.sln => BimAI.sln (76%) delete mode 100644 Bimix.API/Bimix.API.http delete mode 100644 Bimix.API/appsettings.Development.json delete mode 100644 Bimix.UI.Web/appsettings.Development.json diff --git a/Bimix.API/Bimix.API.csproj b/BimAI.API/BimAI.API.csproj similarity index 86% rename from Bimix.API/Bimix.API.csproj rename to BimAI.API/BimAI.API.csproj index e4972ba..2ac61ec 100644 --- a/Bimix.API/Bimix.API.csproj +++ b/BimAI.API/BimAI.API.csproj @@ -1,26 +1,26 @@ - - - - net8.0 - enable - enable - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - + + + + net8.0 + enable + enable + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + diff --git a/BimAI.API/BimAI.API.http b/BimAI.API/BimAI.API.http new file mode 100644 index 0000000..79ef21c --- /dev/null +++ b/BimAI.API/BimAI.API.http @@ -0,0 +1,6 @@ +@BimAI.API_HostAddress = http://localhost:5090 + +GET {{BimAI.API_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/Bimix.API/Controllers/AuthController.cs b/BimAI.API/Controllers/AuthController.cs similarity index 96% rename from Bimix.API/Controllers/AuthController.cs rename to BimAI.API/Controllers/AuthController.cs index 7ed1397..56a7ed4 100644 --- a/Bimix.API/Controllers/AuthController.cs +++ b/BimAI.API/Controllers/AuthController.cs @@ -1,10 +1,10 @@ using System.Security.Claims; -using Bimix.API.Services; -using Bimix.Application.DTOModels; +using BimAI.API.Services; +using BimAI.Application.DTOModels; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bimix.API.Controllers; +namespace BimAI.API.Controllers; public class AuthController( GoogleAuthService googleAuthService, diff --git a/Bimix.API/Controllers/ProductsController.cs b/BimAI.API/Controllers/ProductsController.cs similarity index 87% rename from Bimix.API/Controllers/ProductsController.cs rename to BimAI.API/Controllers/ProductsController.cs index eb8e48d..5d56bc5 100644 --- a/Bimix.API/Controllers/ProductsController.cs +++ b/BimAI.API/Controllers/ProductsController.cs @@ -1,17 +1,16 @@ -using Bimix.Application.DTOModels; -using Bimix.Application.DTOModels.Common; +using BimAI.Application.DTOModels; +using BimAI.Application.DTOModels.Common; +using BimAI.Infrastructure.Data; using Microsoft.AspNetCore.Mvc; -using Bimix.Infrastructure.Data; -using Bimix.Domain.Entities; using Microsoft.EntityFrameworkCore; -namespace Bimix.API.Controllers; +namespace BimAI.API.Controllers; [ApiController] [Route("api/[controller]")] -public class ProductsController(BimixDbContext context) : ControllerBase +public class ProductsController(BimAIDbContext context) : ControllerBase { - private readonly BimixDbContext _context = context; + private readonly BimAIDbContext _context = context; [HttpGet] public async Task>> GetProducts([FromQuery] ProductFilterRequest request) diff --git a/Bimix.API/Controllers/SyncController.cs b/BimAI.API/Controllers/SyncController.cs similarity index 83% rename from Bimix.API/Controllers/SyncController.cs rename to BimAI.API/Controllers/SyncController.cs index af13761..0c28598 100644 --- a/Bimix.API/Controllers/SyncController.cs +++ b/BimAI.API/Controllers/SyncController.cs @@ -1,7 +1,7 @@ -using Bimix.Infrastructure.Sync; +using BimAI.Infrastructure.Sync; using Microsoft.AspNetCore.Mvc; -namespace Bimix.API.Controllers; +namespace BimAI.API.Controllers; [ApiController] [Route("api/[controller]")] diff --git a/Bimix.API/Program.cs b/BimAI.API/Program.cs similarity index 89% rename from Bimix.API/Program.cs rename to BimAI.API/Program.cs index c614b8e..b0c7e75 100644 --- a/Bimix.API/Program.cs +++ b/BimAI.API/Program.cs @@ -1,71 +1,71 @@ -using System.Text; -using Bimix.API.Services; -using Bimix.Infrastructure.Data; -using Bimix.Infrastructure.Sync; -using Microsoft.EntityFrameworkCore; -using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.IdentityModel.Tokens; - - -var builder = WebApplication.CreateBuilder(args); - -var connectionString = builder.Configuration.GetConnectionString("DefaultConnection"); -builder.Services.AddDbContext(options => options.UseSqlServer(connectionString)); -builder.Services.AddScoped(); - -builder.Services.AddHttpClient(); -builder.Services.AddControllers(); -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); - -// Start auth section -var jwtSettings = builder.Configuration.GetSection("JwtSettings"); -var secretKey = jwtSettings["SecretKey"]; -var issuer = jwtSettings["Issuer"]; -var audience = jwtSettings["Audience"]; - -builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) - .AddJwtBearer(options => - { - options.TokenValidationParameters = new TokenValidationParameters - { - ValidateIssuer = true, - ValidateAudience = true, - ValidateLifetime = true, - ValidateIssuerSigningKey = true, - ValidIssuer = issuer, - ValidAudience = audience, - IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)), - ClockSkew = TimeSpan.Zero, - }; - }); -builder.Services.AddAuthentication(); - -builder.Services.AddScoped(); -builder.Services.AddScoped(); - -builder.Services.AddCors(options => -{ - options.AddPolicy("AllowAll", policy => - { - policy.AllowAnyOrigin() - .AllowAnyMethod() - .AllowAnyHeader(); - }); -}); -// End auth section - -var app = builder.Build(); - -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(); -} - -app.UseHttpsRedirection(); -app.UseCors("AllowAll"); -app.UseAuthorization(); -app.UseAuthorization(); -app.MapControllers(); +using System.Text; +using BimAI.API.Services; +using BimAI.Infrastructure.Data; +using BimAI.Infrastructure.Sync; +using Microsoft.EntityFrameworkCore; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.IdentityModel.Tokens; + + +var builder = WebApplication.CreateBuilder(args); + +var connectionString = builder.Configuration.GetConnectionString("DefaultConnection"); +builder.Services.AddDbContext(options => options.UseSqlServer(connectionString)); +builder.Services.AddScoped(); + +builder.Services.AddHttpClient(); +builder.Services.AddControllers(); +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +// Start auth section +var jwtSettings = builder.Configuration.GetSection("JwtSettings"); +var secretKey = jwtSettings["SecretKey"]; +var issuer = jwtSettings["Issuer"]; +var audience = jwtSettings["Audience"]; + +builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) + .AddJwtBearer(options => + { + options.TokenValidationParameters = new TokenValidationParameters + { + ValidateIssuer = true, + ValidateAudience = true, + ValidateLifetime = true, + ValidateIssuerSigningKey = true, + ValidIssuer = issuer, + ValidAudience = audience, + IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)), + ClockSkew = TimeSpan.Zero, + }; + }); +builder.Services.AddAuthentication(); + +builder.Services.AddScoped(); +builder.Services.AddScoped(); + +builder.Services.AddCors(options => +{ + options.AddPolicy("AllowAll", policy => + { + policy.AllowAnyOrigin() + .AllowAnyMethod() + .AllowAnyHeader(); + }); +}); +// End auth section + +var app = builder.Build(); + +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseHttpsRedirection(); +app.UseCors("AllowAll"); +app.UseAuthorization(); +app.UseAuthorization(); +app.MapControllers(); app.Run(); \ No newline at end of file diff --git a/Bimix.API/Properties/launchSettings.json b/BimAI.API/Properties/launchSettings.json similarity index 96% rename from Bimix.API/Properties/launchSettings.json rename to BimAI.API/Properties/launchSettings.json index 6fe39d5..59e80da 100644 --- a/Bimix.API/Properties/launchSettings.json +++ b/BimAI.API/Properties/launchSettings.json @@ -1,14 +1,14 @@ -{ - "profiles": { - "dev": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "http://localhost:7142;http://0.0.0.0:7142", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } +{ + "profiles": { + "dev": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:7142;http://0.0.0.0:7142", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } } \ No newline at end of file diff --git a/Bimix.API/Services/GoogleAuthService.cs b/BimAI.API/Services/GoogleAuthService.cs similarity index 86% rename from Bimix.API/Services/GoogleAuthService.cs rename to BimAI.API/Services/GoogleAuthService.cs index 8ca694d..c19e2a4 100644 --- a/Bimix.API/Services/GoogleAuthService.cs +++ b/BimAI.API/Services/GoogleAuthService.cs @@ -1,13 +1,13 @@ -using Bimix.Domain.Entities; -using Bimix.Infrastructure.Data; +using BimAI.Domain.Entities; +using BimAI.Infrastructure.Data; using Google.Apis.Auth; using Microsoft.EntityFrameworkCore; -namespace Bimix.API.Services; +namespace BimAI.API.Services; -public class GoogleAuthService(BimixDbContext context, IConfiguration configuration, ILogger logger) +public class GoogleAuthService(BimAIDbContext context, IConfiguration configuration, ILogger logger) { - private readonly BimixDbContext _context = context; + private readonly BimAIDbContext _context = context; private readonly IConfiguration _configuration = configuration; private readonly ILogger _logger = logger; @@ -35,8 +35,8 @@ public class GoogleAuthService(BimixDbContext context, IConfiguration configurat if (user == null) { - _logger.LogError("User not found in Bimix database: {Email}", payload.Email); - return (false, null, "User not found in Bimix database"); + _logger.LogError("User not found in BimAI database: {Email}", payload.Email); + return (false, null, "User not found in BimAI database"); } if (!user.IsActive) diff --git a/Bimix.API/Services/JwtTokenService.cs b/BimAI.API/Services/JwtTokenService.cs similarity index 98% rename from Bimix.API/Services/JwtTokenService.cs rename to BimAI.API/Services/JwtTokenService.cs index f37cfda..09d1b4b 100644 --- a/Bimix.API/Services/JwtTokenService.cs +++ b/BimAI.API/Services/JwtTokenService.cs @@ -1,11 +1,10 @@ -using Microsoft.IdentityModel.Tokens; using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using System.Text; -using Bimix.Domain.Entities; +using BimAI.Domain.Entities; +using Microsoft.IdentityModel.Tokens; - -namespace Bimix.API.Services; +namespace BimAI.API.Services; public class JwtTokenService(IConfiguration configuration, ILogger logger) { diff --git a/BimAI.API/appsettings.Development.json b/BimAI.API/appsettings.Development.json new file mode 100644 index 0000000..dcec6fb --- /dev/null +++ b/BimAI.API/appsettings.Development.json @@ -0,0 +1,27 @@ +{ + "AllowedHosts": "*", + "ConnectionStrings": { + "DefaultConnection": "Server=localhost,1433;Database=bimai;User Id=sa;Password=9832&^*&huihj;TrustServerCertificate=True;" + }, + "E5_CRM": { + "ApiKey": "7e50a8a5-f01f-4fbc-8c1b-59f3fc474bb5" + }, + "GoogleAuth": { + "ClientId": "1037727384847-t1l2au6du34kdckamro81guklk17cjah.apps.googleusercontent.com" + }, + "JwtSettings": { + "SecretKey": "BimAISuperSecretKeyThatMustBeAtLeast32CharactersLong123456789", + "Issuer": "BimAI.API", + "Audience": "BimAI.Clients", + "ExpiryDays": 7 + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Microsoft.EntityFrameworkCore": "Warning", + "Microsoft.EntityFrameworkCore.Database.Command": "Warning", + "Microsoft.EntityFrameworkCore.Infrastructure": "Warning" + } + } +} diff --git a/Bimix.UI.Web/appsettings.json b/BimAI.API/appsettings.json similarity index 100% rename from Bimix.UI.Web/appsettings.json rename to BimAI.API/appsettings.json diff --git a/Bimix.Application/Bimix.Application.csproj b/BimAI.Application/BimAI.Application.csproj similarity index 76% rename from Bimix.Application/Bimix.Application.csproj rename to BimAI.Application/BimAI.Application.csproj index e6b0ca9..e16c50a 100644 --- a/Bimix.Application/Bimix.Application.csproj +++ b/BimAI.Application/BimAI.Application.csproj @@ -1,13 +1,13 @@ - - - - - - - - net8.0 - enable - enable - - - + + + + + + + + net8.0 + enable + enable + + + diff --git a/Bimix.Application/DTOModels/AuthDto.cs b/BimAI.Application/DTOModels/AuthDto.cs similarity index 92% rename from Bimix.Application/DTOModels/AuthDto.cs rename to BimAI.Application/DTOModels/AuthDto.cs index a150a9c..81f1bf4 100644 --- a/Bimix.Application/DTOModels/AuthDto.cs +++ b/BimAI.Application/DTOModels/AuthDto.cs @@ -1,4 +1,4 @@ -namespace Bimix.Application.DTOModels; +namespace BimAI.Application.DTOModels; public class GoogleAuthRequest { diff --git a/Bimix.Application/DTOModels/Common/PagedResult.cs b/BimAI.Application/DTOModels/Common/PagedResult.cs similarity index 88% rename from Bimix.Application/DTOModels/Common/PagedResult.cs rename to BimAI.Application/DTOModels/Common/PagedResult.cs index 4c8a50b..99e8a3f 100644 --- a/Bimix.Application/DTOModels/Common/PagedResult.cs +++ b/BimAI.Application/DTOModels/Common/PagedResult.cs @@ -1,4 +1,4 @@ -namespace Bimix.Application.DTOModels.Common; +namespace BimAI.Application.DTOModels.Common; public class PagedResult { diff --git a/Bimix.Application/DTOModels/ProductDto.cs b/BimAI.Application/DTOModels/ProductDto.cs similarity index 94% rename from Bimix.Application/DTOModels/ProductDto.cs rename to BimAI.Application/DTOModels/ProductDto.cs index 6f71deb..3c9816b 100644 --- a/Bimix.Application/DTOModels/ProductDto.cs +++ b/BimAI.Application/DTOModels/ProductDto.cs @@ -1,4 +1,4 @@ -namespace Bimix.Application.DTOModels; +namespace BimAI.Application.DTOModels; public class ProductDto { diff --git a/Bimix.Domain/Bimix.Domain.csproj b/BimAI.Domain/BimAI.Domain.csproj similarity index 95% rename from Bimix.Domain/Bimix.Domain.csproj rename to BimAI.Domain/BimAI.Domain.csproj index bb23fb7..fa71b7a 100644 --- a/Bimix.Domain/Bimix.Domain.csproj +++ b/BimAI.Domain/BimAI.Domain.csproj @@ -1,9 +1,9 @@ - - - - net8.0 - enable - enable - - - + + + + net8.0 + enable + enable + + + diff --git a/Bimix.Domain/Entities/BaseEntity.cs b/BimAI.Domain/Entities/BaseEntity.cs similarity index 82% rename from Bimix.Domain/Entities/BaseEntity.cs rename to BimAI.Domain/Entities/BaseEntity.cs index 4ad619b..c244739 100644 --- a/Bimix.Domain/Entities/BaseEntity.cs +++ b/BimAI.Domain/Entities/BaseEntity.cs @@ -1,4 +1,4 @@ -namespace Bimix.Domain.Entities; +namespace BimAI.Domain.Entities; public abstract class BaseEntity { diff --git a/Bimix.Domain/Entities/Product.cs b/BimAI.Domain/Entities/Product.cs similarity index 86% rename from Bimix.Domain/Entities/Product.cs rename to BimAI.Domain/Entities/Product.cs index 9e68ae1..8e8cc75 100644 --- a/Bimix.Domain/Entities/Product.cs +++ b/BimAI.Domain/Entities/Product.cs @@ -1,4 +1,4 @@ -namespace Bimix.Domain.Entities; +namespace BimAI.Domain.Entities; public class Product : BaseEntity { diff --git a/Bimix.Domain/Entities/SyncState.cs b/BimAI.Domain/Entities/SyncState.cs similarity index 81% rename from Bimix.Domain/Entities/SyncState.cs rename to BimAI.Domain/Entities/SyncState.cs index 01dd76c..c5f4dbd 100644 --- a/Bimix.Domain/Entities/SyncState.cs +++ b/BimAI.Domain/Entities/SyncState.cs @@ -1,4 +1,4 @@ -namespace Bimix.Domain.Entities; +namespace BimAI.Domain.Entities; public class SyncState { diff --git a/Bimix.Domain/Entities/User.cs b/BimAI.Domain/Entities/User.cs similarity index 89% rename from Bimix.Domain/Entities/User.cs rename to BimAI.Domain/Entities/User.cs index 490a4a0..302461a 100644 --- a/Bimix.Domain/Entities/User.cs +++ b/BimAI.Domain/Entities/User.cs @@ -1,4 +1,4 @@ -namespace Bimix.Domain.Entities; +namespace BimAI.Domain.Entities; public class User : BaseEntity { diff --git a/Bimix.Infrastructure/Bimix.Infrastructure.csproj b/BimAI.Infrastructure/BimAI.Infrastructure.csproj similarity index 82% rename from Bimix.Infrastructure/Bimix.Infrastructure.csproj rename to BimAI.Infrastructure/BimAI.Infrastructure.csproj index f86390f..5b7cb5e 100644 --- a/Bimix.Infrastructure/Bimix.Infrastructure.csproj +++ b/BimAI.Infrastructure/BimAI.Infrastructure.csproj @@ -1,23 +1,23 @@ - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - net8.0 - enable - enable - - - + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + net8.0 + enable + enable + + + diff --git a/Bimix.Infrastructure/Data/BimixDbContext.cs b/BimAI.Infrastructure/Data/BimixDbContext.cs similarity index 96% rename from Bimix.Infrastructure/Data/BimixDbContext.cs rename to BimAI.Infrastructure/Data/BimixDbContext.cs index 96875cb..41954cd 100644 --- a/Bimix.Infrastructure/Data/BimixDbContext.cs +++ b/BimAI.Infrastructure/Data/BimixDbContext.cs @@ -1,9 +1,9 @@ -using Bimix.Domain.Entities; using Microsoft.EntityFrameworkCore; +using BimAI.Domain.Entities; -namespace Bimix.Infrastructure.Data; +namespace BimAI.Infrastructure.Data; -public class BimixDbContext(DbContextOptions options) : DbContext(options) +public class BimAIDbContext(DbContextOptions options) : DbContext(options) { public DbSet Products { get; set; } public DbSet SyncStates { get; set; } diff --git a/Bimix.Infrastructure/Migrations/20250619185202_InitDatabase.Designer.cs b/BimAI.Infrastructure/Migrations/20250619185202_InitDatabase.Designer.cs similarity index 89% rename from Bimix.Infrastructure/Migrations/20250619185202_InitDatabase.Designer.cs rename to BimAI.Infrastructure/Migrations/20250619185202_InitDatabase.Designer.cs index a8d60d7..5c08bd3 100644 --- a/Bimix.Infrastructure/Migrations/20250619185202_InitDatabase.Designer.cs +++ b/BimAI.Infrastructure/Migrations/20250619185202_InitDatabase.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Bimix.Infrastructure.Data; +using BimAI.Infrastructure.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { - [DbContext(typeof(BimixDbContext))] + [DbContext(typeof(BimAIDbContext))] [Migration("20250619185202_InitDatabase")] partial class InitDatabase { @@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("Bimix.Domain.Entities.Product", b => + modelBuilder.Entity("BimAI.Domain.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() diff --git a/Bimix.Infrastructure/Migrations/20250619185202_InitDatabase.cs b/BimAI.Infrastructure/Migrations/20250619185202_InitDatabase.cs similarity index 96% rename from Bimix.Infrastructure/Migrations/20250619185202_InitDatabase.cs rename to BimAI.Infrastructure/Migrations/20250619185202_InitDatabase.cs index 0c06211..f8be6c6 100644 --- a/Bimix.Infrastructure/Migrations/20250619185202_InitDatabase.cs +++ b/BimAI.Infrastructure/Migrations/20250619185202_InitDatabase.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { /// public partial class InitDatabase : Migration diff --git a/Bimix.Infrastructure/Migrations/20250623184943_AddSyncState.Designer.cs b/BimAI.Infrastructure/Migrations/20250623184943_AddSyncState.Designer.cs similarity index 88% rename from Bimix.Infrastructure/Migrations/20250623184943_AddSyncState.Designer.cs rename to BimAI.Infrastructure/Migrations/20250623184943_AddSyncState.Designer.cs index 2b3e72a..984239e 100644 --- a/Bimix.Infrastructure/Migrations/20250623184943_AddSyncState.Designer.cs +++ b/BimAI.Infrastructure/Migrations/20250623184943_AddSyncState.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Bimix.Infrastructure.Data; +using BimAI.Infrastructure.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { - [DbContext(typeof(BimixDbContext))] + [DbContext(typeof(BimAIDbContext))] [Migration("20250623184943_AddSyncState")] partial class AddSyncState { @@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("Bimix.Domain.Entities.Product", b => + modelBuilder.Entity("BimAI.Domain.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -47,7 +47,7 @@ namespace Bimix.Infrastructure.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => + modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b => { b.Property("Entity") .HasColumnType("nvarchar(450)"); diff --git a/Bimix.Infrastructure/Migrations/20250623184943_AddSyncState.cs b/BimAI.Infrastructure/Migrations/20250623184943_AddSyncState.cs similarity index 95% rename from Bimix.Infrastructure/Migrations/20250623184943_AddSyncState.cs rename to BimAI.Infrastructure/Migrations/20250623184943_AddSyncState.cs index 456a24e..9b59995 100644 --- a/Bimix.Infrastructure/Migrations/20250623184943_AddSyncState.cs +++ b/BimAI.Infrastructure/Migrations/20250623184943_AddSyncState.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { /// public partial class AddSyncState : Migration diff --git a/Bimix.Infrastructure/Migrations/20250623194653_ResizeProductName.Designer.cs b/BimAI.Infrastructure/Migrations/20250623194653_ResizeProductName.Designer.cs similarity index 88% rename from Bimix.Infrastructure/Migrations/20250623194653_ResizeProductName.Designer.cs rename to BimAI.Infrastructure/Migrations/20250623194653_ResizeProductName.Designer.cs index f14b2cf..5f19307 100644 --- a/Bimix.Infrastructure/Migrations/20250623194653_ResizeProductName.Designer.cs +++ b/BimAI.Infrastructure/Migrations/20250623194653_ResizeProductName.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Bimix.Infrastructure.Data; +using BimAI.Infrastructure.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { - [DbContext(typeof(BimixDbContext))] + [DbContext(typeof(BimAIDbContext))] [Migration("20250623194653_ResizeProductName")] partial class ResizeProductName { @@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("Bimix.Domain.Entities.Product", b => + modelBuilder.Entity("BimAI.Domain.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -47,7 +47,7 @@ namespace Bimix.Infrastructure.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => + modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b => { b.Property("Entity") .HasColumnType("nvarchar(450)"); diff --git a/Bimix.Infrastructure/Migrations/20250623194653_ResizeProductName.cs b/BimAI.Infrastructure/Migrations/20250623194653_ResizeProductName.cs similarity index 96% rename from Bimix.Infrastructure/Migrations/20250623194653_ResizeProductName.cs rename to BimAI.Infrastructure/Migrations/20250623194653_ResizeProductName.cs index fb882ec..18c72ad 100644 --- a/Bimix.Infrastructure/Migrations/20250623194653_ResizeProductName.cs +++ b/BimAI.Infrastructure/Migrations/20250623194653_ResizeProductName.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { /// public partial class ResizeProductName : Migration diff --git a/Bimix.Infrastructure/Migrations/20250624193445_Products-NewFields.Designer.cs b/BimAI.Infrastructure/Migrations/20250624193445_Products-NewFields.Designer.cs similarity index 90% rename from Bimix.Infrastructure/Migrations/20250624193445_Products-NewFields.Designer.cs rename to BimAI.Infrastructure/Migrations/20250624193445_Products-NewFields.Designer.cs index b03e9e9..b9bf7a2 100644 --- a/Bimix.Infrastructure/Migrations/20250624193445_Products-NewFields.Designer.cs +++ b/BimAI.Infrastructure/Migrations/20250624193445_Products-NewFields.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Bimix.Infrastructure.Data; +using BimAI.Infrastructure.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { - [DbContext(typeof(BimixDbContext))] + [DbContext(typeof(BimAIDbContext))] [Migration("20250624193445_Products-NewFields")] partial class ProductsNewFields { @@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("Bimix.Domain.Entities.Product", b => + modelBuilder.Entity("BimAI.Domain.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -62,7 +62,7 @@ namespace Bimix.Infrastructure.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => + modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b => { b.Property("Entity") .HasColumnType("nvarchar(450)"); diff --git a/Bimix.Infrastructure/Migrations/20250624193445_Products-NewFields.cs b/BimAI.Infrastructure/Migrations/20250624193445_Products-NewFields.cs similarity index 97% rename from Bimix.Infrastructure/Migrations/20250624193445_Products-NewFields.cs rename to BimAI.Infrastructure/Migrations/20250624193445_Products-NewFields.cs index 8cb9efd..b02a671 100644 --- a/Bimix.Infrastructure/Migrations/20250624193445_Products-NewFields.cs +++ b/BimAI.Infrastructure/Migrations/20250624193445_Products-NewFields.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { /// public partial class ProductsNewFields : Migration diff --git a/Bimix.Infrastructure/Migrations/20250718162313_AddUsersTable.Designer.cs b/BimAI.Infrastructure/Migrations/20250718162313_AddUsersTable.Designer.cs similarity index 93% rename from Bimix.Infrastructure/Migrations/20250718162313_AddUsersTable.Designer.cs rename to BimAI.Infrastructure/Migrations/20250718162313_AddUsersTable.Designer.cs index 56377d1..e2cb4bf 100644 --- a/Bimix.Infrastructure/Migrations/20250718162313_AddUsersTable.Designer.cs +++ b/BimAI.Infrastructure/Migrations/20250718162313_AddUsersTable.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Bimix.Infrastructure.Data; +using BimAI.Infrastructure.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { - [DbContext(typeof(BimixDbContext))] + [DbContext(typeof(BimAIDbContext))] [Migration("20250718162313_AddUsersTable")] partial class AddUsersTable { @@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("Bimix.Domain.Entities.Product", b => + modelBuilder.Entity("BimAI.Domain.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -66,7 +66,7 @@ namespace Bimix.Infrastructure.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => + modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b => { b.Property("Entity") .HasColumnType("nvarchar(450)"); @@ -79,7 +79,7 @@ namespace Bimix.Infrastructure.Migrations b.ToTable("SyncStates"); }); - modelBuilder.Entity("Bimix.Domain.Entities.User", b => + modelBuilder.Entity("BimAI.Domain.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() diff --git a/Bimix.Infrastructure/Migrations/20250718162313_AddUsersTable.cs b/BimAI.Infrastructure/Migrations/20250718162313_AddUsersTable.cs similarity index 98% rename from Bimix.Infrastructure/Migrations/20250718162313_AddUsersTable.cs rename to BimAI.Infrastructure/Migrations/20250718162313_AddUsersTable.cs index 95a9473..dbdd0c4 100644 --- a/Bimix.Infrastructure/Migrations/20250718162313_AddUsersTable.cs +++ b/BimAI.Infrastructure/Migrations/20250718162313_AddUsersTable.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { /// public partial class AddUsersTable : Migration diff --git a/Bimix.Infrastructure/Migrations/BimixDbContextModelSnapshot.cs b/BimAI.Infrastructure/Migrations/BimixDbContextModelSnapshot.cs similarity index 92% rename from Bimix.Infrastructure/Migrations/BimixDbContextModelSnapshot.cs rename to BimAI.Infrastructure/Migrations/BimixDbContextModelSnapshot.cs index 02130e5..1271f2f 100644 --- a/Bimix.Infrastructure/Migrations/BimixDbContextModelSnapshot.cs +++ b/BimAI.Infrastructure/Migrations/BimixDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using Bimix.Infrastructure.Data; +using BimAI.Infrastructure.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -8,10 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable -namespace Bimix.Infrastructure.Migrations +namespace BimAI.Infrastructure.Migrations { - [DbContext(typeof(BimixDbContext))] - partial class BimixDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(BimAIDbContext))] + partial class BimAIDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { @@ -22,7 +22,7 @@ namespace Bimix.Infrastructure.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("Bimix.Domain.Entities.Product", b => + modelBuilder.Entity("BimAI.Domain.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -63,7 +63,7 @@ namespace Bimix.Infrastructure.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => + modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b => { b.Property("Entity") .HasColumnType("nvarchar(450)"); @@ -76,7 +76,7 @@ namespace Bimix.Infrastructure.Migrations b.ToTable("SyncStates"); }); - modelBuilder.Entity("Bimix.Domain.Entities.User", b => + modelBuilder.Entity("BimAI.Domain.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() diff --git a/Bimix.Infrastructure/Sync/ProductSyncService.cs b/BimAI.Infrastructure/Sync/ProductSyncService.cs similarity index 92% rename from Bimix.Infrastructure/Sync/ProductSyncService.cs rename to BimAI.Infrastructure/Sync/ProductSyncService.cs index a83426f..b68dd28 100644 --- a/Bimix.Infrastructure/Sync/ProductSyncService.cs +++ b/BimAI.Infrastructure/Sync/ProductSyncService.cs @@ -1,14 +1,12 @@ -using System.Reflection.Metadata.Ecma335; using System.Text.Json; -using System.Text.RegularExpressions; using System.Web; -using Bimix.Domain.Entities; -using Bimix.Infrastructure.Data; +using BimAI.Domain.Entities; +using BimAI.Infrastructure.Data; using Microsoft.Extensions.Configuration; -namespace Bimix.Infrastructure.Sync; +namespace BimAI.Infrastructure.Sync; -public class ProductSyncService(HttpClient httpClient, BimixDbContext db, IConfiguration configuration) +public class ProductSyncService(HttpClient httpClient, BimAIDbContext db, IConfiguration configuration) { /// /// Dekoduje encje HTML w ciągu znaków (np. " na ") diff --git a/Bimix.UI.Mobile/App.xaml b/BimAI.UI.Mobile/App.xaml similarity index 100% rename from Bimix.UI.Mobile/App.xaml rename to BimAI.UI.Mobile/App.xaml diff --git a/Bimix.UI.Mobile/App.xaml.cs b/BimAI.UI.Mobile/App.xaml.cs similarity index 84% rename from Bimix.UI.Mobile/App.xaml.cs rename to BimAI.UI.Mobile/App.xaml.cs index 31b462d..9ee7070 100644 --- a/Bimix.UI.Mobile/App.xaml.cs +++ b/BimAI.UI.Mobile/App.xaml.cs @@ -1,4 +1,4 @@ -namespace Bimix.UI.Mobile; +namespace BimAI.UI.Mobile; public partial class App : Microsoft.Maui.Controls.Application { diff --git a/Bimix.UI.Mobile/Bimix.UI.Mobile.csproj b/BimAI.UI.Mobile/BimAI.UI.Mobile.csproj similarity index 80% rename from Bimix.UI.Mobile/Bimix.UI.Mobile.csproj rename to BimAI.UI.Mobile/BimAI.UI.Mobile.csproj index e3df775..e985cc8 100644 --- a/Bimix.UI.Mobile/Bimix.UI.Mobile.csproj +++ b/BimAI.UI.Mobile/BimAI.UI.Mobile.csproj @@ -15,7 +15,7 @@ Exe - Bimix.UI.Mobile + BimAI.UI.Mobile true true enable @@ -23,10 +23,10 @@ enable - Bimix + BimAI - cloud.bimit.bimix + 1.0 @@ -41,30 +41,11 @@ - cloud.bimit.bimix + Apple Development: Michal Zielinski (2F35ZHMBTB) - bimix-local + bimai-local ios-arm64 - - - - - - - - PreserveNewest - true - PreserveNewest - - - - PreserveNewest - true - PreserveNewest - appsettings.json - - @@ -103,7 +84,7 @@ - + \ No newline at end of file diff --git a/Bimix.UI.Mobile/MainPage.xaml b/BimAI.UI.Mobile/MainPage.xaml similarity index 100% rename from Bimix.UI.Mobile/MainPage.xaml rename to BimAI.UI.Mobile/MainPage.xaml diff --git a/Bimix.UI.Mobile/MainPage.xaml.cs b/BimAI.UI.Mobile/MainPage.xaml.cs similarity index 79% rename from Bimix.UI.Mobile/MainPage.xaml.cs rename to BimAI.UI.Mobile/MainPage.xaml.cs index 63fb0bb..d4f1cc9 100644 --- a/Bimix.UI.Mobile/MainPage.xaml.cs +++ b/BimAI.UI.Mobile/MainPage.xaml.cs @@ -1,4 +1,4 @@ -namespace Bimix.UI.Mobile; +namespace BimAI.UI.Mobile; public partial class MainPage : ContentPage { diff --git a/Bimix.UI.Mobile/MauiProgram.cs b/BimAI.UI.Mobile/MauiProgram.cs similarity index 91% rename from Bimix.UI.Mobile/MauiProgram.cs rename to BimAI.UI.Mobile/MauiProgram.cs index 9e08df7..7394cb9 100644 --- a/Bimix.UI.Mobile/MauiProgram.cs +++ b/BimAI.UI.Mobile/MauiProgram.cs @@ -1,8 +1,8 @@ using System.Reflection; -using Bimix.UI.Mobile.Services; -using Bimix.UI.Shared.Extensions; -using Bimix.UI.Shared.Interfaces; -using Bimix.UI.Shared.Services; +using BimAI.UI.Mobile.Services; +using BimAI.UI.Shared.Extensions; +using BimAI.UI.Shared.Interfaces; +using BimAI.UI.Shared.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -12,7 +12,7 @@ using Microsoft.Maui.Hosting; using MudBlazor.Services; using ZXing.Net.Maui.Controls; -namespace Bimix.UI.Mobile; +namespace BimAI.UI.Mobile; public static class MauiProgram { diff --git a/Bimix.UI.Mobile/Properties/launchSettings.json b/BimAI.UI.Mobile/Properties/launchSettings.json similarity index 100% rename from Bimix.UI.Mobile/Properties/launchSettings.json rename to BimAI.UI.Mobile/Properties/launchSettings.json diff --git a/Bimix.UI.Mobile/Resources/AppIcon/appicon.svg b/BimAI.UI.Mobile/Resources/AppIcon/appicon.svg similarity index 100% rename from Bimix.UI.Mobile/Resources/AppIcon/appicon.svg rename to BimAI.UI.Mobile/Resources/AppIcon/appicon.svg diff --git a/Bimix.UI.Mobile/Resources/AppIcon/appiconfg.svg b/BimAI.UI.Mobile/Resources/AppIcon/appiconfg.svg similarity index 100% rename from Bimix.UI.Mobile/Resources/AppIcon/appiconfg.svg rename to BimAI.UI.Mobile/Resources/AppIcon/appiconfg.svg diff --git a/Bimix.UI.Mobile/Resources/Fonts/OpenSans-Regular.ttf b/BimAI.UI.Mobile/Resources/Fonts/OpenSans-Regular.ttf similarity index 100% rename from Bimix.UI.Mobile/Resources/Fonts/OpenSans-Regular.ttf rename to BimAI.UI.Mobile/Resources/Fonts/OpenSans-Regular.ttf diff --git a/Bimix.UI.Mobile/Resources/Images/dotnet_bot.svg b/BimAI.UI.Mobile/Resources/Images/dotnet_bot.svg similarity index 100% rename from Bimix.UI.Mobile/Resources/Images/dotnet_bot.svg rename to BimAI.UI.Mobile/Resources/Images/dotnet_bot.svg diff --git a/Bimix.UI.Mobile/Resources/Raw/AboutAssets.txt b/BimAI.UI.Mobile/Resources/Raw/AboutAssets.txt similarity index 100% rename from Bimix.UI.Mobile/Resources/Raw/AboutAssets.txt rename to BimAI.UI.Mobile/Resources/Raw/AboutAssets.txt diff --git a/Bimix.UI.Mobile/Resources/Splash/splash.svg b/BimAI.UI.Mobile/Resources/Splash/splash.svg similarity index 100% rename from Bimix.UI.Mobile/Resources/Splash/splash.svg rename to BimAI.UI.Mobile/Resources/Splash/splash.svg diff --git a/Bimix.UI.Mobile/Services/ScannerService.cs b/BimAI.UI.Mobile/Services/ScannerService.cs similarity index 98% rename from Bimix.UI.Mobile/Services/ScannerService.cs rename to BimAI.UI.Mobile/Services/ScannerService.cs index 290b36b..f5d914e 100644 --- a/Bimix.UI.Mobile/Services/ScannerService.cs +++ b/BimAI.UI.Mobile/Services/ScannerService.cs @@ -1,8 +1,8 @@ -using Bimix.UI.Shared.Interfaces; +using BimAI.UI.Shared.Interfaces; using ZXing.Net.Maui; using ZXing.Net.Maui.Controls; -namespace Bimix.UI.Mobile.Services; +namespace BimAI.UI.Mobile.Services; public class ScannerService : IScannerService { diff --git a/Bimix.UI.Mobile/appsettings.Development.json b/BimAI.UI.Mobile/appsettings.Development.json similarity index 100% rename from Bimix.UI.Mobile/appsettings.Development.json rename to BimAI.UI.Mobile/appsettings.Development.json diff --git a/Bimix.UI.Mobile/appsettings.json b/BimAI.UI.Mobile/appsettings.json similarity index 100% rename from Bimix.UI.Mobile/appsettings.json rename to BimAI.UI.Mobile/appsettings.json diff --git a/Bimix.UI.Mobile/wwwroot/css/app.css b/BimAI.UI.Mobile/wwwroot/css/app.css similarity index 100% rename from Bimix.UI.Mobile/wwwroot/css/app.css rename to BimAI.UI.Mobile/wwwroot/css/app.css diff --git a/Bimix.UI.Mobile/wwwroot/index.html b/BimAI.UI.Mobile/wwwroot/index.html similarity index 100% rename from Bimix.UI.Mobile/wwwroot/index.html rename to BimAI.UI.Mobile/wwwroot/index.html diff --git a/Bimix.UI.Shared/Bimix.UI.Shared.csproj b/BimAI.UI.Shared/BimAI.UI.Shared.csproj similarity index 82% rename from Bimix.UI.Shared/Bimix.UI.Shared.csproj rename to BimAI.UI.Shared/BimAI.UI.Shared.csproj index c7a5aec..9fbbeed 100644 --- a/Bimix.UI.Shared/Bimix.UI.Shared.csproj +++ b/BimAI.UI.Shared/BimAI.UI.Shared.csproj @@ -1,30 +1,30 @@ - - - - net8.0 - enable - enable - - - - - - - - - - - - - - - - - - - - - - - - + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Bimix.UI.Shared/Components/AuthGuard.razor b/BimAI.UI.Shared/Components/AuthGuard.razor similarity index 97% rename from Bimix.UI.Shared/Components/AuthGuard.razor rename to BimAI.UI.Shared/Components/AuthGuard.razor index 06d437f..abed981 100644 --- a/Bimix.UI.Shared/Components/AuthGuard.razor +++ b/BimAI.UI.Shared/Components/AuthGuard.razor @@ -1,4 +1,4 @@ -@using Bimix.UI.Shared.Services +@using BimAI.UI.Shared.Services @inject AuthService AuthService @inject NavigationManager Navigation diff --git a/Bimix.UI.Shared/Components/Dashboard.razor b/BimAI.UI.Shared/Components/Dashboard.razor similarity index 100% rename from Bimix.UI.Shared/Components/Dashboard.razor rename to BimAI.UI.Shared/Components/Dashboard.razor diff --git a/Bimix.UI.Shared/Components/Index.razor b/BimAI.UI.Shared/Components/Index.razor similarity index 100% rename from Bimix.UI.Shared/Components/Index.razor rename to BimAI.UI.Shared/Components/Index.razor diff --git a/Bimix.UI.Shared/Components/LoginCard.razor b/BimAI.UI.Shared/Components/LoginCard.razor similarity index 97% rename from Bimix.UI.Shared/Components/LoginCard.razor rename to BimAI.UI.Shared/Components/LoginCard.razor index 6ce8c58..5a6bb63 100644 --- a/Bimix.UI.Shared/Components/LoginCard.razor +++ b/BimAI.UI.Shared/Components/LoginCard.razor @@ -1,6 +1,6 @@ +@using BimAI.UI.Shared.Services @using Microsoft.Extensions.Configuration -@using Bimix.UI.Shared.Services @inject IJSRuntime JS @inject IConfiguration Configuration @inject AuthService AuthService @@ -8,7 +8,7 @@