App name refactor
Some checks failed
Build Bimix / Build WebAPI and WebUI (push) Failing after 12s

This commit is contained in:
Michał Zieliński
2025-10-11 11:33:46 +02:00
parent b4edaf007e
commit 6d2c46d971
88 changed files with 437 additions and 419 deletions

View File

@@ -1,26 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Google.Apis.Auth" Version="1.70.0" /> <PackageReference Include="Google.Apis.Auth" Version="1.70.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.17" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.17"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.17">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.12.1" /> <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.12.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Bimix.Application\Bimix.Application.csproj" /> <ProjectReference Include="..\BimAI.Application\BimAI.Application.csproj" />
<ProjectReference Include="..\Bimix.Infrastructure\Bimix.Infrastructure.csproj" /> <ProjectReference Include="..\BimAI.Infrastructure\BimAI.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

6
BimAI.API/BimAI.API.http Normal file
View File

@@ -0,0 +1,6 @@
@BimAI.API_HostAddress = http://localhost:5090
GET {{BimAI.API_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@@ -1,10 +1,10 @@
using System.Security.Claims; using System.Security.Claims;
using Bimix.API.Services; using BimAI.API.Services;
using Bimix.Application.DTOModels; using BimAI.Application.DTOModels;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace Bimix.API.Controllers; namespace BimAI.API.Controllers;
public class AuthController( public class AuthController(
GoogleAuthService googleAuthService, GoogleAuthService googleAuthService,

View File

@@ -1,17 +1,16 @@
using Bimix.Application.DTOModels; using BimAI.Application.DTOModels;
using Bimix.Application.DTOModels.Common; using BimAI.Application.DTOModels.Common;
using BimAI.Infrastructure.Data;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bimix.Infrastructure.Data;
using Bimix.Domain.Entities;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace Bimix.API.Controllers; namespace BimAI.API.Controllers;
[ApiController] [ApiController]
[Route("api/[controller]")] [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] [HttpGet]
public async Task<ActionResult<IEnumerable<ProductDto>>> GetProducts([FromQuery] ProductFilterRequest request) public async Task<ActionResult<IEnumerable<ProductDto>>> GetProducts([FromQuery] ProductFilterRequest request)

View File

@@ -1,7 +1,7 @@
using Bimix.Infrastructure.Sync; using BimAI.Infrastructure.Sync;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace Bimix.API.Controllers; namespace BimAI.API.Controllers;
[ApiController] [ApiController]
[Route("api/[controller]")] [Route("api/[controller]")]

View File

@@ -1,71 +1,71 @@
using System.Text; using System.Text;
using Bimix.API.Services; using BimAI.API.Services;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Bimix.Infrastructure.Sync; using BimAI.Infrastructure.Sync;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection"); var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddDbContext<BimixDbContext>(options => options.UseSqlServer(connectionString)); builder.Services.AddDbContext<BimAIDbContext>(options => options.UseSqlServer(connectionString));
builder.Services.AddScoped<ProductSyncService>(); builder.Services.AddScoped<ProductSyncService>();
builder.Services.AddHttpClient(); builder.Services.AddHttpClient();
builder.Services.AddControllers(); builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer(); builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(); builder.Services.AddSwaggerGen();
// Start auth section // Start auth section
var jwtSettings = builder.Configuration.GetSection("JwtSettings"); var jwtSettings = builder.Configuration.GetSection("JwtSettings");
var secretKey = jwtSettings["SecretKey"]; var secretKey = jwtSettings["SecretKey"];
var issuer = jwtSettings["Issuer"]; var issuer = jwtSettings["Issuer"];
var audience = jwtSettings["Audience"]; var audience = jwtSettings["Audience"];
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options => .AddJwtBearer(options =>
{ {
options.TokenValidationParameters = new TokenValidationParameters options.TokenValidationParameters = new TokenValidationParameters
{ {
ValidateIssuer = true, ValidateIssuer = true,
ValidateAudience = true, ValidateAudience = true,
ValidateLifetime = true, ValidateLifetime = true,
ValidateIssuerSigningKey = true, ValidateIssuerSigningKey = true,
ValidIssuer = issuer, ValidIssuer = issuer,
ValidAudience = audience, ValidAudience = audience,
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)), IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)),
ClockSkew = TimeSpan.Zero, ClockSkew = TimeSpan.Zero,
}; };
}); });
builder.Services.AddAuthentication(); builder.Services.AddAuthentication();
builder.Services.AddScoped<GoogleAuthService>(); builder.Services.AddScoped<GoogleAuthService>();
builder.Services.AddScoped<JwtTokenService>(); builder.Services.AddScoped<JwtTokenService>();
builder.Services.AddCors(options => builder.Services.AddCors(options =>
{ {
options.AddPolicy("AllowAll", policy => options.AddPolicy("AllowAll", policy =>
{ {
policy.AllowAnyOrigin() policy.AllowAnyOrigin()
.AllowAnyMethod() .AllowAnyMethod()
.AllowAnyHeader(); .AllowAnyHeader();
}); });
}); });
// End auth section // End auth section
var app = builder.Build(); var app = builder.Build();
if (app.Environment.IsDevelopment()) if (app.Environment.IsDevelopment())
{ {
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(); app.UseSwaggerUI();
} }
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseCors("AllowAll"); app.UseCors("AllowAll");
app.UseAuthorization(); app.UseAuthorization();
app.UseAuthorization(); app.UseAuthorization();
app.MapControllers(); app.MapControllers();
app.Run(); app.Run();

View File

@@ -1,14 +1,14 @@
{ {
"profiles": { "profiles": {
"dev": { "dev": {
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"launchUrl": "swagger", "launchUrl": "swagger",
"applicationUrl": "http://localhost:7142;http://0.0.0.0:7142", "applicationUrl": "http://localhost:7142;http://0.0.0.0:7142",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
} }
} }
} }

View File

@@ -1,13 +1,13 @@
using Bimix.Domain.Entities; using BimAI.Domain.Entities;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Google.Apis.Auth; using Google.Apis.Auth;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace Bimix.API.Services; namespace BimAI.API.Services;
public class GoogleAuthService(BimixDbContext context, IConfiguration configuration, ILogger<GoogleAuthService> logger) public class GoogleAuthService(BimAIDbContext context, IConfiguration configuration, ILogger<GoogleAuthService> logger)
{ {
private readonly BimixDbContext _context = context; private readonly BimAIDbContext _context = context;
private readonly IConfiguration _configuration = configuration; private readonly IConfiguration _configuration = configuration;
private readonly ILogger<GoogleAuthService> _logger = logger; private readonly ILogger<GoogleAuthService> _logger = logger;
@@ -35,8 +35,8 @@ public class GoogleAuthService(BimixDbContext context, IConfiguration configurat
if (user == null) if (user == null)
{ {
_logger.LogError("User not found in Bimix database: {Email}", payload.Email); _logger.LogError("User not found in BimAI database: {Email}", payload.Email);
return (false, null, "User not found in Bimix database"); return (false, null, "User not found in BimAI database");
} }
if (!user.IsActive) if (!user.IsActive)

View File

@@ -1,11 +1,10 @@
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims; using System.Security.Claims;
using System.Text; using System.Text;
using Bimix.Domain.Entities; using BimAI.Domain.Entities;
using Microsoft.IdentityModel.Tokens;
namespace BimAI.API.Services;
namespace Bimix.API.Services;
public class JwtTokenService(IConfiguration configuration, ILogger<JwtTokenService> logger) public class JwtTokenService(IConfiguration configuration, ILogger<JwtTokenService> logger)
{ {

View File

@@ -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"
}
}
}

View File

@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Bimix.Domain\Bimix.Domain.csproj" /> <ProjectReference Include="..\BimAI.Domain\BimAI.Domain.csproj" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -1,4 +1,4 @@
namespace Bimix.Application.DTOModels; namespace BimAI.Application.DTOModels;
public class GoogleAuthRequest public class GoogleAuthRequest
{ {

View File

@@ -1,4 +1,4 @@
namespace Bimix.Application.DTOModels.Common; namespace BimAI.Application.DTOModels.Common;
public class PagedResult<T> public class PagedResult<T>
{ {

View File

@@ -1,4 +1,4 @@
namespace Bimix.Application.DTOModels; namespace BimAI.Application.DTOModels;
public class ProductDto public class ProductDto
{ {

View File

@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities; namespace BimAI.Domain.Entities;
public abstract class BaseEntity public abstract class BaseEntity
{ {

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities; namespace BimAI.Domain.Entities;
public class Product : BaseEntity public class Product : BaseEntity
{ {

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities; namespace BimAI.Domain.Entities;
public class SyncState public class SyncState
{ {

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities; namespace BimAI.Domain.Entities;
public class User : BaseEntity public class User : BaseEntity
{ {

View File

@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Bimix.Domain\Bimix.Domain.csproj" /> <ProjectReference Include="..\BimAI.Domain\BimAI.Domain.csproj" />
<ProjectReference Include="..\Bimix.Application\Bimix.Application.csproj" /> <ProjectReference Include="..\BimAI.Application\BimAI.Application.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.17" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.17" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.17"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.17">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -1,9 +1,9 @@
using Bimix.Domain.Entities;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using BimAI.Domain.Entities;
namespace Bimix.Infrastructure.Data; namespace BimAI.Infrastructure.Data;
public class BimixDbContext(DbContextOptions<BimixDbContext> options) : DbContext(options) public class BimAIDbContext(DbContextOptions<BimAIDbContext> options) : DbContext(options)
{ {
public DbSet<Product> Products { get; set; } public DbSet<Product> Products { get; set; }
public DbSet<SyncState> SyncStates { get; set; } public DbSet<SyncState> SyncStates { get; set; }

View File

@@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
[DbContext(typeof(BimixDbContext))] [DbContext(typeof(BimAIDbContext))]
[Migration("20250619185202_InitDatabase")] [Migration("20250619185202_InitDatabase")]
partial class InitDatabase partial class InitDatabase
{ {
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b => modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class InitDatabase : Migration public partial class InitDatabase : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
[DbContext(typeof(BimixDbContext))] [DbContext(typeof(BimAIDbContext))]
[Migration("20250623184943_AddSyncState")] [Migration("20250623184943_AddSyncState")]
partial class AddSyncState partial class AddSyncState
{ {
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b => modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@@ -47,7 +47,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{ {
b.Property<string>("Entity") b.Property<string>("Entity")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");

View File

@@ -2,7 +2,7 @@
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddSyncState : Migration public partial class AddSyncState : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
[DbContext(typeof(BimixDbContext))] [DbContext(typeof(BimAIDbContext))]
[Migration("20250623194653_ResizeProductName")] [Migration("20250623194653_ResizeProductName")]
partial class ResizeProductName partial class ResizeProductName
{ {
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b => modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@@ -47,7 +47,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{ {
b.Property<string>("Entity") b.Property<string>("Entity")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");

View File

@@ -2,7 +2,7 @@
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class ResizeProductName : Migration public partial class ResizeProductName : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
[DbContext(typeof(BimixDbContext))] [DbContext(typeof(BimAIDbContext))]
[Migration("20250624193445_Products-NewFields")] [Migration("20250624193445_Products-NewFields")]
partial class ProductsNewFields partial class ProductsNewFields
{ {
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b => modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@@ -62,7 +62,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{ {
b.Property<string>("Entity") b.Property<string>("Entity")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");

View File

@@ -2,7 +2,7 @@
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class ProductsNewFields : Migration public partial class ProductsNewFields : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
[DbContext(typeof(BimixDbContext))] [DbContext(typeof(BimAIDbContext))]
[Migration("20250718162313_AddUsersTable")] [Migration("20250718162313_AddUsersTable")]
partial class AddUsersTable partial class AddUsersTable
{ {
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b => modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@@ -66,7 +66,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{ {
b.Property<string>("Entity") b.Property<string>("Entity")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
@@ -79,7 +79,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("SyncStates"); b.ToTable("SyncStates");
}); });
modelBuilder.Entity("Bimix.Domain.Entities.User", b => modelBuilder.Entity("BimAI.Domain.Entities.User", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddUsersTable : Migration public partial class AddUsersTable : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@@ -8,10 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Bimix.Infrastructure.Migrations namespace BimAI.Infrastructure.Migrations
{ {
[DbContext(typeof(BimixDbContext))] [DbContext(typeof(BimAIDbContext))]
partial class BimixDbContextModelSnapshot : ModelSnapshot partial class BimAIDbContextModelSnapshot : ModelSnapshot
{ {
protected override void BuildModel(ModelBuilder modelBuilder) protected override void BuildModel(ModelBuilder modelBuilder)
{ {
@@ -22,7 +22,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b => modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@@ -63,7 +63,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b => modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{ {
b.Property<string>("Entity") b.Property<string>("Entity")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
@@ -76,7 +76,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("SyncStates"); b.ToTable("SyncStates");
}); });
modelBuilder.Entity("Bimix.Domain.Entities.User", b => modelBuilder.Entity("BimAI.Domain.Entities.User", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@@ -1,14 +1,12 @@
using System.Reflection.Metadata.Ecma335;
using System.Text.Json; using System.Text.Json;
using System.Text.RegularExpressions;
using System.Web; using System.Web;
using Bimix.Domain.Entities; using BimAI.Domain.Entities;
using Bimix.Infrastructure.Data; using BimAI.Infrastructure.Data;
using Microsoft.Extensions.Configuration; 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)
{ {
/// <summary> /// <summary>
/// Dekoduje encje HTML w ciągu znaków (np. &quot; na ") /// Dekoduje encje HTML w ciągu znaków (np. &quot; na ")

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Mobile; namespace BimAI.UI.Mobile;
public partial class App : Microsoft.Maui.Controls.Application public partial class App : Microsoft.Maui.Controls.Application
{ {

View File

@@ -15,7 +15,7 @@
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> --> <!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>Bimix.UI.Mobile</RootNamespace> <RootNamespace>BimAI.UI.Mobile</RootNamespace>
<UseMaui>true</UseMaui> <UseMaui>true</UseMaui>
<SingleProject>true</SingleProject> <SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
@@ -23,10 +23,10 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<!-- Display name --> <!-- Display name -->
<ApplicationTitle>Bimix</ApplicationTitle> <ApplicationTitle>BimAI</ApplicationTitle>
<!-- App Identifier --> <!-- App Identifier -->
<ApplicationId>cloud.bimit.bimix</ApplicationId> <ApplicationId></ApplicationId>
<!-- Versions --> <!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion> <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
@@ -41,30 +41,11 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'iPhone'"> <PropertyGroup Condition="'$(Platform)' == 'iPhone'">
<ApplicationId>cloud.bimit.bimix</ApplicationId> <ApplicationId></ApplicationId>
<CodesignKey>Apple Development: Michal Zielinski (2F35ZHMBTB)</CodesignKey> <CodesignKey>Apple Development: Michal Zielinski (2F35ZHMBTB)</CodesignKey>
<CodesignProvision>bimix-local</CodesignProvision> <CodesignProvision>bimai-local</CodesignProvision>
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier> <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="appsettings.Development.json" />
<Content Include="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<DependentUpon>appsettings.json</DependentUpon>
</Content>
</ItemGroup>
<ItemGroup> <ItemGroup>
<!-- App Icon --> <!-- App Icon -->
@@ -103,7 +84,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Bimix.UI.Shared\Bimix.UI.Shared.csproj"/> <ProjectReference Include="..\BimAI.UI.Shared\BimAI.UI.Shared.csproj"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Mobile; namespace BimAI.UI.Mobile;
public partial class MainPage : ContentPage public partial class MainPage : ContentPage
{ {

View File

@@ -1,8 +1,8 @@
using System.Reflection; using System.Reflection;
using Bimix.UI.Mobile.Services; using BimAI.UI.Mobile.Services;
using Bimix.UI.Shared.Extensions; using BimAI.UI.Shared.Extensions;
using Bimix.UI.Shared.Interfaces; using BimAI.UI.Shared.Interfaces;
using Bimix.UI.Shared.Services; using BimAI.UI.Shared.Services;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@@ -12,7 +12,7 @@ using Microsoft.Maui.Hosting;
using MudBlazor.Services; using MudBlazor.Services;
using ZXing.Net.Maui.Controls; using ZXing.Net.Maui.Controls;
namespace Bimix.UI.Mobile; namespace BimAI.UI.Mobile;
public static class MauiProgram public static class MauiProgram
{ {

View File

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1,8 +1,8 @@
using Bimix.UI.Shared.Interfaces; using BimAI.UI.Shared.Interfaces;
using ZXing.Net.Maui; using ZXing.Net.Maui;
using ZXing.Net.Maui.Controls; using ZXing.Net.Maui.Controls;
namespace Bimix.UI.Mobile.Services; namespace BimAI.UI.Mobile.Services;
public class ScannerService : IScannerService public class ScannerService : IScannerService
{ {

View File

@@ -1,30 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk.Razor"> <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<SupportedPlatform Include="browser" /> <SupportedPlatform Include="browser" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.17" /> <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.17" />
<PackageReference Include="MudBlazor" Version="8.8.0" /> <PackageReference Include="MudBlazor" Version="8.8.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.0" /> <PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Bimix.Domain\Bimix.Domain.csproj" /> <ProjectReference Include="..\BimAI.Domain\BimAI.Domain.csproj" />
<ProjectReference Include="..\Bimix.Application\Bimix.Application.csproj" /> <ProjectReference Include="..\BimAI.Application\BimAI.Application.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="wwwroot\images\" /> <Folder Include="wwwroot\images\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,4 +1,4 @@
@using Bimix.UI.Shared.Services @using BimAI.UI.Shared.Services
@inject AuthService AuthService @inject AuthService AuthService
@inject NavigationManager Navigation @inject NavigationManager Navigation

View File

@@ -1,6 +1,6 @@
@using BimAI.UI.Shared.Services
@using Microsoft.Extensions.Configuration @using Microsoft.Extensions.Configuration
@using Bimix.UI.Shared.Services
@inject IJSRuntime JS @inject IJSRuntime JS
@inject IConfiguration Configuration @inject IConfiguration Configuration
@inject AuthService AuthService @inject AuthService AuthService
@@ -8,7 +8,7 @@
<MudCard Class="login-card" Elevation="8"> <MudCard Class="login-card" Elevation="8">
<MudCardContent Class="pa-8 d-flex flex-column align-center"> <MudCardContent Class="pa-8 d-flex flex-column align-center">
<MudText Typo="Typo.h4" Class="mb-4">Witaj w Bimix</MudText> <MudText Typo="Typo.h4" Class="mb-4">Witaj w BimAI</MudText>
<MudText Typo="Typo.body1" Class="mb-6 text-center"> <MudText Typo="Typo.body1" Class="mb-6 text-center">
Zaloguj się używając konta Google Zaloguj się używając konta Google
</MudText> </MudText>

View File

@@ -1,12 +1,11 @@
using Bimix.Application.DTOModels; using BimAI.UI.Shared.Interfaces;
using Bimix.Application.DTOModels.Common; using BimAI.UI.Shared.Services;
using Bimix.UI.Shared.Interfaces;
using Bimix.UI.Shared.Services;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using BimAI.Application.DTOModels;
using BimAI.Application.DTOModels.Common;
using MudBlazor; using MudBlazor;
namespace BimAI.UI.Shared.Components;
namespace Bimix.UI.Shared.Components;
public partial class ProductListComponent : ComponentBase public partial class ProductListComponent : ComponentBase
{ {

View File

@@ -1,7 +1,7 @@
using Bimix.UI.Shared.Services; using BimAI.UI.Shared.Services;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Bimix.UI.Shared.Extensions; namespace BimAI.UI.Shared.Extensions;
public static class ServiceCollectionExtensions public static class ServiceCollectionExtensions
{ {

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Shared.Interfaces; namespace BimAI.UI.Shared.Interfaces;
public interface IScannerService public interface IScannerService
{ {

View File

@@ -16,7 +16,7 @@
OnClick="ToggleDrawer" OnClick="ToggleDrawer"
Class="mud-hidden-md-up"/> Class="mud-hidden-md-up"/>
<MudSpacer/> <MudSpacer/>
<MudText Typo="Typo.h6">Bimix</MudText> <MudText Typo="Typo.h6">BimAI</MudText>
</MudAppBar> </MudAppBar>
<MudDrawer @bind-Open="_drawerOpen" <MudDrawer @bind-Open="_drawerOpen"

View File

@@ -30,7 +30,7 @@
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('_content/Bimix.UI.Shared/images/login-background.jpg') no-repeat center; background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('_content/BimAI.UI.Shared/images/login-background.jpg') no-repeat center;
background-size: cover; background-size: cover;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -1,4 +1,5 @@
@page "/products" @page "/products"
@using BimAI.UI.Shared.Components
<PageTitle>Produkty</PageTitle> <PageTitle>Produkty</PageTitle>

View File

@@ -1,7 +1,7 @@
using System.Text.Json; using System.Text.Json;
using Microsoft.JSInterop; using Microsoft.JSInterop;
namespace Bimix.UI.Shared.Services; namespace BimAI.UI.Shared.Services;
public class UserInfo public class UserInfo
{ {

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Shared.Services; namespace BimAI.UI.Shared.Services;
// TODO it's a good place for this file? // TODO it's a good place for this file?
public class GoogleAuthConfig public class GoogleAuthConfig

View File

@@ -1,4 +1,6 @@
using Bimix.UI.Shared.Interfaces; using BimAI.UI.Shared.Interfaces;
namespace BimAI.UI.Shared.Services;
public class NoOpScannerService : IScannerService public class NoOpScannerService : IScannerService
{ {

View File

@@ -1,9 +1,9 @@
using System.Text.Json; using System.Text.Json;
using Bimix.Application.DTOModels; using BimAI.Application.DTOModels;
using Bimix.Application.DTOModels.Common; using BimAI.Application.DTOModels.Common;
using Microsoft.AspNetCore.WebUtilities; using Microsoft.AspNetCore.WebUtilities;
namespace Bimix.UI.Shared.Services; namespace BimAI.UI.Shared.Services;
public class ProductService(HttpClient httpClient) public class ProductService(HttpClient httpClient)
{ {

View File

@@ -6,8 +6,7 @@
@using static Microsoft.AspNetCore.Components.Web.RenderMode @using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop @using Microsoft.JSInterop
@using Bimix.UI.Web @using BimAI.UI.Shared
@using Bimix.UI.Web.Components @using MudBlazor@using BimAI.Application.DTOModels
@using Bimix.UI.Shared @using BimAI.Application.DTOModels.Common
@using Bimix.UI.Shared.Components @using BimAI.UI.Shared.Components
@using MudBlazor

View File

Before

Width:  |  Height:  |  Size: 965 KiB

After

Width:  |  Height:  |  Size: 965 KiB

View File

@@ -28,7 +28,7 @@ async function handleAuthError(error, context = '') {
const errorMessage = error?.message || error?.type || error?.toString() || 'Unknown error'; const errorMessage = error?.message || error?.type || error?.toString() || 'Unknown error';
const fullError = `${context}: ${errorMessage}`; const fullError = `${context}: ${errorMessage}`;
console.error('Google Auth Error:', { context, error, fullError }); console.error('Google Auth Error:', { context, error, fullError });
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', fullError); await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', fullError);
} }
async function fetchUserInfo(accessToken) { async function fetchUserInfo(accessToken) {
@@ -39,7 +39,7 @@ async function fetchUserInfo(accessToken) {
if (!response.ok) { if (!response.ok) {
const errorText = await response.text(); const errorText = await response.text();
console.error('Failed to fetch user info:', errorText); console.error('Failed to fetch user info:', errorText);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
`Failed to fetch user info: HTTP ${response.status}`); `Failed to fetch user info: HTTP ${response.status}`);
return null; return null;
} }
@@ -62,7 +62,7 @@ window.initGoogleSignIn = async function(clientId) {
try { try {
if (tokenResponse.error) { if (tokenResponse.error) {
console.error('Token response error:', tokenResponse.error); console.error('Token response error:', tokenResponse.error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
tokenResponse.error); tokenResponse.error);
return; return;
} }
@@ -70,7 +70,7 @@ window.initGoogleSignIn = async function(clientId) {
const userInfo = await fetchUserInfo(tokenResponse.access_token); const userInfo = await fetchUserInfo(tokenResponse.access_token);
if (!userInfo) return; if (!userInfo) return;
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInSuccess', await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInSuccess',
tokenResponse.access_token, tokenResponse.access_token,
userInfo.name || '', userInfo.name || '',
userInfo.email || '', userInfo.email || '',
@@ -78,7 +78,7 @@ window.initGoogleSignIn = async function(clientId) {
); );
} catch (error) { } catch (error) {
console.error('Callback error:', error); console.error('Callback error:', error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
error.message || 'Unknown callback error'); error.message || 'Unknown callback error');
} finally { } finally {
isSigningIn = false; isSigningIn = false;
@@ -86,7 +86,7 @@ window.initGoogleSignIn = async function(clientId) {
}, },
error_callback: async (error) => { error_callback: async (error) => {
console.error('OAuth flow error:', error); console.error('OAuth flow error:', error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
error.type || 'OAuth flow error'); error.type || 'OAuth flow error');
isSigningIn = false; isSigningIn = false;
} }
@@ -95,7 +95,7 @@ window.initGoogleSignIn = async function(clientId) {
return googleClient; return googleClient;
} catch (error) { } catch (error) {
console.error('Initiaxcrun xctrace list deviceslization error:', error); console.error('Initiaxcrun xctrace list deviceslization error:', error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
error.message || 'Failed to initialize Google Sign-In'); error.message || 'Failed to initialize Google Sign-In');
isSigningIn = false; isSigningIn = false;
} }
@@ -109,7 +109,7 @@ window.requestGoogleSignIn = async function() {
if (!googleClient) { if (!googleClient) {
console.error('Google Sign-In not initialized'); console.error('Google Sign-In not initialized');
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
'Google Sign-In not initialized. Call initGoogleSignIn first.'); 'Google Sign-In not initialized. Call initGoogleSignIn first.');
return; return;
} }

View File

@@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Bimix.UI.Shared\Bimix.UI.Shared.csproj" /> <ProjectReference Include="..\BimAI.UI.Shared\BimAI.UI.Shared.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -8,13 +8,13 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" /> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" /> <link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<link href="Bimix.UI.Web.styles.css" rel="stylesheet" /> <link href="BimAI.UI.Web.styles.css" rel="stylesheet" />
<script src="https://accounts.google.com/gsi/client" async defer></script> <script src="https://accounts.google.com/gsi/client" async defer></script>
<HeadOutlet /> <HeadOutlet />
</head> </head>
<body> <body>
<Bimix.UI.Shared.Components.Routes @rendermode="InteractiveServer" /> <BimAI.UI.Shared.Components.Routes @rendermode="InteractiveServer" />
<div id="blazor-error-ui"> <div id="blazor-error-ui">
@@ -30,7 +30,7 @@
<script src="_framework/blazor.web.js"></script> <script src="_framework/blazor.web.js"></script>
<script src="_content/MudBlazor/MudBlazor.min.js"></script> <script src="_content/MudBlazor/MudBlazor.min.js"></script>
<script src="_content/Bimix.UI.Shared/js/auth.js"></script> <script src="_content/BimAI.UI.Shared/js/auth.js"></script>
</body> </body>
</html> </html>

View File

@@ -1,11 +1,13 @@
@using System.Net.Http @using System.Net.Http
@using System.Net.Http.Json @using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web @using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode @using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop @using Microsoft.JSInterop
@using Bimix.UI.Shared @using BimAI.UI.Web
@using Bimix.UI.Shared.Components @using BimAI.UI.Web.Components
@using BimAI.UI.Shared
@using BimAI.UI.Shared.Components
@using MudBlazor @using MudBlazor

View File

@@ -1,8 +1,8 @@
using Bimix.UI.Shared; using BimAI.UI.Shared;
using Bimix.UI.Shared.Extensions; using BimAI.UI.Shared.Extensions;
using Bimix.UI.Shared.Interfaces; using BimAI.UI.Shared.Interfaces;
using Bimix.UI.Shared.Services; using BimAI.UI.Shared.Services;
using Bimix.UI.Web.Components; using BimAI.UI.Web.Components;
using MudBlazor.Services; using MudBlazor.Services;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);

View File

@@ -0,0 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"GoogleAuth": {
"ClientId": "1037727384847-t1l2au6du34kdckamro81guklk17cjah.apps.googleusercontent.com"
}
}

View File

@@ -1,9 +1,9 @@
{ {
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*"
} }

View File

@@ -1,58 +1,58 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59 VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.Domain", "Bimix.Domain\Bimix.Domain.csproj", "{190E3B1F-C91F-430F-BE32-4E7221574D36}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.Domain", "BimAI.Domain\BimAI.Domain.csproj", "{190E3B1F-C91F-430F-BE32-4E7221574D36}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.Application", "Bimix.Application\Bimix.Application.csproj", "{2E61A11C-851F-47D6-A8B6-329078CF1AFC}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.Application", "BimAI.Application\BimAI.Application.csproj", "{2E61A11C-851F-47D6-A8B6-329078CF1AFC}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.Infrastructure", "Bimix.Infrastructure\Bimix.Infrastructure.csproj", "{1049E8B5-6965-4CCD-A989-88E44D40BF48}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.Infrastructure", "BimAI.Infrastructure\BimAI.Infrastructure.csproj", "{1049E8B5-6965-4CCD-A989-88E44D40BF48}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.API", "Bimix.API\Bimix.API.csproj", "{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.API", "BimAI.API\BimAI.API.csproj", "{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.UI.Shared", "Bimix.UI.Shared\Bimix.UI.Shared.csproj", "{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.UI.Shared", "BimAI.UI.Shared\BimAI.UI.Shared.csproj", "{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.UI.Web", "Bimix.UI.Web\Bimix.UI.Web.csproj", "{7ACBFE74-E72C-4033-9172-30512233A518}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.UI.Web", "BimAI.UI.Web\BimAI.UI.Web.csproj", "{7ACBFE74-E72C-4033-9172-30512233A518}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.UI.Mobile", "Bimix.UI.Mobile\Bimix.UI.Mobile.csproj", "{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.UI.Mobile", "BimAI.UI.Mobile\BimAI.UI.Mobile.csproj", "{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{190E3B1F-C91F-430F-BE32-4E7221574D36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {190E3B1F-C91F-430F-BE32-4E7221574D36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{190E3B1F-C91F-430F-BE32-4E7221574D36}.Debug|Any CPU.Build.0 = Debug|Any CPU {190E3B1F-C91F-430F-BE32-4E7221574D36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{190E3B1F-C91F-430F-BE32-4E7221574D36}.Release|Any CPU.ActiveCfg = Release|Any CPU {190E3B1F-C91F-430F-BE32-4E7221574D36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{190E3B1F-C91F-430F-BE32-4E7221574D36}.Release|Any CPU.Build.0 = Release|Any CPU {190E3B1F-C91F-430F-BE32-4E7221574D36}.Release|Any CPU.Build.0 = Release|Any CPU
{2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU {2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU {2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Release|Any CPU.Build.0 = Release|Any CPU {2E61A11C-851F-47D6-A8B6-329078CF1AFC}.Release|Any CPU.Build.0 = Release|Any CPU
{1049E8B5-6965-4CCD-A989-88E44D40BF48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1049E8B5-6965-4CCD-A989-88E44D40BF48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1049E8B5-6965-4CCD-A989-88E44D40BF48}.Debug|Any CPU.Build.0 = Debug|Any CPU {1049E8B5-6965-4CCD-A989-88E44D40BF48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1049E8B5-6965-4CCD-A989-88E44D40BF48}.Release|Any CPU.ActiveCfg = Release|Any CPU {1049E8B5-6965-4CCD-A989-88E44D40BF48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1049E8B5-6965-4CCD-A989-88E44D40BF48}.Release|Any CPU.Build.0 = Release|Any CPU {1049E8B5-6965-4CCD-A989-88E44D40BF48}.Release|Any CPU.Build.0 = Release|Any CPU
{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Debug|Any CPU.Build.0 = Debug|Any CPU {02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Release|Any CPU.ActiveCfg = Release|Any CPU {02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Release|Any CPU.Build.0 = Release|Any CPU {02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}.Release|Any CPU.Build.0 = Release|Any CPU
{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Release|Any CPU.Build.0 = Release|Any CPU {0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}.Release|Any CPU.Build.0 = Release|Any CPU
{7ACBFE74-E72C-4033-9172-30512233A518}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7ACBFE74-E72C-4033-9172-30512233A518}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7ACBFE74-E72C-4033-9172-30512233A518}.Debug|Any CPU.Build.0 = Debug|Any CPU {7ACBFE74-E72C-4033-9172-30512233A518}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.ActiveCfg = Release|Any CPU {7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.Build.0 = Release|Any CPU {7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.Build.0 = Release|Any CPU
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Debug|Any CPU.Build.0 = Debug|Any CPU {12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Release|Any CPU.ActiveCfg = Release|Any CPU {12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Release|Any CPU.Build.0 = Release|Any CPU {12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@@ -1,6 +0,0 @@
@Bimix.API_HostAddress = http://localhost:5090
GET {{Bimix.API_HostAddress}}/weatherforecast/
Accept: application/json
###