├── .dockerignore ├── .idea └── .idea.Ecommerce │ └── .idea │ ├── .gitignore │ ├── .name │ ├── encodings.xml │ ├── indexLayout.xml │ └── vcs.xml ├── API ├── API.csproj ├── Controllers │ ├── AccountController.cs │ ├── BasketController.cs │ └── ProductsController.cs ├── DTOs │ ├── AddressDto.cs │ ├── LoginDto.cs │ ├── ProductDTO.cs │ ├── RegisterDto.cs │ └── UserDto.cs ├── Dockerfile ├── Ecommerce.db ├── Helpers │ ├── Pagination.cs │ └── ProductParams.cs ├── Identity.db ├── Profiles │ └── MappingProfile.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── appsettings.Development.json ├── appsettings.json ├── bin │ └── Debug │ │ └── net7.0 │ │ ├── API │ │ ├── API.deps.json │ │ ├── API.dll │ │ ├── API.pdb │ │ ├── API.runtimeconfig.json │ │ ├── AutoMapper.Extensions.Microsoft.DependencyInjection.dll │ │ ├── AutoMapper.dll │ │ ├── Core.dll │ │ ├── Core.pdb │ │ ├── Ecommerce │ │ ├── Ecommerce.deps.json │ │ ├── Ecommerce.runtimeconfig.json │ │ ├── Humanizer.dll │ │ ├── Infrastructure.dll │ │ ├── Infrastructure.pdb │ │ ├── Microsoft.AspNetCore.Authentication.JwtBearer.dll │ │ ├── Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll │ │ ├── Microsoft.AspNetCore.OpenApi.dll │ │ ├── Microsoft.Data.Sqlite.dll │ │ ├── Microsoft.EntityFrameworkCore.Abstractions.dll │ │ ├── Microsoft.EntityFrameworkCore.Design.dll │ │ ├── Microsoft.EntityFrameworkCore.Relational.dll │ │ ├── Microsoft.EntityFrameworkCore.Sqlite.dll │ │ ├── Microsoft.EntityFrameworkCore.dll │ │ ├── Microsoft.Extensions.DependencyModel.dll │ │ ├── Microsoft.IdentityModel.Abstractions.dll │ │ ├── Microsoft.IdentityModel.JsonWebTokens.dll │ │ ├── Microsoft.IdentityModel.Logging.dll │ │ ├── Microsoft.IdentityModel.Protocols.OpenIdConnect.dll │ │ ├── Microsoft.IdentityModel.Protocols.dll │ │ ├── Microsoft.IdentityModel.Tokens.dll │ │ ├── Microsoft.OpenApi.dll │ │ ├── Mono.TextTemplating.dll │ │ ├── Pipelines.Sockets.Unofficial.dll │ │ ├── SQLitePCLRaw.batteries_v2.dll │ │ ├── SQLitePCLRaw.core.dll │ │ ├── SQLitePCLRaw.provider.e_sqlite3.dll │ │ ├── StackExchange.Redis.dll │ │ ├── Swashbuckle.AspNetCore.Swagger.dll │ │ ├── Swashbuckle.AspNetCore.SwaggerGen.dll │ │ ├── Swashbuckle.AspNetCore.SwaggerUI.dll │ │ ├── System.CodeDom.dll │ │ ├── System.IdentityModel.Tokens.Jwt.dll │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── runtimes │ │ ├── alpine-arm │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── alpine-arm64 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── alpine-x64 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── browser-wasm │ │ └── nativeassets │ │ │ └── net7.0 │ │ │ └── e_sqlite3.a │ │ ├── linux-arm │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-arm64 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-armel │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-mips64 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-musl-arm │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-musl-arm64 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-musl-x64 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-ppc64le │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-s390x │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-x64 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── linux-x86 │ │ └── native │ │ │ └── libe_sqlite3.so │ │ ├── maccatalyst-arm64 │ │ └── native │ │ │ └── libe_sqlite3.dylib │ │ ├── maccatalyst-x64 │ │ └── native │ │ │ └── libe_sqlite3.dylib │ │ ├── osx-arm64 │ │ └── native │ │ │ └── libe_sqlite3.dylib │ │ ├── osx-x64 │ │ └── native │ │ │ └── libe_sqlite3.dylib │ │ ├── win-arm │ │ └── native │ │ │ └── e_sqlite3.dll │ │ ├── win-arm64 │ │ └── native │ │ │ └── e_sqlite3.dll │ │ ├── win-x64 │ │ └── native │ │ │ └── e_sqlite3.dll │ │ └── win-x86 │ │ └── native │ │ └── e_sqlite3.dll └── obj │ ├── API.csproj.EntityFrameworkCore.targets │ ├── API.csproj.nuget.dgspec.json │ ├── API.csproj.nuget.g.props │ ├── API.csproj.nuget.g.targets │ ├── Debug │ └── net7.0 │ │ ├── .NETCoreApp,Version=v7.0.AssemblyAttributes.cs │ │ ├── API.AssemblyInfo.cs │ │ ├── API.AssemblyInfoInputs.cache │ │ ├── API.GeneratedMSBuildEditorConfig.editorconfig │ │ ├── API.GlobalUsings.g.cs │ │ ├── API.MvcApplicationPartsAssemblyInfo.cache │ │ ├── API.MvcApplicationPartsAssemblyInfo.cs │ │ ├── API.assets.cache │ │ ├── API.csproj.AssemblyReference.cache │ │ ├── API.csproj.CopyComplete │ │ ├── API.csproj.CoreCompileInputs.cache │ │ ├── API.csproj.FileListAbsolute.txt │ │ ├── API.dll │ │ ├── API.genruntimeconfig.cache │ │ ├── API.pdb │ │ ├── Ecommerce.AssemblyInfo.cs │ │ ├── Ecommerce.AssemblyInfoInputs.cache │ │ ├── Ecommerce.GeneratedMSBuildEditorConfig.editorconfig │ │ ├── Ecommerce.GlobalUsings.g.cs │ │ ├── Ecommerce.MvcApplicationPartsAssemblyInfo.cache │ │ ├── Ecommerce.MvcApplicationPartsAssemblyInfo.cs │ │ ├── Ecommerce.assets.cache │ │ ├── Ecommerce.csproj.AssemblyReference.cache │ │ ├── Ecommerce.csproj.CopyComplete │ │ ├── Ecommerce.csproj.CoreCompileInputs.cache │ │ ├── Ecommerce.csproj.FileListAbsolute.txt │ │ ├── Ecommerce.dll │ │ ├── Ecommerce.genruntimeconfig.cache │ │ ├── Ecommerce.pdb │ │ ├── apphost │ │ ├── ref │ │ ├── API.dll │ │ └── Ecommerce.dll │ │ ├── refint │ │ ├── API.dll │ │ └── Ecommerce.dll │ │ ├── staticwebassets.build.json │ │ └── staticwebassets │ │ ├── msbuild.build.API.props │ │ ├── msbuild.build.Ecommerce.props │ │ ├── msbuild.buildMultiTargeting.API.props │ │ ├── msbuild.buildMultiTargeting.Ecommerce.props │ │ ├── msbuild.buildTransitive.API.props │ │ └── msbuild.buildTransitive.Ecommerce.props │ ├── Ecommerce.csproj.EntityFrameworkCore.targets │ ├── Ecommerce.csproj.nuget.dgspec.json │ ├── Ecommerce.csproj.nuget.g.props │ ├── Ecommerce.csproj.nuget.g.targets │ ├── project.assets.json │ ├── project.nuget.cache │ ├── project.packagespec.json │ └── rider.project.restore.info ├── Client ├── .editorconfig ├── .gitignore ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── tasks.json ├── README.md ├── angular.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── account │ │ │ ├── account-routing.module.ts │ │ │ ├── account.module.ts │ │ │ ├── account.service.ts │ │ │ ├── login │ │ │ │ ├── login.component.html │ │ │ │ ├── login.component.scss │ │ │ │ └── login.component.ts │ │ │ └── register │ │ │ │ ├── register.component.html │ │ │ │ ├── register.component.scss │ │ │ │ └── register.component.ts │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.scss │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── basket │ │ │ ├── basket-routing.module.ts │ │ │ ├── basket.component.html │ │ │ ├── basket.component.scss │ │ │ ├── basket.component.ts │ │ │ ├── basket.module.ts │ │ │ └── basket.service.ts │ │ ├── checkout │ │ │ ├── address │ │ │ │ ├── address.component.html │ │ │ │ ├── address.component.scss │ │ │ │ └── address.component.ts │ │ │ ├── checkout-routing.module.ts │ │ │ ├── checkout.component.html │ │ │ ├── checkout.component.scss │ │ │ ├── checkout.component.ts │ │ │ ├── checkout.module.ts │ │ │ ├── checkout.service.ts │ │ │ ├── review │ │ │ │ ├── review.component.html │ │ │ │ ├── review.component.scss │ │ │ │ └── review.component.ts │ │ │ └── shipment │ │ │ │ ├── shipment.component.html │ │ │ │ ├── shipment.component.scss │ │ │ │ └── shipment.component.ts │ │ ├── core │ │ │ ├── connection-refused │ │ │ │ ├── connection-refused.component.html │ │ │ │ ├── connection-refused.component.scss │ │ │ │ └── connection-refused.component.ts │ │ │ ├── core.module.ts │ │ │ ├── guards │ │ │ │ └── auth.guard.ts │ │ │ ├── interceptor │ │ │ │ ├── error.interceptor.ts │ │ │ │ └── loading.interceptor.ts │ │ │ ├── nav-bar │ │ │ │ ├── nav-bar.component.html │ │ │ │ ├── nav-bar.component.scss │ │ │ │ └── nav-bar.component.ts │ │ │ ├── not-found │ │ │ │ ├── not-found.component.html │ │ │ │ ├── not-found.component.scss │ │ │ │ └── not-found.component.ts │ │ │ ├── section-header │ │ │ │ ├── section-header.component.html │ │ │ │ ├── section-header.component.scss │ │ │ │ └── section-header.component.ts │ │ │ ├── server-error │ │ │ │ ├── server-error.component.html │ │ │ │ ├── server-error.component.scss │ │ │ │ └── server-error.component.ts │ │ │ └── services │ │ │ │ └── loading.service.ts │ │ ├── home │ │ │ ├── home.component.html │ │ │ ├── home.component.scss │ │ │ ├── home.component.ts │ │ │ └── home.module.ts │ │ ├── shared │ │ │ ├── components │ │ │ │ ├── pagination-header │ │ │ │ │ ├── pagination-header.component.html │ │ │ │ │ ├── pagination-header.component.scss │ │ │ │ │ └── pagination-header.component.ts │ │ │ │ └── pagination │ │ │ │ │ ├── pagination.component.html │ │ │ │ │ ├── pagination.component.scss │ │ │ │ │ └── pagination.component.ts │ │ │ ├── models │ │ │ │ ├── Pagination.ts │ │ │ │ ├── Product.ts │ │ │ │ ├── address.ts │ │ │ │ ├── basket.ts │ │ │ │ ├── brand.ts │ │ │ │ ├── deliveryOption.ts │ │ │ │ ├── storeParams.ts │ │ │ │ ├── type.ts │ │ │ │ └── user.ts │ │ │ ├── order-totals │ │ │ │ ├── order-totals.component.html │ │ │ │ ├── order-totals.component.scss │ │ │ │ └── order-totals.component.ts │ │ │ └── shared.module.ts │ │ └── store │ │ │ ├── product-details │ │ │ ├── product-details.component.html │ │ │ ├── product-details.component.scss │ │ │ └── product-details.component.ts │ │ │ ├── product-item │ │ │ ├── product-item.component.html │ │ │ ├── product-item.component.scss │ │ │ └── product-item.component.ts │ │ │ ├── store-routing.module.ts │ │ │ ├── store.component.html │ │ │ ├── store.component.scss │ │ │ ├── store.component.ts │ │ │ ├── store.module.ts │ │ │ └── store.service.ts │ ├── assets │ │ ├── .gitkeep │ │ └── images │ │ │ ├── bslide1.jpg │ │ │ ├── bslide2.jpg │ │ │ ├── bslide3.jpg │ │ │ ├── connection-refused.png │ │ │ ├── hero1.jpg │ │ │ ├── hero2.jpg │ │ │ ├── hero3.jpg │ │ │ ├── hero4.jpg │ │ │ ├── hero5.jpg │ │ │ ├── hero6.jpg │ │ │ ├── logo.png │ │ │ ├── page-not-found.png │ │ │ ├── products │ │ │ ├── Nike-Football-1.png │ │ │ ├── Nike-Football-2.png │ │ │ ├── Nike-Football-3.png │ │ │ ├── adidas_football-1.png │ │ │ ├── adidas_football-2.png │ │ │ ├── adidas_football-3.png │ │ │ ├── adidas_shoe-1.png │ │ │ ├── adidas_shoe-2.png │ │ │ ├── adidas_shoe-3.png │ │ │ ├── asics_shoe-1.png │ │ │ ├── asics_shoe-2.png │ │ │ ├── asics_shoe-3.png │ │ │ ├── babolat-kitback-1.png │ │ │ ├── babolat-kitback-2.png │ │ │ ├── babolat-kitback-3.png │ │ │ ├── babolat-racket-1.png │ │ │ ├── babolat-racket-2.png │ │ │ ├── babolat-racket-3.png │ │ │ ├── babolat.png │ │ │ ├── babolat_shoe-1.png │ │ │ ├── babolat_shoe-2.png │ │ │ ├── babolat_shoe-3.png │ │ │ ├── puma_shoe-1.png │ │ │ ├── puma_shoe-2.png │ │ │ ├── puma_shoe-3.png │ │ │ ├── victor-racket-1.png │ │ │ ├── victor-racket-2.png │ │ │ ├── victor-racket-3.png │ │ │ ├── victor_shoe-1.png │ │ │ ├── victor_shoe-2.png │ │ │ ├── yonex-badminton-1.png │ │ │ ├── yonex-badminton-2.png │ │ │ ├── yonex-badminton-3.png │ │ │ ├── yonex-kitback-1.png │ │ │ ├── yonex-kitback-2.png │ │ │ ├── yonex-kitback-3.png │ │ │ ├── yonex-racket-1.png │ │ │ ├── yonex-racket-2.png │ │ │ ├── yonex-racket-3.png │ │ │ ├── yonex_shoe-1.png │ │ │ ├── yonex_shoe-2.png │ │ │ └── yonex_shoe-3.png │ │ │ └── server-error.png │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ └── styles.scss ├── tsconfig.app.json ├── tsconfig.json └── tsconfig.spec.json ├── Core ├── Core.csproj ├── Entities │ ├── BaseEntity.cs │ ├── Basket.cs │ ├── BasketItem.cs │ ├── Identity │ │ ├── Address.cs │ │ ├── ApplicationUser.cs │ │ └── TokenSettings.cs │ ├── Product.cs │ ├── ProductBrand.cs │ └── ProductType.cs ├── Enums │ └── OrderBy.cs ├── Interfaces │ ├── IBasketRepository.cs │ ├── IProductRepository.cs │ ├── IRepository.cs │ └── ITokenGenerationService.cs ├── Specifications │ └── ISpecification.cs ├── bin │ └── Debug │ │ └── net7.0 │ │ ├── Core.deps.json │ │ ├── Core.dll │ │ └── Core.pdb └── obj │ ├── Core.csproj.nuget.dgspec.json │ ├── Core.csproj.nuget.g.props │ ├── Core.csproj.nuget.g.targets │ ├── Debug │ └── net7.0 │ │ ├── .NETCoreApp,Version=v7.0.AssemblyAttributes.cs │ │ ├── Core.AssemblyInfo.cs │ │ ├── Core.AssemblyInfoInputs.cache │ │ ├── Core.GeneratedMSBuildEditorConfig.editorconfig │ │ ├── Core.GlobalUsings.g.cs │ │ ├── Core.assets.cache │ │ ├── Core.csproj.AssemblyReference.cache │ │ ├── Core.csproj.CoreCompileInputs.cache │ │ ├── Core.csproj.FileListAbsolute.txt │ │ ├── Core.dll │ │ ├── Core.pdb │ │ ├── ref │ │ └── Core.dll │ │ └── refint │ │ └── Core.dll │ ├── project.assets.json │ ├── project.nuget.cache │ ├── project.packagespec.json │ └── rider.project.restore.info ├── Ecommerce.sln ├── Infrastructure ├── Data │ ├── EcommerceContext.cs │ ├── EcommerceContextSeed.cs │ ├── Repositories │ │ ├── BasketRepository.cs │ │ ├── ProductRepository.cs │ │ └── Repository.cs │ ├── SeedData │ │ ├── brands.json │ │ ├── products.json │ │ └── types.json │ └── Specifications │ │ ├── BaseSpecification.cs │ │ ├── ProductCountSpecification.cs │ │ └── ProductWithTypesAndBrandSpecification.cs ├── Exceptions │ └── NotFoundException.cs ├── Identity │ ├── ApplicationIdentityDbContext.cs │ ├── ApplicationIdentityDbContextSeed.cs │ └── Migrations │ │ ├── 20231121104734_InitialIdentityMigration.Designer.cs │ │ ├── 20231121104734_InitialIdentityMigration.cs │ │ ├── 20231121134028_IdentityMigration.Designer.cs │ │ ├── 20231121134028_IdentityMigration.cs │ │ ├── 20231121135735_ModifiedIdentity.Designer.cs │ │ ├── 20231121135735_ModifiedIdentity.cs │ │ └── ApplicationIdentityDbContextModelSnapshot.cs ├── Infrastructure.csproj ├── Migrations │ ├── 20230930070142_InitialCreate.Designer.cs │ ├── 20230930070142_InitialCreate.cs │ └── EcommerceContextModelSnapshot.cs ├── Services │ └── TokenGenerationService.cs ├── bin │ └── Debug │ │ └── net7.0 │ │ ├── Core.dll │ │ ├── Core.pdb │ │ ├── Infrastructure.deps.json │ │ ├── Infrastructure.dll │ │ ├── Infrastructure.pdb │ │ └── Infrastructure.runtimeconfig.json └── obj │ ├── Debug │ └── net7.0 │ │ ├── .NETCoreApp,Version=v7.0.AssemblyAttributes.cs │ │ ├── Infrastructure.AssemblyInfo.cs │ │ ├── Infrastructure.AssemblyInfoInputs.cache │ │ ├── Infrastructure.GeneratedMSBuildEditorConfig.editorconfig │ │ ├── Infrastructure.GlobalUsings.g.cs │ │ ├── Infrastructure.assets.cache │ │ ├── Infrastructure.csproj.AssemblyReference.cache │ │ ├── Infrastructure.csproj.CopyComplete │ │ ├── Infrastructure.csproj.CoreCompileInputs.cache │ │ ├── Infrastructure.csproj.FileListAbsolute.txt │ │ ├── Infrastructure.dll │ │ ├── Infrastructure.genruntimeconfig.cache │ │ ├── Infrastructure.pdb │ │ ├── ref │ │ └── Infrastructure.dll │ │ └── refint │ │ └── Infrastructure.dll │ ├── Infrastructure.csproj.EntityFrameworkCore.targets │ ├── Infrastructure.csproj.nuget.dgspec.json │ ├── Infrastructure.csproj.nuget.g.props │ ├── Infrastructure.csproj.nuget.g.targets │ ├── project.assets.json │ ├── project.nuget.cache │ ├── project.packagespec.json │ └── rider.project.restore.info ├── docker-compose.yaml └── readme.md /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.dockerignore 2 | **/.env 3 | **/.git 4 | **/.gitignore 5 | **/.project 6 | **/.settings 7 | **/.toolstarget 8 | **/.vs 9 | **/.vscode 10 | **/.idea 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /.idea/.idea.Ecommerce/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /contentModel.xml 6 | /projectSettingsUpdater.xml 7 | /.idea.Ecommerce.iml 8 | /modules.xml 9 | # Editor-based HTTP Client requests 10 | /httpRequests/ 11 | # Datasource local storage ignored files 12 | /dataSources/ 13 | /dataSources.local.xml 14 | -------------------------------------------------------------------------------- /.idea/.idea.Ecommerce/.idea/.name: -------------------------------------------------------------------------------- 1 | Ecommerce -------------------------------------------------------------------------------- /.idea/.idea.Ecommerce/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/.idea.Ecommerce/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/.idea.Ecommerce/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /API/API.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | Linux 8 | API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | all 19 | runtime; build; native; contentfiles; analyzers; buildtransitive 20 | 21 | 22 | 23 | 24 | 25 | .dockerignore 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /API/Controllers/BasketController.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | using Core.Interfaces; 3 | using Microsoft.AspNetCore.Mvc; 4 | 5 | namespace API.Controllers 6 | { 7 | [ApiController] 8 | [Route("api/[controller]")] 9 | public class BasketController : ControllerBase 10 | { 11 | private readonly IBasketRepository _basketRepository; 12 | 13 | public BasketController(IBasketRepository basketRepository) 14 | { 15 | _basketRepository = basketRepository; 16 | } 17 | 18 | [HttpGet("{basketId}")] 19 | public async Task> GetBasket(string basketId) 20 | { 21 | var basket = await _basketRepository.GetBasketAsync(basketId); 22 | return Ok(basket); 23 | } 24 | 25 | [HttpPost] 26 | public async Task> UpdateBasket(Basket basket) 27 | { 28 | var updatedBasket = await _basketRepository.UpdateBasketAsync(basket); 29 | return Ok(updatedBasket); 30 | } 31 | 32 | [HttpDelete("{basketId}")] 33 | public async Task> DeleteBasket(string basketId) 34 | { 35 | var result = await _basketRepository.DeleteBasketAsync(basketId); 36 | return Ok(result); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /API/DTOs/AddressDto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace API.DTOs; 4 | public class AddressDto 5 | { 6 | [Required(ErrorMessage = "First Name is required")] 7 | public string Fname { get; set; } 8 | 9 | [Required(ErrorMessage = "Last Name is required")] 10 | public string Lname { get; set; } 11 | 12 | [Required(ErrorMessage = "Street is required")] 13 | public string Street { get; set; } 14 | 15 | [Required(ErrorMessage = "City is required")] 16 | public string City { get; set; } 17 | 18 | [Required(ErrorMessage = "State is required")] 19 | public string State { get; set; } 20 | 21 | [Required(ErrorMessage = "Zip Code is required")] 22 | [RegularExpression(@"^\d{5}(?:-\d{4})?$", ErrorMessage = "Invalid ZIP code")] 23 | public string ZipCode { get; set; } 24 | } -------------------------------------------------------------------------------- /API/DTOs/LoginDto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace API.DTOs; 4 | public class LoginDto 5 | { 6 | [Required(ErrorMessage = "Email is required")] 7 | [EmailAddress(ErrorMessage = "Invalid email address")] 8 | public string Email { get; set; } 9 | 10 | [Required(ErrorMessage = "Password is required")] 11 | [DataType(DataType.Password)] 12 | public string Password { get; set; } 13 | 14 | public bool RememberMe { get; set; } 15 | } -------------------------------------------------------------------------------- /API/DTOs/ProductDTO.cs: -------------------------------------------------------------------------------- 1 | namespace API.DTOs; 2 | 3 | public class ProductDTO 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string Description { get; set; } 8 | public double Price { get; set; } 9 | public string PictureUrl { get; set; } 10 | public string ProductType { get; set; } 11 | public string ProductBrand { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /API/DTOs/RegisterDto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace API.DTOs; 4 | 5 | public class RegisterDto 6 | { 7 | [Required(ErrorMessage = "Email is required")] 8 | [EmailAddress(ErrorMessage = "Invalid email address")] 9 | public string Email { get; set; } 10 | 11 | [Required(ErrorMessage = "Password is required")] 12 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 13 | [DataType(DataType.Password)] 14 | public string Password { get; set; } 15 | 16 | [Required(ErrorMessage = "Confirm Password is required")] 17 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 18 | [DataType(DataType.Password)] 19 | public string ConfirmPassword { get; set; } 20 | 21 | [Required(ErrorMessage = "Display Name is required")] 22 | public string DisplayName { get; set; } 23 | } -------------------------------------------------------------------------------- /API/DTOs/UserDto.cs: -------------------------------------------------------------------------------- 1 | namespace API.DTOs; 2 | 3 | public class UserDto 4 | { 5 | public string Email { get; set; } 6 | public string DisplayName { get; set; } 7 | public string Token { get; set; } 8 | } -------------------------------------------------------------------------------- /API/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | EXPOSE 443 5 | 6 | FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build 7 | WORKDIR /src 8 | COPY ["Ecommerce/API.csproj", "Ecommerce/"] 9 | RUN dotnet restore "Ecommerce/API.csproj" 10 | COPY . . 11 | WORKDIR "/src/Ecommerce" 12 | RUN dotnet build "API.csproj" -c Release -o /app/build 13 | 14 | FROM build AS publish 15 | RUN dotnet publish "API.csproj" -c Release -o /app/publish /p:UseAppHost=false 16 | 17 | FROM base AS final 18 | WORKDIR /app 19 | COPY --from=publish /app/publish . 20 | ENTRYPOINT ["dotnet", "API.dll"] 21 | -------------------------------------------------------------------------------- /API/Ecommerce.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/Ecommerce.db -------------------------------------------------------------------------------- /API/Helpers/Pagination.cs: -------------------------------------------------------------------------------- 1 | namespace API.Helpers 2 | { 3 | public class Pagination where T : class 4 | { 5 | public Pagination(int pageIndex, int pageSize, int totalItems, IReadOnlyList data) 6 | { 7 | PageIndex = pageIndex; 8 | PageSize = pageSize; 9 | TotalItems = totalItems; 10 | Data = data; 11 | } 12 | 13 | public int PageIndex { get; } 14 | public int PageSize { get; } 15 | public int TotalItems { get; } 16 | public IReadOnlyList Data { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /API/Helpers/ProductParams.cs: -------------------------------------------------------------------------------- 1 | namespace API.Helpers 2 | { 3 | public class ProductParams 4 | { 5 | public string? Sort { get; set; } = "NameAsc"; 6 | public int? ProductBrandId { get; set; } 7 | public int? ProductTypeId { get; set; } 8 | public int Skip { get; set; } = 0; 9 | public int Take { get; set; } = 10; 10 | public string? Search { get; set; } 11 | public int PageIndex { get; set; } = 1; // Default to the first page 12 | public int PageSize { get; set; } = 10; // Default page size 13 | } 14 | } -------------------------------------------------------------------------------- /API/Identity.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/Identity.db -------------------------------------------------------------------------------- /API/Profiles/MappingProfile.cs: -------------------------------------------------------------------------------- 1 | using API.DTOs; 2 | using AutoMapper; 3 | using Core.Entities; 4 | using Core.Entities.Identity; 5 | 6 | namespace API.Profiles; 7 | 8 | public class MappingProfile : Profile 9 | { 10 | public MappingProfile() 11 | { 12 | CreateMap() 13 | .ForMember(dest => dest.ProductBrand, opt => opt.MapFrom(src => src.ProductBrand.Name)) 14 | .ForMember(dest => dest.ProductType, opt => opt.MapFrom(src => src.ProductType.Name)); 15 | CreateMap() 16 | .ForMember(dest => dest.UserName, opt => opt.MapFrom(src => src.Email)); 17 | 18 | CreateMap(); 19 | } 20 | } -------------------------------------------------------------------------------- /API/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:64966", 8 | "sslPort": 44309 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5103", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7050;http://localhost:5103", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "ConnectionStrings": { 9 | "DefaultConnection": "Data Source=Ecommerce.db", 10 | "IdentityConnection": "Data Source=Identity.db", 11 | "Redis": "localhost" 12 | }, 13 | "TokenSettings": { 14 | "Key": "1YvFvFn3x7eJ0jyRzpSDbGOTze7FbLPhR4lFslfZXG6tG5r7tnMyLrVNlJIswLWS", 15 | "Issuer": "http://localhost:5103/", 16 | "Audience": "API" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/API: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/API -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/API.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/API.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/API.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/API.pdb -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/API.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net7.0", 4 | "frameworks": [ 5 | { 6 | "name": "Microsoft.NETCore.App", 7 | "version": "7.0.0" 8 | }, 9 | { 10 | "name": "Microsoft.AspNetCore.App", 11 | "version": "7.0.0" 12 | } 13 | ], 14 | "configProperties": { 15 | "System.GC.Server": true, 16 | "System.Reflection.NullabilityInfoContext.IsSupported": true, 17 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/AutoMapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/AutoMapper.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Core.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Core.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Core.pdb -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Ecommerce: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Ecommerce -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Ecommerce.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net7.0", 4 | "frameworks": [ 5 | { 6 | "name": "Microsoft.NETCore.App", 7 | "version": "7.0.0" 8 | }, 9 | { 10 | "name": "Microsoft.AspNetCore.App", 11 | "version": "7.0.0" 12 | } 13 | ], 14 | "configProperties": { 15 | "System.GC.Server": true, 16 | "System.Reflection.NullabilityInfoContext.IsSupported": true, 17 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Humanizer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Humanizer.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Infrastructure.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Infrastructure.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Infrastructure.pdb -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.AspNetCore.OpenApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.AspNetCore.OpenApi.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.Data.Sqlite.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.Data.Sqlite.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Abstractions.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Design.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Design.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Relational.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Relational.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Sqlite.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.Sqlite.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.EntityFrameworkCore.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.Extensions.DependencyModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.Extensions.DependencyModel.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.IdentityModel.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.IdentityModel.Abstractions.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.IdentityModel.JsonWebTokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.IdentityModel.JsonWebTokens.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.IdentityModel.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.IdentityModel.Logging.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.IdentityModel.Protocols.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.IdentityModel.Protocols.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.IdentityModel.Tokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.IdentityModel.Tokens.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Microsoft.OpenApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Microsoft.OpenApi.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Mono.TextTemplating.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Mono.TextTemplating.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Pipelines.Sockets.Unofficial.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Pipelines.Sockets.Unofficial.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/SQLitePCLRaw.batteries_v2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/SQLitePCLRaw.batteries_v2.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/SQLitePCLRaw.core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/SQLitePCLRaw.core.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/SQLitePCLRaw.provider.e_sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/SQLitePCLRaw.provider.e_sqlite3.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/StackExchange.Redis.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/StackExchange.Redis.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Swashbuckle.AspNetCore.Swagger.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Swashbuckle.AspNetCore.Swagger.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Swashbuckle.AspNetCore.SwaggerGen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Swashbuckle.AspNetCore.SwaggerGen.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/Swashbuckle.AspNetCore.SwaggerUI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/Swashbuckle.AspNetCore.SwaggerUI.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/System.CodeDom.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/System.CodeDom.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/System.IdentityModel.Tokens.Jwt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/System.IdentityModel.Tokens.Jwt.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "ConnectionStrings": { 9 | "DefaultConnection": "Data Source=Ecommerce.db", 10 | "IdentityConnection": "Data Source=Identity.db", 11 | "Redis": "localhost" 12 | }, 13 | "TokenSettings": { 14 | "Key": "1YvFvFn3x7eJ0jyRzpSDbGOTze7FbLPhR4lFslfZXG6tG5r7tnMyLrVNlJIswLWS", 15 | "Issuer": "http://localhost:5103/", 16 | "Audience": "API" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/alpine-arm/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/alpine-arm/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/alpine-arm64/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/alpine-arm64/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/alpine-x64/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/alpine-x64/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/browser-wasm/nativeassets/net7.0/e_sqlite3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/browser-wasm/nativeassets/net7.0/e_sqlite3.a -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-arm/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-arm/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-arm64/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-arm64/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-armel/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-armel/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-mips64/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-mips64/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-musl-arm/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-musl-arm/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-musl-arm64/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-musl-arm64/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-musl-x64/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-musl-x64/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-ppc64le/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-ppc64le/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-s390x/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-s390x/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-x64/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-x64/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/linux-x86/native/libe_sqlite3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/linux-x86/native/libe_sqlite3.so -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/maccatalyst-arm64/native/libe_sqlite3.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/maccatalyst-arm64/native/libe_sqlite3.dylib -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/maccatalyst-x64/native/libe_sqlite3.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/maccatalyst-x64/native/libe_sqlite3.dylib -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/osx-arm64/native/libe_sqlite3.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/osx-arm64/native/libe_sqlite3.dylib -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/osx-x64/native/libe_sqlite3.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/osx-x64/native/libe_sqlite3.dylib -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/win-arm/native/e_sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/win-arm/native/e_sqlite3.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/win-arm64/native/e_sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/win-arm64/native/e_sqlite3.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/win-x64/native/e_sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/win-x64/native/e_sqlite3.dll -------------------------------------------------------------------------------- /API/bin/Debug/net7.0/runtimes/win-x86/native/e_sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/bin/Debug/net7.0/runtimes/win-x86/native/e_sqlite3.dll -------------------------------------------------------------------------------- /API/obj/API.csproj.EntityFrameworkCore.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /API/obj/API.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/.NETCoreApp,Version=v7.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")] 5 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: System.Reflection.AssemblyCompanyAttribute("API")] 14 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 17 | [assembly: System.Reflection.AssemblyProductAttribute("API")] 18 | [assembly: System.Reflection.AssemblyTitleAttribute("API")] 19 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 20 | 21 | // Generated by the MSBuild WriteCodeFragment class. 22 | 23 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 50d825b9c7e6536cbdf8733abffce3e8e276d845 2 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net7.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = true 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = API 11 | build_property.RootNamespace = API 12 | build_property.ProjectDir = /Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/API/ 13 | build_property.RazorLangVersion = 7.0 14 | build_property.SupportLocalizedComponentNames = 15 | build_property.GenerateRazorMetadataSourceChecksumAttributes = 16 | build_property.MSBuildProjectDirectory = /Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/API 17 | build_property._RazorSourceGeneratorDebug = 18 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::Microsoft.AspNetCore.Builder; 3 | global using global::Microsoft.AspNetCore.Hosting; 4 | global using global::Microsoft.AspNetCore.Http; 5 | global using global::Microsoft.AspNetCore.Routing; 6 | global using global::Microsoft.Extensions.Configuration; 7 | global using global::Microsoft.Extensions.DependencyInjection; 8 | global using global::Microsoft.Extensions.Hosting; 9 | global using global::Microsoft.Extensions.Logging; 10 | global using global::System; 11 | global using global::System.Collections.Generic; 12 | global using global::System.IO; 13 | global using global::System.Linq; 14 | global using global::System.Net.Http; 15 | global using global::System.Net.Http.Json; 16 | global using global::System.Threading; 17 | global using global::System.Threading.Tasks; 18 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.MvcApplicationPartsAssemblyInfo.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/API.MvcApplicationPartsAssemblyInfo.cache -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.MvcApplicationPartsAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.OpenApi")] 14 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")] 15 | 16 | // Generated by the MSBuild WriteCodeFragment class. 17 | 18 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/API.assets.cache -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/API.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/API.csproj.CopyComplete -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 42a30587108effa269289349c8b8af98f885c7e7 2 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/API.dll -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | e524585d731e22c3abceb2ebb0d9a99933dba95f 2 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/API.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/API.pdb -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: System.Reflection.AssemblyCompanyAttribute("Ecommerce")] 14 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 17 | [assembly: System.Reflection.AssemblyProductAttribute("Ecommerce")] 18 | [assembly: System.Reflection.AssemblyTitleAttribute("Ecommerce")] 19 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 20 | 21 | // Generated by the MSBuild WriteCodeFragment class. 22 | 23 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 89d24da1afc97cd348da4ff93c75b2c6c8c00b23 2 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net7.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = true 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = Ecommerce 11 | build_property.RootNamespace = Ecommerce 12 | build_property.ProjectDir = /Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/Ecommerce/Ecommerce/ 13 | build_property.RazorLangVersion = 7.0 14 | build_property.SupportLocalizedComponentNames = 15 | build_property.GenerateRazorMetadataSourceChecksumAttributes = 16 | build_property.MSBuildProjectDirectory = /Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/Ecommerce/Ecommerce 17 | build_property._RazorSourceGeneratorDebug = 18 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::Microsoft.AspNetCore.Builder; 3 | global using global::Microsoft.AspNetCore.Hosting; 4 | global using global::Microsoft.AspNetCore.Http; 5 | global using global::Microsoft.AspNetCore.Routing; 6 | global using global::Microsoft.Extensions.Configuration; 7 | global using global::Microsoft.Extensions.DependencyInjection; 8 | global using global::Microsoft.Extensions.Hosting; 9 | global using global::Microsoft.Extensions.Logging; 10 | global using global::System; 11 | global using global::System.Collections.Generic; 12 | global using global::System.IO; 13 | global using global::System.Linq; 14 | global using global::System.Net.Http; 15 | global using global::System.Net.Http.Json; 16 | global using global::System.Threading; 17 | global using global::System.Threading.Tasks; 18 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.MvcApplicationPartsAssemblyInfo.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/Ecommerce.MvcApplicationPartsAssemblyInfo.cache -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.MvcApplicationPartsAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.OpenApi")] 14 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")] 15 | 16 | // Generated by the MSBuild WriteCodeFragment class. 17 | 18 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/Ecommerce.assets.cache -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/Ecommerce.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/Ecommerce.csproj.CopyComplete -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | b09055b76e7bffdbdb44bc669273bda413a6f7b9 2 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/Ecommerce.dll -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | 5070805a36a035095d3caa6efdb91fe9ebf8ef29 2 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/Ecommerce.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/Ecommerce.pdb -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/apphost: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/apphost -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/ref/API.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/ref/API.dll -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/ref/Ecommerce.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/ref/Ecommerce.dll -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/refint/API.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/refint/API.dll -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/refint/Ecommerce.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/API/obj/Debug/net7.0/refint/Ecommerce.dll -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/staticwebassets.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 1, 3 | "Hash": "bUm1vPqwZHJejLhtNIB7WgmMI8ngxypkYrDApg4MvgQ=", 4 | "Source": "API", 5 | "BasePath": "_content/API", 6 | "Mode": "Default", 7 | "ManifestType": "Build", 8 | "ReferencedProjectsConfiguration": [], 9 | "DiscoveryPatterns": [], 10 | "Assets": [] 11 | } -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/staticwebassets/msbuild.build.API.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/staticwebassets/msbuild.build.Ecommerce.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/staticwebassets/msbuild.buildMultiTargeting.API.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/staticwebassets/msbuild.buildMultiTargeting.Ecommerce.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/staticwebassets/msbuild.buildTransitive.API.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /API/obj/Debug/net7.0/staticwebassets/msbuild.buildTransitive.Ecommerce.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /API/obj/Ecommerce.csproj.EntityFrameworkCore.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /API/obj/Ecommerce.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /API/obj/project.packagespec.json: -------------------------------------------------------------------------------- 1 | "restore":{"projectUniqueName":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/API/API.csproj","projectName":"API","projectPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/API/API.csproj","outputPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/API/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net7.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net7.0":{"targetAlias":"net7.0","projectReferences":{"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Infrastructure/Infrastructure.csproj":{"projectPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Infrastructure/Infrastructure.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net7.0":{"targetAlias":"net7.0","dependencies":{"AutoMapper":{"target":"Package","version":"[12.0.1, )"},"AutoMapper.Extensions.Microsoft.DependencyInjection":{"target":"Package","version":"[12.0.1, )"},"Microsoft.AspNetCore.Authentication.JwtBearer":{"target":"Package","version":"[6.0.25, )"},"Microsoft.AspNetCore.OpenApi":{"target":"Package","version":"[7.0.11, )"},"Microsoft.EntityFrameworkCore.Design":{"include":"Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive","suppressParent":"All","target":"Package","version":"[7.0.11, )"},"Swashbuckle.AspNetCore":{"target":"Package","version":"[6.5.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/7.0.401/RuntimeIdentifierGraph.json"}} -------------------------------------------------------------------------------- /API/obj/rider.project.restore.info: -------------------------------------------------------------------------------- 1 | 17010021381317103 -------------------------------------------------------------------------------- /Client/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /Client/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | .history/* 30 | 31 | # Miscellaneous 32 | /.angular/cache 33 | .sass-cache/ 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | testem.log 38 | /typings 39 | 40 | # System files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /Client/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 3 | "recommendations": ["angular.ng-template"] 4 | } 5 | -------------------------------------------------------------------------------- /Client/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "ng serve", 7 | "type": "chrome", 8 | "request": "launch", 9 | "preLaunchTask": "npm: start", 10 | "url": "http://localhost:4200/" 11 | }, 12 | { 13 | "name": "ng test", 14 | "type": "chrome", 15 | "request": "launch", 16 | "preLaunchTask": "npm: test", 17 | "url": "http://localhost:9876/debug.html" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /Client/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 3 | "version": "2.0.0", 4 | "tasks": [ 5 | { 6 | "type": "npm", 7 | "script": "start", 8 | "isBackground": true, 9 | "problemMatcher": { 10 | "owner": "typescript", 11 | "pattern": "$tsc", 12 | "background": { 13 | "activeOnStart": true, 14 | "beginsPattern": { 15 | "regexp": "(.*?)" 16 | }, 17 | "endsPattern": { 18 | "regexp": "bundle generation complete" 19 | } 20 | } 21 | } 22 | }, 23 | { 24 | "type": "npm", 25 | "script": "test", 26 | "isBackground": true, 27 | "problemMatcher": { 28 | "owner": "typescript", 29 | "pattern": "$tsc", 30 | "background": { 31 | "activeOnStart": true, 32 | "beginsPattern": { 33 | "regexp": "(.*?)" 34 | }, 35 | "endsPattern": { 36 | "regexp": "bundle generation complete" 37 | } 38 | } 39 | } 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /Client/README.md: -------------------------------------------------------------------------------- 1 | # Client 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.7. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 28 | -------------------------------------------------------------------------------- /Client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "watch": "ng build --watch --configuration development", 9 | "test": "ng test" 10 | }, 11 | "private": true, 12 | "dependencies": { 13 | "@angular/animations": "^16.2.0", 14 | "@angular/cdk": "^16.2.12", 15 | "@angular/common": "^16.2.0", 16 | "@angular/compiler": "^16.2.0", 17 | "@angular/core": "^16.2.0", 18 | "@angular/forms": "^16.2.0", 19 | "@angular/material": "^16.2.12", 20 | "@angular/platform-browser": "^16.2.0", 21 | "@angular/platform-browser-dynamic": "^16.2.0", 22 | "@angular/router": "^16.2.0", 23 | "@paralleldrive/cuid2": "^2.2.2", 24 | "bootstrap": "^5.2.3", 25 | "font-awesome": "^4.7.0", 26 | "ngx-bootstrap": "^11.0.2", 27 | "ngx-spinner": "^16.0.2", 28 | "ngx-toastr": "^17.0.2", 29 | "rxjs": "~7.8.0", 30 | "tslib": "^2.3.0", 31 | "xng-breadcrumb": "^10.0.1", 32 | "zone.js": "~0.13.0" 33 | }, 34 | "devDependencies": { 35 | "@angular-devkit/build-angular": "^16.2.7", 36 | "@angular/cli": "^16.2.7", 37 | "@angular/compiler-cli": "^16.2.0", 38 | "@types/jasmine": "~4.3.0", 39 | "jasmine-core": "~4.6.0", 40 | "karma": "~6.4.0", 41 | "karma-chrome-launcher": "~3.2.0", 42 | "karma-coverage": "~2.2.0", 43 | "karma-jasmine": "~5.1.0", 44 | "karma-jasmine-html-reporter": "~2.1.0", 45 | "typescript": "~5.1.3" 46 | } 47 | } -------------------------------------------------------------------------------- /Client/src/app/account/account-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { LoginComponent } from './login/login.component'; 4 | import { RegisterComponent } from './register/register.component'; 5 | 6 | const routes: Routes = [ 7 | {path:'login', component: LoginComponent, data:{breadcrumb: 'Login'}}, 8 | {path:'register', component: RegisterComponent, data:{breadcrumb: 'Register'}} 9 | ] 10 | 11 | @NgModule({ 12 | declarations: [], 13 | imports: [ 14 | RouterModule.forChild(routes) 15 | ] 16 | }) 17 | export class AccountRoutingModule { } 18 | -------------------------------------------------------------------------------- /Client/src/app/account/account.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { LoginComponent } from './login/login.component'; 3 | import { RegisterComponent } from './register/register.component'; 4 | import { AccountRoutingModule } from './account-routing.module'; 5 | import { SharedModule } from '../shared/shared.module'; 6 | import { CommonModule } from '@angular/common'; 7 | 8 | 9 | 10 | @NgModule({ 11 | declarations: [ 12 | LoginComponent, 13 | RegisterComponent 14 | ], 15 | imports: [ 16 | CommonModule, 17 | AccountRoutingModule, 18 | SharedModule 19 | ] 20 | }) 21 | export class AccountModule { } 22 | -------------------------------------------------------------------------------- /Client/src/app/account/login/login.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

Login

7 |
8 |
9 |
10 |
11 | 12 | 13 |
14 | Email is required. 15 |
16 |
17 | Invalid email address. 18 |
19 |
20 |
21 | 22 | 23 |
24 | Password is required. 25 |
26 |
27 |
28 | 29 | 30 |
31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /Client/src/app/account/login/login.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/account/login/login.component.scss -------------------------------------------------------------------------------- /Client/src/app/account/login/login.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 3 | import { AccountService } from '../account.service'; 4 | import { ActivatedRoute, Router } from '@angular/router'; 5 | import { LoadingService } from 'src/app/core/services/loading.service'; 6 | 7 | @Component({ 8 | selector: 'app-login', 9 | templateUrl: './login.component.html', 10 | styleUrls: ['./login.component.scss'] 11 | }) 12 | export class LoginComponent { 13 | loginForm: FormGroup; 14 | loading: boolean = false; 15 | 16 | constructor( 17 | private formBuilder: FormBuilder, 18 | private accountService: AccountService, 19 | private loadingService: LoadingService, 20 | private router: Router, 21 | private route: ActivatedRoute 22 | ) { 23 | // Get returnUrl from route parameters or default to '/' 24 | this.route.queryParams.subscribe(params => { 25 | this.accountService.redirectUrl = params['returnUrl'] || '/'; 26 | }); 27 | this.loginForm = this.formBuilder.group({ 28 | email: ['', [Validators.required, Validators.email]], 29 | password: ['', Validators.required], 30 | rememberMe: [false] 31 | }); 32 | } 33 | 34 | onSubmit() { 35 | if (this.loginForm.valid) { 36 | this.loadingService.loading(); 37 | 38 | this.accountService.login(this.loginForm.value).subscribe({ 39 | next: (user) => { // user will be the emitted value from the Observable 40 | this.loadingService.idle(); 41 | // Redirect to the stored returnUrl or to the store page if no returnUrl is available 42 | const redirect = this.accountService.redirectUrl ? this.accountService.redirectUrl : '/store'; 43 | this.router.navigateByUrl(redirect); // Use navigateByUrl to handle complex URLs 44 | this.accountService.redirectUrl = null; // Clear the stored URL 45 | }, 46 | error: () => { 47 | this.loadingService.idle(); 48 | // Handle login error 49 | } 50 | // If there's a completion logic, you can include a complete property here 51 | }); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Client/src/app/account/register/register.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/account/register/register.component.scss -------------------------------------------------------------------------------- /Client/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { HomeComponent } from './home/home.component'; 4 | import { NotFoundComponent } from './core/not-found/not-found.component'; 5 | import { ServerErrorComponent } from './core/server-error/server-error.component'; 6 | import { ConnectionRefusedComponent } from './core/connection-refused/connection-refused.component'; 7 | 8 | const routes: Routes = [ 9 | {path:'', component:HomeComponent, data:{breadcrumb:'Home'}}, 10 | {path:'store', loadChildren:()=>import('./store/store.module').then(m=>m.StoreModule), data:{breadcrumb:'Store'}}, 11 | {path:'basket', loadChildren:()=>import('./basket/basket.module').then(m=>m.BasketModule), data:{breadcrumb:'Basket'}}, 12 | {path:'account', loadChildren:()=>import('./account/account.module').then(m=>m.AccountModule), data:{breadcrumb:'Account'}}, 13 | {path:'checkout', loadChildren:()=>import('./checkout/checkout.module').then(m=>m.CheckoutModule), data:{breadcrumb:'Checkout'}}, 14 | {path:'not-found', component:NotFoundComponent, data:{breadcrumb:'Not Found'}}, 15 | {path:'server-error', component:ServerErrorComponent, data:{breadcrumb:'Server Error'}}, 16 | {path:'connection-refused', component:ConnectionRefusedComponent, data:{breadcrumb:'Connection Refused'}}, 17 | {path:'**', redirectTo: '', pathMatch: 'full'} 18 | ]; 19 | 20 | @NgModule({ 21 | imports: [RouterModule.forRoot(routes, { useHash: true })], 22 | exports: [RouterModule] 23 | }) 24 | export class AppRoutingModule { } 25 | -------------------------------------------------------------------------------- /Client/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 6 |

Loading...

7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Client/src/app/app.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/app.component.scss -------------------------------------------------------------------------------- /Client/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(() => TestBed.configureTestingModule({ 7 | imports: [RouterTestingModule], 8 | declarations: [AppComponent] 9 | })); 10 | 11 | it('should create the app', () => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.componentInstance; 14 | expect(app).toBeTruthy(); 15 | }); 16 | 17 | it(`should have as title 'Client'`, () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app.title).toEqual('Client'); 21 | }); 22 | 23 | it('should render title', () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | fixture.detectChanges(); 26 | const compiled = fixture.nativeElement as HTMLElement; 27 | expect(compiled.querySelector('.content span')?.textContent).toContain('Client app is running!'); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /Client/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { BasketService } from './basket/basket.service'; 3 | import { AccountService } from './account/account.service'; 4 | 5 | @Component({ 6 | selector: 'app-root', 7 | templateUrl: './app.component.html', 8 | styleUrls: ['./app.component.scss'], 9 | }) 10 | export class AppComponent implements OnInit { 11 | title = 'Sports Center'; 12 | 13 | constructor(private basketService: BasketService, private accountService: AccountService) {} 14 | 15 | ngOnInit() { 16 | this.loadBasket(); 17 | this.loadUser(); 18 | } 19 | 20 | loadBasket(){ 21 | const basketId = localStorage.getItem('basket_id'); 22 | if(basketId){ 23 | this.basketService.getBasket(basketId); 24 | } 25 | } 26 | 27 | loadUser(){ 28 | const token = localStorage.getItem('token'); 29 | if(token){ 30 | this.accountService.loadUser(token).subscribe(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Client/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; 4 | 5 | import { AppRoutingModule } from './app-routing.module'; 6 | import { AppComponent } from './app.component'; 7 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 8 | import { CoreModule } from './core/core.module'; 9 | import { HomeModule } from './home/home.module'; 10 | import { ErrorInterceptor } from './core/interceptor/error.interceptor'; 11 | import { NgxSpinnerModule } from 'ngx-spinner'; 12 | import { LoadingInterceptor } from './core/interceptor/loading.interceptor'; 13 | import { HashLocationStrategy, LocationStrategy } from '@angular/common'; 14 | 15 | @NgModule({ 16 | declarations: [AppComponent], 17 | imports: [ 18 | BrowserModule, 19 | AppRoutingModule, 20 | BrowserAnimationsModule, 21 | HttpClientModule, 22 | CoreModule, 23 | HomeModule, 24 | NgxSpinnerModule.forRoot({ type: 'square-jelly-box' }) 25 | ], // Add HttpClientModule to imports 26 | 27 | providers:[ 28 | { 29 | provide: HTTP_INTERCEPTORS, 30 | useClass: ErrorInterceptor, 31 | multi: true 32 | }, 33 | { 34 | provide: HTTP_INTERCEPTORS, 35 | useClass: LoadingInterceptor, 36 | multi: true 37 | }, 38 | { 39 | provide: LocationStrategy, 40 | useClass: HashLocationStrategy 41 | } 42 | ], 43 | bootstrap: [AppComponent], 44 | }) 45 | export class AppModule {} 46 | -------------------------------------------------------------------------------- /Client/src/app/basket/basket-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { BasketComponent } from './basket.component'; 4 | 5 | const routes: Routes = [ 6 | {path:'', component: BasketComponent} 7 | ] 8 | 9 | @NgModule({ 10 | declarations: [], 11 | imports: [ 12 | RouterModule.forChild(routes) 13 | ], 14 | exports: [RouterModule] 15 | }) 16 | export class BasketRoutingModule { } 17 | -------------------------------------------------------------------------------- /Client/src/app/basket/basket.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Your Cart

3 |
4 | Your cart is empty. 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 31 | 32 | 33 | 38 | 39 | 40 |
ImageProductQuantityPriceTotal
{{ item.productName }} 23 | 26 | {{ item.quantity }} 27 | 30 | {{ item.price | currency:"INR" }}{{ (item.quantity * item.price) | currency:"INR" }} 34 | 37 |
41 |
42 |
43 | 44 |
45 |
46 | 47 |
48 | 51 |
52 |
53 |
54 | -------------------------------------------------------------------------------- /Client/src/app/basket/basket.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/basket/basket.component.scss -------------------------------------------------------------------------------- /Client/src/app/basket/basket.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { BasketService } from './basket.service'; 3 | import { Basket, BasketItem } from '../shared/models/basket'; 4 | 5 | 6 | @Component({ 7 | selector: 'app-basket', 8 | templateUrl: './basket.component.html', 9 | styleUrls: ['./basket.component.scss'] 10 | }) 11 | export class BasketComponent implements OnInit { 12 | basket: Basket | null = new Basket(); 13 | constructor(public basketService: BasketService) {} 14 | 15 | ngOnInit(): void { 16 | this.basketService.basketSubject$.subscribe((basket) => { 17 | this.basket = basket; 18 | }); 19 | } 20 | 21 | // Method to extract image name from pictureUrl 22 | extractImageName(item: BasketItem): string | null { 23 | if (item && item.pictureUrl) { 24 | const parts = item.pictureUrl.split('/'); 25 | if (parts.length > 0) { 26 | return parts[parts.length - 1]; // Get the last part after the last / 27 | } 28 | } 29 | return null; // Return null if pictureUrl is not valid 30 | } 31 | incrementQuantity(itemId: number) { 32 | this.basketService.incrementItemQuantity(itemId); 33 | } 34 | 35 | decrementQuantity(itemId: number) { 36 | this.basketService.decrementItemQuantity(itemId); 37 | } 38 | 39 | removeItem(itemId: number) { 40 | this.basketService.removeItem(itemId); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Client/src/app/basket/basket.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { BasketComponent } from './basket.component'; 4 | import { BasketRoutingModule } from './basket-routing.module'; 5 | import { SharedModule } from '../shared/shared.module'; 6 | 7 | 8 | 9 | @NgModule({ 10 | declarations: [BasketComponent], 11 | imports: [ 12 | CommonModule, 13 | BasketRoutingModule, 14 | SharedModule 15 | ] 16 | }) 17 | export class BasketModule { } 18 | -------------------------------------------------------------------------------- /Client/src/app/checkout/address/address.component.scss: -------------------------------------------------------------------------------- 1 | .error-message { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /Client/src/app/checkout/address/address.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { FormGroup, FormBuilder, Validators } from '@angular/forms'; 4 | import { Address } from 'src/app/shared/models/address'; 5 | import { CheckoutComponent } from '../checkout.component'; 6 | 7 | @Component({ 8 | selector: 'app-address', 9 | templateUrl: './address.component.html', 10 | styleUrls: ['./address.component.scss'] 11 | }) 12 | export class AddressComponent implements OnInit { 13 | addressForm: FormGroup; // Initialize here 14 | 15 | constructor( 16 | private formBuilder: FormBuilder, 17 | private router: Router, 18 | private checkoutComponent: CheckoutComponent 19 | ) { 20 | this.addressForm = this.formBuilder.group({ 21 | Fname: ['', Validators.required], 22 | Lname: ['', Validators.required], 23 | Street: ['', Validators.required], 24 | City: ['', Validators.required], 25 | State: ['', Validators.required], 26 | ZipCode: ['', [Validators.required, Validators.pattern(/^\d{6}$/)]], 27 | 28 | }); 29 | } 30 | 31 | ngOnInit(): void { 32 | // You can keep this method empty if there's no additional initialization needed 33 | } 34 | 35 | onSubmit() { 36 | if (this.addressForm.valid) { 37 | const addressData: Address = this.addressForm.value; 38 | // Do something with the submitted address data, e.g., send it to an API 39 | console.log('Submitted Address:', addressData); 40 | } 41 | } 42 | goToNextStep() { 43 | if (this.addressForm.valid) { 44 | // Navigate to the shipment route 45 | this.router.navigate(['/checkout/shipment']); 46 | 47 | // Set the current step in the CheckoutComponent 48 | this.checkoutComponent.setCurrentStep('shipment'); 49 | } 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /Client/src/app/checkout/checkout-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { CheckoutComponent } from './checkout.component'; 4 | import { canActivate } from '../core/guards/auth.guard'; 5 | import { AddressComponent } from './address/address.component'; 6 | import { ReviewComponent } from './review/review.component'; 7 | import { ShipmentComponent } from './shipment/shipment.component'; 8 | 9 | const routes: Routes = [ 10 | { 11 | path: '', 12 | component: CheckoutComponent, 13 | canActivate: [canActivate], 14 | children: [ 15 | { path: 'address', component: AddressComponent }, // Address step 16 | { path: 'shipment', component: ShipmentComponent }, // Shipment step 17 | { path: 'review', component: ReviewComponent }, // Review step 18 | // Add more steps as needed 19 | { path: '', redirectTo: 'address', pathMatch: 'full' } // Default to the 'address' step 20 | ] 21 | } 22 | ]; 23 | 24 | @NgModule({ 25 | declarations: [], 26 | imports: [RouterModule.forChild(routes)], 27 | exports: [RouterModule] 28 | }) 29 | export class CheckoutRoutingModule {} 30 | -------------------------------------------------------------------------------- /Client/src/app/checkout/checkout.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 16 | 17 | 18 |
19 | 20 |
21 | 22 | 23 |
24 | 25 |
26 | 27 | 28 |
29 | 30 |
31 |
32 |
33 | 34 | 35 |
36 |
37 |
38 | -------------------------------------------------------------------------------- /Client/src/app/checkout/checkout.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/checkout/checkout.component.scss -------------------------------------------------------------------------------- /Client/src/app/checkout/checkout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-checkout', 5 | templateUrl: './checkout.component.html', 6 | styleUrls: ['./checkout.component.scss'] 7 | }) 8 | export class CheckoutComponent { 9 | currentStep: 'address' | 'shipment' | 'review' = 'address'; 10 | 11 | setCurrentStep(step: 'address' | 'shipment' | 'review') { 12 | this.currentStep = step; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Client/src/app/checkout/checkout.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { CheckoutComponent } from './checkout.component'; 4 | import { CheckoutRoutingModule } from './checkout-routing.module'; 5 | import { SharedModule } from '../shared/shared.module'; 6 | import { AddressComponent } from './address/address.component'; 7 | import { ShipmentComponent } from './shipment/shipment.component'; 8 | import { ReviewComponent } from './review/review.component'; 9 | 10 | 11 | 12 | @NgModule({ 13 | declarations: [ 14 | CheckoutComponent, 15 | AddressComponent, 16 | ShipmentComponent, 17 | ReviewComponent 18 | ], 19 | imports: [ 20 | CommonModule, 21 | CheckoutRoutingModule, 22 | SharedModule, 23 | ] 24 | }) 25 | export class CheckoutModule { } 26 | -------------------------------------------------------------------------------- /Client/src/app/checkout/checkout.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class CheckoutService { 7 | 8 | constructor() { } 9 | } 10 | -------------------------------------------------------------------------------- /Client/src/app/checkout/review/review.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Your Items

3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
ImageProductQuantityPriceTotal
{{ item.productName }}{{ item.quantity }}{{ item.price | currency:"INR" }}{{ (item.quantity * item.price) | currency:"INR" }}
24 |
25 | 26 | 27 |
28 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /Client/src/app/checkout/review/review.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/checkout/review/review.component.scss -------------------------------------------------------------------------------- /Client/src/app/checkout/review/review.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { BasketService } from 'src/app/basket/basket.service'; 4 | import { Basket, BasketItem } from 'src/app/shared/models/basket'; 5 | 6 | 7 | @Component({ 8 | selector: 'app-review', 9 | templateUrl: './review.component.html', 10 | styleUrls: ['./review.component.scss'] 11 | }) 12 | export class ReviewComponent implements OnInit { 13 | basket: Basket | null = new Basket(); 14 | 15 | constructor(public basketService: BasketService, private router: Router) {} 16 | 17 | ngOnInit(): void { 18 | this.basketService.basketSubject$.subscribe((basket) => { 19 | this.basket = basket; 20 | }); 21 | } 22 | 23 | // Method to extract image name from pictureUrl 24 | extractImageName(item: BasketItem): string | null { 25 | if (item && item.pictureUrl) { 26 | const parts = item.pictureUrl.split('/'); 27 | if (parts.length > 0) { 28 | return parts[parts.length - 1]; 29 | } 30 | } 31 | return null; 32 | } 33 | 34 | submitOrder(): void { 35 | this.basketService.clearBasket(); 36 | this.router.navigate(['/store']); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Client/src/app/checkout/shipment/shipment.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Select Delivery Method

3 |
4 |
5 |
6 |
7 |
{{ option.name }}
8 |

{{ option.description }}

9 |

10 | Delivery Time: {{ option.deliveryTime }} 11 |

12 |

13 | Price: {{ option.price | currency: 'INR' }} 14 |

15 |
16 | 25 | 26 |
27 |
28 |
29 |
30 |
31 | 34 |
35 | -------------------------------------------------------------------------------- /Client/src/app/checkout/shipment/shipment.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/checkout/shipment/shipment.component.scss -------------------------------------------------------------------------------- /Client/src/app/core/connection-refused/connection-refused.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 | 8 |

Connection Refused

9 | 10 | 11 |

We're sorry, but we couldn't establish a connection to the server at the moment. Please try again later.

12 | 13 | 14 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /Client/src/app/core/connection-refused/connection-refused.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/core/connection-refused/connection-refused.component.scss -------------------------------------------------------------------------------- /Client/src/app/core/connection-refused/connection-refused.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-connection-refused', 5 | templateUrl: './connection-refused.component.html', 6 | styleUrls: ['./connection-refused.component.scss'] 7 | }) 8 | export class ConnectionRefusedComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Client/src/app/core/core.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { NavBarComponent } from './nav-bar/nav-bar.component'; 4 | import { RouterModule } from '@angular/router'; 5 | import { NotFoundComponent } from './not-found/not-found.component'; 6 | import { ServerErrorComponent } from './server-error/server-error.component'; 7 | import { ConnectionRefusedComponent } from './connection-refused/connection-refused.component'; 8 | import { ToastrModule } from 'ngx-toastr'; 9 | import { SectionHeaderComponent } from './section-header/section-header.component'; 10 | import { BreadcrumbModule } from 'xng-breadcrumb'; 11 | 12 | 13 | @NgModule({ 14 | declarations: [ 15 | NavBarComponent, 16 | NotFoundComponent, 17 | ServerErrorComponent, 18 | ConnectionRefusedComponent, 19 | SectionHeaderComponent 20 | ], 21 | imports: [ 22 | CommonModule, 23 | RouterModule, 24 | ToastrModule.forRoot({ 25 | positionClass: 'toast-bottom-right', 26 | preventDuplicates: true 27 | }), 28 | BreadcrumbModule 29 | ], 30 | exports:[ 31 | NavBarComponent, 32 | NotFoundComponent, 33 | ServerErrorComponent, 34 | ConnectionRefusedComponent, 35 | SectionHeaderComponent 36 | ] 37 | }) 38 | export class CoreModule { } 39 | -------------------------------------------------------------------------------- /Client/src/app/core/guards/auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { inject } from '@angular/core'; 2 | import { ActivatedRouteSnapshot, CanActivateFn, Router, RouterStateSnapshot, UrlTree } from '@angular/router'; 3 | import { Observable } from 'rxjs'; 4 | import { AccountService } from 'src/app/account/account.service'; 5 | 6 | export const canActivate: CanActivateFn = ( 7 | route: ActivatedRouteSnapshot, 8 | state: RouterStateSnapshot 9 | ) => { 10 | const accountService = inject(AccountService); 11 | const router = inject(Router); 12 | 13 | if (accountService.isAuthenticated()) { 14 | return true; 15 | } else { 16 | // Store the attempted URL for redirecting 17 | accountService.redirectUrl = state.url; 18 | // Redirect to the login page with the return URL 19 | return router.createUrlTree(['/account/login'], { 20 | queryParams: { returnUrl: state.url } 21 | }); 22 | } 23 | }; 24 | 25 | 26 | -------------------------------------------------------------------------------- /Client/src/app/core/interceptor/error.interceptor.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { 3 | HttpRequest, 4 | HttpHandler, 5 | HttpEvent, 6 | HttpInterceptor, 7 | HttpErrorResponse, 8 | } from '@angular/common/http'; 9 | import { Observable } from 'rxjs'; 10 | import { catchError } from 'rxjs/operators'; 11 | import { Router } from '@angular/router'; 12 | import { ToastrService } from 'ngx-toastr'; // Import ToastrService 13 | 14 | @Injectable() 15 | export class ErrorInterceptor implements HttpInterceptor { 16 | constructor(private router: Router, private toastr: ToastrService) {} 17 | 18 | intercept( 19 | request: HttpRequest, 20 | next: HttpHandler 21 | ): Observable> { 22 | return next.handle(request).pipe( 23 | catchError((error) => { 24 | if (error instanceof HttpErrorResponse) { 25 | if (error.status === 404) { 26 | // Handle 404 (Not Found) error 27 | console.log('in-here') 28 | this.toastr.error('Page not found!', 'Error'); // Display error message using Toastr 29 | this.router.navigate(['/not-found']); 30 | 31 | } else if (error.status === 500) { 32 | // Handle 500 (Server Error) error 33 | this.router.navigate(['/server-error']); 34 | this.toastr.error('Server error!', 'Error'); // Display error message using Toastr 35 | } else if (error.status === 0) { 36 | // Handle connection refused or no network error 37 | this.router.navigate(['/connection-error']); 38 | this.toastr.error('Connection error!', 'Error'); // Display error message using Toastr 39 | } 40 | } 41 | // Pass the error along to the next error handling middleware 42 | throw error; 43 | }) 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Client/src/app/core/interceptor/loading.interceptor.ts: -------------------------------------------------------------------------------- 1 | // loading.interceptor.ts 2 | 3 | import { Injectable } from '@angular/core'; 4 | import { 5 | HttpInterceptor, 6 | HttpRequest, 7 | HttpHandler, 8 | HttpEvent, 9 | } from '@angular/common/http'; 10 | import { Observable } from 'rxjs'; 11 | import { delay, finalize, tap } from 'rxjs/operators'; 12 | import { LoadingService } from '../services/loading.service'; 13 | 14 | @Injectable() 15 | export class LoadingInterceptor implements HttpInterceptor { 16 | private requests: number = 0; 17 | constructor(private loadingService: LoadingService){} 18 | intercept( 19 | request: HttpRequest, 20 | next: HttpHandler 21 | ): Observable> { 22 | this.loadingService.loading(); 23 | 24 | return next.handle(request).pipe( 25 | delay(1000), 26 | finalize(()=> this.loadingService.idle()) 27 | ); 28 | } 29 | 30 | isLoading(): boolean { 31 | return this.requests > 0; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Client/src/app/core/nav-bar/nav-bar.component.html: -------------------------------------------------------------------------------- 1 | 56 | -------------------------------------------------------------------------------- /Client/src/app/core/nav-bar/nav-bar.component.scss: -------------------------------------------------------------------------------- 1 | .navbar { 2 | background-color: #fff; /* Background color */ 3 | border-bottom: 1px solid #ddd; /* Bottom border */ 4 | /* Ensure the navbar is fixed at the top */ 5 | position: fixed; 6 | top: 0; 7 | width: 100%; 8 | z-index: 1000; 9 | } 10 | 11 | /* Center the brand name and ensure proper sizing */ 12 | .navbar-brand { 13 | display: flex; 14 | align-items: center; 15 | font-weight: bold; 16 | } 17 | 18 | /* Style the navigation links */ 19 | .navbar-nav .nav-item { 20 | margin-right: 10px; /* Space between nav items */ 21 | } 22 | 23 | .navbar-nav .nav-link { 24 | display: flex; 25 | align-items: center; 26 | color: #333; 27 | cursor: pointer; 28 | position: relative; /* Add this line */ 29 | } 30 | 31 | 32 | a { 33 | cursor: pointer; 34 | } 35 | 36 | /* Style Font Awesome icons */ 37 | .fa { 38 | margin-right: 5px; /* Space between icon and text */ 39 | } 40 | 41 | /* Style the active link */ 42 | .nav-item.active .nav-link { 43 | color: #007bff; /* Active link text color */ 44 | font-weight: bold; /* Active link text weight */ 45 | } 46 | 47 | /* Style for the cart count badge */ 48 | /* Style for the cart count badge */ 49 | .cart-badge { 50 | background-color: rgb(210, 74, 74); 51 | color: white; 52 | border-radius: 50%; 53 | padding: 4px 8px; 54 | font-size: 12px; 55 | position: absolute; /* Use absolute positioning within the relative parent */ 56 | top: -10px; /* Adjust this value to move the badge up */ 57 | right: 0; /* Adjust this value as needed to align it above the cart icon */ 58 | transform: translateX(50%); /* Use transform to precisely position the badge */ 59 | z-index: 1; /* Ensure the badge is displayed above other content */ 60 | } 61 | 62 | 63 | /* Correct positioning for mobile view and collapsing */ 64 | .navbar-toggler { 65 | border: none; 66 | } 67 | 68 | .navbar-collapse { 69 | justify-content: flex-end; 70 | } 71 | 72 | @media (max-width: 991px) { 73 | .navbar-nav .nav-link { 74 | padding-left: 0.5rem; 75 | padding-right: 0.5rem; 76 | } 77 | } 78 | 79 | /* Ensure the navbar doesn't overlap content */ 80 | body { 81 | padding-top: 56px; /* Adjust to the height of your navbar */ 82 | } 83 | -------------------------------------------------------------------------------- /Client/src/app/core/nav-bar/nav-bar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | import { AccountService } from 'src/app/account/account.service'; 4 | import { BasketService } from 'src/app/basket/basket.service'; 5 | import { Basket } from 'src/app/shared/models/basket'; 6 | import { User } from 'src/app/shared/models/user'; 7 | 8 | 9 | @Component({ 10 | selector: 'app-nav-bar', 11 | templateUrl: './nav-bar.component.html', 12 | styleUrls: ['./nav-bar.component.scss'] 13 | }) 14 | export class NavBarComponent implements OnInit { 15 | basket$?: Observable; 16 | currentUser$?: Observable; 17 | constructor( 18 | public basketService: BasketService, 19 | public accountService: AccountService) {} 20 | 21 | ngOnInit(): void { 22 | this.basket$ = this.basketService.basketSubject$; 23 | this.currentUser$ = this.accountService.userSource$; 24 | } 25 | logout() { 26 | this.accountService.logout(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Client/src/app/core/not-found/not-found.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Page Not Found

5 |

Sorry, the page you are looking for does not exist.

6 | Page Not Found Illustration 7 |
8 | 9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /Client/src/app/core/not-found/not-found.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/core/not-found/not-found.component.scss -------------------------------------------------------------------------------- /Client/src/app/core/not-found/not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-not-found', 5 | templateUrl: './not-found.component.html', 6 | styleUrls: ['./not-found.component.scss'] 7 | }) 8 | export class NotFoundComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Client/src/app/core/section-header/section-header.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

{{breadcrumbs[breadcrumbs.length-1].label}}

7 |
8 |
9 | 10 |
11 |
12 |
13 |
14 |
-------------------------------------------------------------------------------- /Client/src/app/core/section-header/section-header.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/core/section-header/section-header.component.scss -------------------------------------------------------------------------------- /Client/src/app/core/section-header/section-header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { BreadcrumbService } from 'xng-breadcrumb'; 3 | 4 | @Component({ 5 | selector: 'app-section-header', 6 | templateUrl: './section-header.component.html', 7 | styleUrls: ['./section-header.component.scss'] 8 | }) 9 | export class SectionHeaderComponent { 10 | constructor(public breadCrumbService: BreadcrumbService){} 11 | } 12 | -------------------------------------------------------------------------------- /Client/src/app/core/server-error/server-error.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Server Error

5 |

Oops! Something went wrong. We apologize for the inconvenience.

6 | Server Error Illustration 7 |
8 | 9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /Client/src/app/core/server-error/server-error.component.scss: -------------------------------------------------------------------------------- 1 | .error-title { 2 | font-size: 36px; 3 | font-weight: bold; 4 | margin-bottom: 20px; 5 | color: #f00; /* Red color for error message */ 6 | } 7 | 8 | .error-description { 9 | font-size: 18px; 10 | margin-bottom: 20px; 11 | } 12 | 13 | .error-image { 14 | max-width: 100%; 15 | margin-bottom: 20px; 16 | } 17 | 18 | .go-back-button { 19 | background: #007bff; 20 | color: #fff; 21 | border: none; 22 | border-radius: 5px; 23 | padding: 10px 20px; 24 | font-size: 18px; 25 | cursor: pointer; 26 | 27 | &:hover { 28 | background: #0056b3; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Client/src/app/core/server-error/server-error.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-server-error', 5 | templateUrl: './server-error.component.html', 6 | styleUrls: ['./server-error.component.scss'] 7 | }) 8 | export class ServerErrorComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Client/src/app/core/services/loading.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { NgxSpinnerService } from 'ngx-spinner'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class LoadingService { 8 | loadingReqCount = 0; 9 | constructor(private spinnerService: NgxSpinnerService) { } 10 | 11 | loading(){ 12 | this.loadingReqCount++; 13 | this.spinnerService.show(); 14 | } 15 | idle(){ 16 | this.loadingReqCount--; 17 | if(this.loadingReqCount<=0){ 18 | this.loadingReqCount = 0; 19 | this.spinnerService.hide(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Client/src/app/home/home.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/home/home.component.scss -------------------------------------------------------------------------------- /Client/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | styleUrls: ['./home.component.scss'] 7 | }) 8 | export class HomeComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Client/src/app/home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { HomeComponent } from './home.component'; 4 | import { SharedModule } from '../shared/shared.module'; 5 | 6 | 7 | 8 | @NgModule({ 9 | declarations: [ 10 | HomeComponent 11 | ], 12 | imports: [ 13 | CommonModule, 14 | SharedModule 15 | ], 16 | exports:[ 17 | HomeComponent 18 | ] 19 | }) 20 | export class HomeModule { } 21 | -------------------------------------------------------------------------------- /Client/src/app/shared/components/pagination-header/pagination-header.component.html: -------------------------------------------------------------------------------- 1 |
2 | Showing 3 | {{ (pageNumber-1) *pageSize+1 }} 4 | - {{ 5 | pageNumber * pageSize 6 | > totalCount 7 | ? totalCount 8 | : pageNumber * pageSize 9 | }} 10 | of {{ totalCount }} Results 11 | 12 | There are 0 results 13 |
-------------------------------------------------------------------------------- /Client/src/app/shared/components/pagination-header/pagination-header.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/shared/components/pagination-header/pagination-header.component.scss -------------------------------------------------------------------------------- /Client/src/app/shared/components/pagination-header/pagination-header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-pagination-header', 5 | templateUrl: './pagination-header.component.html', 6 | styleUrls: ['./pagination-header.component.scss'] 7 | }) 8 | export class PaginationHeaderComponent { 9 | @Input() totalCount!: number; 10 | @Input() pageNumber!: number; 11 | @Input() pageSize!: number; 12 | } 13 | -------------------------------------------------------------------------------- /Client/src/app/shared/components/pagination/pagination.component.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /Client/src/app/shared/components/pagination/pagination.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/shared/components/pagination/pagination.component.scss -------------------------------------------------------------------------------- /Client/src/app/shared/components/pagination/pagination.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, Output } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-pagination', 5 | templateUrl: './pagination.component.html', 6 | styleUrls: ['./pagination.component.scss'] 7 | }) 8 | export class PaginationComponent { 9 | @Input() totalCount?: number; 10 | @Input() pageSize?: number; 11 | @Input() pageNumber?: number; 12 | @Output() pageChanged = new EventEmitter(); 13 | 14 | onPageChanged(event: any){ 15 | this.pageChanged.emit(event.page); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Client/src/app/shared/models/Pagination.ts: -------------------------------------------------------------------------------- 1 | import { Product } from "./Product"; 2 | 3 | export interface Pagination { 4 | pageIndex: number; 5 | pageSize: number; 6 | totalItems: number; 7 | data: T[]; 8 | } 9 | -------------------------------------------------------------------------------- /Client/src/app/shared/models/Product.ts: -------------------------------------------------------------------------------- 1 | export interface Product { 2 | id: number; 3 | name: string; 4 | description: string; 5 | price: number; 6 | pictureUrl: string; 7 | productType: string; 8 | productBrand: string; 9 | } 10 | -------------------------------------------------------------------------------- /Client/src/app/shared/models/address.ts: -------------------------------------------------------------------------------- 1 | export interface Address { 2 | fname: string; 3 | lname: string; 4 | street: string; 5 | city: string; 6 | state: string; 7 | zipcode: string; 8 | } -------------------------------------------------------------------------------- /Client/src/app/shared/models/basket.ts: -------------------------------------------------------------------------------- 1 | import { createId } from "@paralleldrive/cuid2" 2 | 3 | 4 | export interface Basket { 5 | id: string 6 | items: BasketItem[] 7 | } 8 | 9 | export interface BasketItem { 10 | id: number 11 | productName: string 12 | price: number 13 | quantity: number 14 | pictureUrl: string 15 | productBrand: string 16 | productType: string 17 | } 18 | 19 | export class Basket implements Basket{ 20 | id = createId() 21 | items: BasketItem[] = []; 22 | } 23 | 24 | export interface BasketTotal{ 25 | shipping: number; 26 | subtotal: number; 27 | total: number; 28 | } -------------------------------------------------------------------------------- /Client/src/app/shared/models/brand.ts: -------------------------------------------------------------------------------- 1 | export interface Brand{ 2 | id: number; 3 | name: string; 4 | } -------------------------------------------------------------------------------- /Client/src/app/shared/models/deliveryOption.ts: -------------------------------------------------------------------------------- 1 | export interface DeliveryOption { 2 | id: number; 3 | name: string; 4 | deliveryTime: string; 5 | description: string; 6 | price: number; 7 | } 8 | -------------------------------------------------------------------------------- /Client/src/app/shared/models/storeParams.ts: -------------------------------------------------------------------------------- 1 | import { Product } from "./Product"; 2 | 3 | export class StoreParams { 4 | skip: number = 0; 5 | take: number = 10; 6 | productBrandId: number = 0; 7 | productTypeId: number = 0; 8 | search: string = ''; 9 | selectedSort: string = 'NameAsc'; 10 | originalProducts: Product[] = []; 11 | brandIdSelected: number = 0; 12 | typeIdSelected: number = 0; 13 | pageSize: number = 10; 14 | pageNumber: number = 1; 15 | } 16 | -------------------------------------------------------------------------------- /Client/src/app/shared/models/type.ts: -------------------------------------------------------------------------------- 1 | export interface Type{ 2 | id: number; 3 | name: string; 4 | } -------------------------------------------------------------------------------- /Client/src/app/shared/models/user.ts: -------------------------------------------------------------------------------- 1 | export interface User{ 2 | email: string; 3 | displayName: string; 4 | token: string 5 | } -------------------------------------------------------------------------------- /Client/src/app/shared/order-totals/order-totals.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Order Summary

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Subtotal:{{ basketTotal.subtotal | currency:"INR" }}
Shipping:{{ basketTotal.shipping | currency:"INR" }}
Total:{{ basketTotal.total | currency:"INR" }}
19 |
20 | -------------------------------------------------------------------------------- /Client/src/app/shared/order-totals/order-totals.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/app/shared/order-totals/order-totals.component.scss -------------------------------------------------------------------------------- /Client/src/app/shared/order-totals/order-totals.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { BasketService } from 'src/app/basket/basket.service'; 3 | 4 | @Component({ 5 | selector: 'app-order-totals', 6 | templateUrl: './order-totals.component.html', 7 | styleUrls: ['./order-totals.component.scss'] 8 | }) 9 | export class OrderTotalsComponent { 10 | constructor(public basketService: BasketService){} 11 | 12 | // Create a method to update shipment price and total 13 | updateShipmentAndTotal(): void { 14 | this.basketService.calculateShippingAndTotal(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Client/src/app/shared/shared.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { MatInputModule } from '@angular/material/input'; 3 | import { CommonModule } from '@angular/common'; 4 | import { PaginationModule } from 'ngx-bootstrap/pagination'; 5 | import { PaginationHeaderComponent } from './components/pagination-header/pagination-header.component'; 6 | import { PaginationComponent } from './components/pagination/pagination.component'; 7 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 8 | import { CarouselModule } from 'ngx-bootstrap/carousel'; 9 | import { OrderTotalsComponent } from './order-totals/order-totals.component'; 10 | 11 | @NgModule({ 12 | declarations: [ 13 | PaginationHeaderComponent, 14 | PaginationComponent, 15 | OrderTotalsComponent 16 | ], 17 | imports: [ 18 | CommonModule, 19 | FormsModule, 20 | ReactiveFormsModule, 21 | CarouselModule.forRoot(), 22 | PaginationModule.forRoot(), 23 | MatInputModule 24 | ], 25 | exports:[ 26 | PaginationHeaderComponent, 27 | PaginationComponent, 28 | OrderTotalsComponent, 29 | PaginationModule, 30 | CarouselModule, 31 | FormsModule, 32 | ReactiveFormsModule, 33 | MatInputModule 34 | ] 35 | }) 36 | export class SharedModule { } 37 | -------------------------------------------------------------------------------- /Client/src/app/store/product-details/product-details.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 |
8 |
9 |
10 | 11 |

{{ product.name }}

12 |

{{ product.description }}

13 |
14 |
15 | Price: 16 | {{ product.price | currency: 'INR' }} 17 |
18 |
19 | Brand: 20 | {{ product.productBrand }} 21 |
22 |
23 | Type: 24 | {{ product.productType }} 25 |
26 | 27 |
28 | Quantity: 29 | 32 | {{ quantity }} 33 | 36 |
37 |
38 | 39 | 40 | 41 |
42 |
43 |
44 | -------------------------------------------------------------------------------- /Client/src/app/store/product-details/product-details.component.scss: -------------------------------------------------------------------------------- 1 | .product-image-container { 2 | text-align: center; 3 | } 4 | 5 | .product-image { 6 | max-width: 100%; 7 | border: 1px solid #ddd; 8 | border-radius: 5px; 9 | padding: 10px; 10 | } 11 | 12 | .product-title { 13 | font-size: 24px; 14 | font-weight: bold; 15 | margin-bottom: 10px; 16 | } 17 | 18 | .product-description { 19 | font-size: 16px; 20 | margin-bottom: 20px; 21 | } 22 | 23 | .product-info { 24 | margin-bottom: 20px; 25 | } 26 | 27 | .product-info-item { 28 | display: flex; 29 | align-items: center; 30 | margin-bottom: 10px; 31 | 32 | strong { 33 | margin-right: 10px; 34 | } 35 | } 36 | 37 | .product-price { 38 | font-weight: bold; 39 | font-size: 18px; 40 | } 41 | 42 | .quantity-control { 43 | display: flex; 44 | align-items: center; 45 | 46 | strong { 47 | margin-right: 10px; 48 | } 49 | 50 | .quantity-button { 51 | background: #007bff; 52 | color: #fff; 53 | border: none; 54 | padding: 5px 10px; 55 | border-radius: 5px; 56 | cursor: pointer; 57 | font-size: 18px; 58 | 59 | i { 60 | font-size: 16px; 61 | } 62 | } 63 | 64 | .quantity { 65 | font-size: 18px; 66 | font-weight: bold; 67 | margin: 0 10px; 68 | } 69 | } 70 | 71 | .add-to-cart-button { 72 | background: #28a745; 73 | color: #fff; 74 | border: none; 75 | border-radius: 5px; 76 | padding: 10px 20px; 77 | font-size: 18px; 78 | cursor: pointer; 79 | margin-right: 10px; 80 | 81 | &:hover { 82 | background: #218838; 83 | } 84 | } 85 | 86 | .go-back-button { 87 | background: #6c757d; 88 | color: #fff; 89 | border: none; 90 | border-radius: 5px; 91 | padding: 10px 20px; 92 | font-size: 18px; 93 | cursor: pointer; 94 | 95 | &:hover { 96 | background: #5a6268; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Client/src/app/store/product-details/product-details.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { StoreService } from '../store.service'; 3 | import { ActivatedRoute } from '@angular/router'; 4 | import { Product } from 'src/app/shared/models/Product'; 5 | import { BreadcrumbService } from 'xng-breadcrumb'; 6 | import { ToastrService } from 'ngx-toastr'; 7 | import { BasketService } from 'src/app/basket/basket.service'; 8 | 9 | @Component({ 10 | selector: 'app-product-details', 11 | templateUrl: './product-details.component.html', 12 | styleUrls: ['./product-details.component.scss'] 13 | }) 14 | export class ProductDetailsComponent implements OnInit { 15 | product?: Product; 16 | quantity: number = 1; 17 | constructor( 18 | private storeService: StoreService, 19 | private activatedRoute: ActivatedRoute, 20 | private breadCrumbService: BreadcrumbService, 21 | private toastr: ToastrService, 22 | private basketService: BasketService 23 | ){} 24 | 25 | ngOnInit(): void { 26 | this.loadProduct(); 27 | } 28 | 29 | loadProduct(){ 30 | const id = this.activatedRoute.snapshot.paramMap.get('id'); 31 | if(id){ 32 | this.storeService.getProduct(+id).subscribe({ 33 | next: product =>{ 34 | this.product = product; 35 | this.breadCrumbService.set('@productName', product.name); 36 | }, 37 | error: error => console.log(error) 38 | }); 39 | } 40 | } 41 | 42 | addToCart() { 43 | if (this.product) { 44 | this.basketService.addItemToBasket(this.product, this.quantity); 45 | this.toastr.success('Item added to cart'); 46 | } 47 | } 48 | 49 | 50 | // Method to extract image name from pictureUrl 51 | extractImageName(): string | null { 52 | if (this.product && this.product.pictureUrl) { 53 | const parts = this.product.pictureUrl.split('/'); 54 | if (parts.length > 0) { 55 | return parts[parts.length - 1]; // Get the last part after the last / 56 | } 57 | } 58 | return null; // Return null if pictureUrl is not valid 59 | } 60 | 61 | // Method to increment the quantity 62 | incrementQuantity() { 63 | this.quantity++; 64 | } 65 | 66 | // Method to decrement the quantity (prevent negative values) 67 | decrementQuantity() { 68 | if (this.quantity > 1) { 69 | this.quantity--; 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Client/src/app/store/product-item/product-item.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
{{ product.name }}
6 |

Price: {{ product.price | currency:"INR" }}

7 | 8 | 9 |
10 | 11 | 12 |
13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /Client/src/app/store/product-item/product-item.component.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | width: 30%; 3 | height: 40px; 4 | } 5 | 6 | .image :hover { 7 | opacity: 1; 8 | & button { 9 | transform: none; 10 | opacity: 1; 11 | } 12 | } 13 | 14 | .hover-overlay { 15 | position: absolute; 16 | width: 100%; 17 | height: 100%; 18 | top: 0; 19 | left: 0; 20 | background: rgba(255, 255, 255, 0.5); 21 | opacity: 0; 22 | transition: all 0.5s; 23 | 24 | & button { 25 | z-index: 1000; 26 | transition: all 0.5s; 27 | } 28 | 29 | & button:first-of-type { 30 | transform: translateX(-20px); 31 | } 32 | 33 | & button:last-of-type { 34 | transform: translateX(20px); 35 | } 36 | } -------------------------------------------------------------------------------- /Client/src/app/store/product-item/product-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { BasketService } from 'src/app/basket/basket.service'; 3 | import { Product } from 'src/app/shared/models/Product'; 4 | 5 | 6 | @Component({ 7 | selector: 'app-product-item', 8 | templateUrl: './product-item.component.html', 9 | styleUrls: ['./product-item.component.scss'], 10 | }) 11 | export class ProductItemComponent { 12 | @Input() product: Product | null = null; 13 | 14 | constructor(private baseketService: BasketService){} 15 | 16 | // Method to extract image name from pictureUrl 17 | extractImageName(): string | null { 18 | if (this.product && this.product.pictureUrl) { 19 | const parts = this.product.pictureUrl.split('/'); 20 | if (parts.length > 0) { 21 | return parts[parts.length - 1]; // Get the last part after the last / 22 | } 23 | } 24 | return null; // Return null if pictureUrl is not valid 25 | } 26 | 27 | addItemToBasket(){ 28 | this.product && this.baseketService.addItemToBasket(this.product); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Client/src/app/store/store-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { ProductDetailsComponent } from './product-details/product-details.component'; 4 | import { StoreComponent } from './store.component'; 5 | 6 | const routes: Routes = [ 7 | 8 | {path:'', component:StoreComponent}, 9 | {path:':id', component:ProductDetailsComponent, data:{breadcrumb:{alias: 'productName'}}}, 10 | ] 11 | 12 | @NgModule({ 13 | declarations: [], 14 | imports: [ 15 | RouterModule.forChild(routes) 16 | ], 17 | exports:[ 18 | RouterModule 19 | ] 20 | }) 21 | export class StoreRoutingModule { } 22 | -------------------------------------------------------------------------------- /Client/src/app/store/store.component.scss: -------------------------------------------------------------------------------- 1 | .filters { 2 | h3 { 3 | font-weight: bold; 4 | } 5 | 6 | .list-group-item { 7 | cursor: pointer; 8 | border: none; 9 | border-left: 4px solid transparent; 10 | border-radius: 0; 11 | padding: 10px 20px; 12 | 13 | &:hover { 14 | background-color: #f8f9fa; 15 | } 16 | 17 | &.active { 18 | border-color: #10278f; /* Change the highlight border color */ 19 | background-color: #2146cb; /* Change the highlight background color */ 20 | } 21 | 22 | &.active:hover { 23 | background-color: #c4e2ce; /* Change the hover color for active items */ 24 | } 25 | 26 | .list-group-item-text { 27 | /* Ensure text remains visible */ 28 | color: #333; /* Change the text color */ 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Client/src/app/store/store.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { StoreComponent } from './store.component'; 4 | import { ProductItemComponent } from './product-item/product-item.component'; 5 | import { FormsModule } from '@angular/forms'; 6 | import { SharedModule } from '../shared/shared.module'; 7 | import { ProductDetailsComponent } from './product-details/product-details.component'; 8 | import { StoreRoutingModule } from './store-routing.module'; 9 | 10 | @NgModule({ 11 | declarations: [ 12 | StoreComponent, 13 | ProductItemComponent, 14 | ProductDetailsComponent 15 | ], 16 | imports: [ 17 | CommonModule, 18 | StoreRoutingModule, 19 | FormsModule, 20 | SharedModule 21 | ] 22 | }) 23 | export class StoreModule { } 24 | -------------------------------------------------------------------------------- /Client/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/.gitkeep -------------------------------------------------------------------------------- /Client/src/assets/images/bslide1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/bslide1.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/bslide2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/bslide2.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/bslide3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/bslide3.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/connection-refused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/connection-refused.png -------------------------------------------------------------------------------- /Client/src/assets/images/hero1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/hero1.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/hero2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/hero2.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/hero3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/hero3.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/hero4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/hero4.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/hero5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/hero5.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/hero6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/hero6.jpg -------------------------------------------------------------------------------- /Client/src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/logo.png -------------------------------------------------------------------------------- /Client/src/assets/images/page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/page-not-found.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/Nike-Football-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/Nike-Football-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/Nike-Football-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/Nike-Football-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/Nike-Football-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/Nike-Football-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/adidas_football-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/adidas_football-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/adidas_football-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/adidas_football-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/adidas_football-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/adidas_football-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/adidas_shoe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/adidas_shoe-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/adidas_shoe-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/adidas_shoe-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/adidas_shoe-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/adidas_shoe-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/asics_shoe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/asics_shoe-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/asics_shoe-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/asics_shoe-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/asics_shoe-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/asics_shoe-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat-kitback-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat-kitback-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat-kitback-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat-kitback-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat-kitback-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat-kitback-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat-racket-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat-racket-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat-racket-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat-racket-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat-racket-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat-racket-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat_shoe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat_shoe-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat_shoe-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat_shoe-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/babolat_shoe-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/babolat_shoe-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/puma_shoe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/puma_shoe-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/puma_shoe-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/puma_shoe-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/puma_shoe-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/puma_shoe-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/victor-racket-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/victor-racket-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/victor-racket-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/victor-racket-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/victor-racket-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/victor-racket-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/victor_shoe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/victor_shoe-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/victor_shoe-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/victor_shoe-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-badminton-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-badminton-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-badminton-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-badminton-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-badminton-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-badminton-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-kitback-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-kitback-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-kitback-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-kitback-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-kitback-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-kitback-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-racket-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-racket-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-racket-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-racket-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex-racket-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex-racket-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex_shoe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex_shoe-1.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex_shoe-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex_shoe-2.png -------------------------------------------------------------------------------- /Client/src/assets/images/products/yonex_shoe-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/products/yonex_shoe-3.png -------------------------------------------------------------------------------- /Client/src/assets/images/server-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/assets/images/server-error.png -------------------------------------------------------------------------------- /Client/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Client/src/favicon.ico -------------------------------------------------------------------------------- /Client/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Client 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Client/src/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app/app.module'; 4 | 5 | 6 | platformBrowserDynamic().bootstrapModule(AppModule) 7 | .catch(err => console.error(err)); 8 | -------------------------------------------------------------------------------- /Client/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | 3 | /* Importing Bootstrap SCSS file. */ 4 | 5 | 6 | 7 | html, body { height: 100%; } 8 | body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } 9 | -------------------------------------------------------------------------------- /Client/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /Client/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitOverride": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "ES2022", 20 | "module": "ES2022", 21 | "useDefineForClassFields": false, 22 | "lib": [ 23 | "ES2022", 24 | "dom" 25 | ] 26 | }, 27 | "angularCompilerOptions": { 28 | "enableI18nLegacyMessageIdFormat": false, 29 | "strictInjectionParameters": true, 30 | "strictInputAccessModifiers": true, 31 | "strictTemplates": true 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Client/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "include": [ 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /Core/Core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Core/Entities/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Entities; 2 | 3 | public class BaseEntity 4 | { 5 | public int Id { get; set; } 6 | } -------------------------------------------------------------------------------- /Core/Entities/Basket.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Entities; 2 | 3 | public class Basket 4 | { 5 | public Basket() 6 | { 7 | 8 | } 9 | 10 | public Basket(string id) 11 | { 12 | Id = id; 13 | } 14 | public string Id { get; set; } 15 | public List Items { get; set; } = new List(); 16 | 17 | // Custom methods can be added here for basket operations 18 | } 19 | -------------------------------------------------------------------------------- /Core/Entities/BasketItem.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Entities; 2 | 3 | public class BasketItem 4 | { 5 | public int Id { get; set; } 6 | public string ProductName { get; set; } 7 | public double Price { get; set; } 8 | public int Quantity { get; set; } 9 | public string PictureUrl { get; set; } 10 | public string ProductBrand { get; set; } 11 | public string ProductType { get; set; } 12 | } -------------------------------------------------------------------------------- /Core/Entities/Identity/Address.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace Core.Entities.Identity; 5 | 6 | public class Address 7 | { 8 | [Key] 9 | [DatabaseGenerated(DatabaseGeneratedOption.Identity)] 10 | public string Id { get; set; } 11 | public string Fname { get; set; } 12 | public string Lname { get; set; } 13 | public string Street { get; set; } 14 | public string City { get; set; } 15 | public string State { get; set; } 16 | public string ZipCode { get; set; } 17 | [Required] 18 | public string ApplicationUserId { get; set; } 19 | public ApplicationUser User { get; set; } 20 | 21 | } -------------------------------------------------------------------------------- /Core/Entities/Identity/ApplicationUser.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | 3 | namespace Core.Entities.Identity; 4 | 5 | public class ApplicationUser : IdentityUser 6 | { 7 | public string DisplayName { get; set; } 8 | public Address Address { get; set; } 9 | } -------------------------------------------------------------------------------- /Core/Entities/Identity/TokenSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Entities.Identity; 2 | 3 | public class TokenSettings 4 | { 5 | public string Key { get; set; } 6 | public string Issuer { get; set; } 7 | public string Audience { get; set; } 8 | } -------------------------------------------------------------------------------- /Core/Entities/Product.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Entities; 2 | 3 | public class Product : BaseEntity 4 | { 5 | public string Name { get; set; } 6 | public string Description { get; set; } 7 | public double Price { get; set; } 8 | public string PictureUrl { get; set; } 9 | public int ProductTypeId { get; set; } // Foreign key for ProductType 10 | public int ProductBrandId { get; set; } // Foreign key for ProductBrand 11 | // Navigation properties 12 | public ProductType ProductType { get; set; } 13 | public ProductBrand ProductBrand { get; set; } 14 | } -------------------------------------------------------------------------------- /Core/Entities/ProductBrand.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Entities; 2 | 3 | public class ProductBrand : BaseEntity 4 | { 5 | public string Name { get; set; } 6 | } -------------------------------------------------------------------------------- /Core/Entities/ProductType.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Entities; 2 | 3 | public class ProductType : BaseEntity 4 | { 5 | public string Name { get; set; } 6 | } -------------------------------------------------------------------------------- /Core/Enums/OrderBy.cs: -------------------------------------------------------------------------------- 1 | namespace Core.Enums; 2 | 3 | public enum OrderBy 4 | { 5 | Ascending, 6 | Descending 7 | } -------------------------------------------------------------------------------- /Core/Interfaces/IBasketRepository.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | 3 | namespace Core.Interfaces; 4 | 5 | public interface IBasketRepository 6 | { 7 | Task GetBasketAsync(string basketId); 8 | Task UpdateBasketAsync(Basket basket); 9 | Task DeleteBasketAsync(string basketId); 10 | } -------------------------------------------------------------------------------- /Core/Interfaces/IProductRepository.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | 3 | namespace Core.Interfaces; 4 | 5 | public interface IProductRepository 6 | { 7 | Task GetProductByIdAsync(int id); 8 | Task> GetProductsAsync(); 9 | Task> GetProductBrandsAsync(); 10 | Task> GetProductTypesAsync(); 11 | } -------------------------------------------------------------------------------- /Core/Interfaces/IRepository.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | using Core.Specifications; 3 | 4 | namespace Core.Interfaces 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | Task GetByIdAsync(ISpecification spec); 9 | Task> ListAsync(ISpecification spec); 10 | Task> GetProductBrandsAsync(); 11 | Task> GetProductTypesAsync(); 12 | Task CountAsync(ISpecification spec); 13 | } 14 | } -------------------------------------------------------------------------------- /Core/Interfaces/ITokenGenerationService.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | 3 | namespace Core.Interfaces; 4 | 5 | public interface ITokenGenerationService 6 | { 7 | string GenerateToken(IEnumerable claims, int expirationMinutes = 60); 8 | } -------------------------------------------------------------------------------- /Core/Specifications/ISpecification.cs: -------------------------------------------------------------------------------- 1 | using System.Linq.Expressions; 2 | using Core.Enums; 3 | 4 | namespace Core.Specifications 5 | { 6 | public interface ISpecification 7 | { 8 | Expression> Criteria { get; } 9 | List>> Includes { get; } 10 | Expression> OrderBy { get; } 11 | OrderBy OrderByDirection { get; } 12 | int Take { get; } 13 | int Skip { get; } 14 | bool IsPagingEnabled { get; } 15 | } 16 | } -------------------------------------------------------------------------------- /Core/bin/Debug/net7.0/Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/bin/Debug/net7.0/Core.dll -------------------------------------------------------------------------------- /Core/bin/Debug/net7.0/Core.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/bin/Debug/net7.0/Core.pdb -------------------------------------------------------------------------------- /Core/obj/Core.csproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj": {} 5 | }, 6 | "projects": { 7 | "/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj", 11 | "projectName": "Core", 12 | "projectPath": "/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj", 13 | "packagesPath": "/Users/rahsahay/.nuget/packages/", 14 | "outputPath": "/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/obj/", 15 | "projectStyle": "PackageReference", 16 | "configFilePaths": [ 17 | "/Users/rahsahay/.nuget/NuGet/NuGet.Config" 18 | ], 19 | "originalTargetFrameworks": [ 20 | "net7.0" 21 | ], 22 | "sources": { 23 | "https://api.nuget.org/v3/index.json": {} 24 | }, 25 | "frameworks": { 26 | "net7.0": { 27 | "targetAlias": "net7.0", 28 | "projectReferences": {} 29 | } 30 | }, 31 | "warningProperties": { 32 | "warnAsError": [ 33 | "NU1605" 34 | ] 35 | } 36 | }, 37 | "frameworks": { 38 | "net7.0": { 39 | "targetAlias": "net7.0", 40 | "dependencies": { 41 | "Microsoft.AspNetCore.Identity.EntityFrameworkCore": { 42 | "target": "Package", 43 | "version": "[6.0.25, )" 44 | } 45 | }, 46 | "imports": [ 47 | "net461", 48 | "net462", 49 | "net47", 50 | "net471", 51 | "net472", 52 | "net48", 53 | "net481" 54 | ], 55 | "assetTargetFallback": true, 56 | "warn": true, 57 | "frameworkReferences": { 58 | "Microsoft.NETCore.App": { 59 | "privateAssets": "all" 60 | } 61 | }, 62 | "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/7.0.401/RuntimeIdentifierGraph.json" 63 | } 64 | } 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /Core/obj/Core.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | /Users/rahsahay/.nuget/packages/ 8 | /Users/rahsahay/.nuget/packages/ 9 | PackageReference 10 | 6.5.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Core/obj/Core.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/.NETCoreApp,Version=v7.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")] 5 | -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: System.Reflection.AssemblyCompanyAttribute("Core")] 14 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 17 | [assembly: System.Reflection.AssemblyProductAttribute("Core")] 18 | [assembly: System.Reflection.AssemblyTitleAttribute("Core")] 19 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 20 | 21 | // Generated by the MSBuild WriteCodeFragment class. 22 | 23 | -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | bb70b8d99ff9108d5c8f3ce9e50331d5e1228212 2 | -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net7.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = Core 11 | build_property.ProjectDir = /Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/ 12 | -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::System; 3 | global using global::System.Collections.Generic; 4 | global using global::System.IO; 5 | global using global::System.Linq; 6 | global using global::System.Net.Http; 7 | global using global::System.Threading; 8 | global using global::System.Threading.Tasks; 9 | -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/obj/Debug/net7.0/Core.assets.cache -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/obj/Debug/net7.0/Core.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | fed5e93de0e841ea591d2d1fd43a482a2ea3cafa 2 | -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/obj/Debug/net7.0/Core.dll -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/Core.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/obj/Debug/net7.0/Core.pdb -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/ref/Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/obj/Debug/net7.0/ref/Core.dll -------------------------------------------------------------------------------- /Core/obj/Debug/net7.0/refint/Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Core/obj/Debug/net7.0/refint/Core.dll -------------------------------------------------------------------------------- /Core/obj/project.packagespec.json: -------------------------------------------------------------------------------- 1 | "restore":{"projectUniqueName":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj","projectName":"Core","projectPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj","outputPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net7.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net7.0":{"targetAlias":"net7.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net7.0":{"targetAlias":"net7.0","dependencies":{"Microsoft.AspNetCore.Identity.EntityFrameworkCore":{"target":"Package","version":"[6.0.25, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/7.0.401/RuntimeIdentifierGraph.json"}} -------------------------------------------------------------------------------- /Core/obj/rider.project.restore.info: -------------------------------------------------------------------------------- 1 | 17010021381362746 -------------------------------------------------------------------------------- /Ecommerce.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API", "API\API.csproj", "{E14EC49F-C0CE-415D-952E-A3D18E404F60}" 4 | EndProject 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{DD97A5BA-0115-4711-B179-9A60B7CB121E}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{E76DBDF2-5F06-41B7-9857-492125E8766A}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Any CPU = Debug|Any CPU 12 | Release|Any CPU = Release|Any CPU 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {E14EC49F-C0CE-415D-952E-A3D18E404F60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 16 | {E14EC49F-C0CE-415D-952E-A3D18E404F60}.Debug|Any CPU.Build.0 = Debug|Any CPU 17 | {E14EC49F-C0CE-415D-952E-A3D18E404F60}.Release|Any CPU.ActiveCfg = Release|Any CPU 18 | {E14EC49F-C0CE-415D-952E-A3D18E404F60}.Release|Any CPU.Build.0 = Release|Any CPU 19 | {DD97A5BA-0115-4711-B179-9A60B7CB121E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {DD97A5BA-0115-4711-B179-9A60B7CB121E}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {DD97A5BA-0115-4711-B179-9A60B7CB121E}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {DD97A5BA-0115-4711-B179-9A60B7CB121E}.Release|Any CPU.Build.0 = Release|Any CPU 23 | {E76DBDF2-5F06-41B7-9857-492125E8766A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {E76DBDF2-5F06-41B7-9857-492125E8766A}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {E76DBDF2-5F06-41B7-9857-492125E8766A}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {E76DBDF2-5F06-41B7-9857-492125E8766A}.Release|Any CPU.Build.0 = Release|Any CPU 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Infrastructure/Data/EcommerceContext.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Infrastructure.Data 5 | { 6 | public class EcommerceContext : DbContext 7 | { 8 | public EcommerceContext(DbContextOptions options) 9 | : base(options) 10 | { 11 | } 12 | 13 | public DbSet Products { get; set; } 14 | public DbSet ProductTypes { get; set; } 15 | public DbSet ProductBrands { get; set; } 16 | 17 | protected override void OnModelCreating(ModelBuilder modelBuilder) 18 | { 19 | // Configure relationships and any additional constraints here if needed. 20 | 21 | // Example: Configure a one-to-many relationship between Product and ProductType 22 | modelBuilder.Entity() 23 | .HasOne(p => p.ProductType) 24 | .WithMany() 25 | .HasForeignKey(p => p.ProductTypeId); 26 | 27 | // Example: Configure a one-to-many relationship between Product and ProductBrand 28 | modelBuilder.Entity() 29 | .HasOne(p => p.ProductBrand) 30 | .WithMany() 31 | .HasForeignKey(p => p.ProductBrandId); 32 | 33 | base.OnModelCreating(modelBuilder); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Infrastructure/Data/Repositories/BasketRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using Core.Entities; 3 | using Core.Interfaces; 4 | using StackExchange.Redis; 5 | 6 | namespace Infrastructure.Data.Repositories 7 | { 8 | public class RedisBasketRepository : IBasketRepository 9 | { 10 | private readonly IConnectionMultiplexer _redisConnection; 11 | 12 | public RedisBasketRepository(IConnectionMultiplexer redisConnection) 13 | { 14 | _redisConnection = redisConnection ?? throw new ArgumentNullException(nameof(redisConnection)); 15 | } 16 | 17 | public async Task GetBasketAsync(string basketId) 18 | { 19 | var database = _redisConnection.GetDatabase(); 20 | var basketData = await database.StringGetAsync(GetRedisKey(basketId)); 21 | 22 | return basketData.IsNullOrEmpty 23 | ? null 24 | : JsonSerializer.Deserialize(basketData); 25 | } 26 | 27 | public async Task UpdateBasketAsync(Basket basket) 28 | { 29 | var database = _redisConnection.GetDatabase(); 30 | await database.StringSetAsync(GetRedisKey(basket.Id), JsonSerializer.Serialize(basket)); 31 | 32 | return basket; 33 | } 34 | 35 | public async Task DeleteBasketAsync(string basketId) 36 | { 37 | var database = _redisConnection.GetDatabase(); 38 | return await database.KeyDeleteAsync(GetRedisKey(basketId)); 39 | } 40 | 41 | private static string GetRedisKey(string basketId) => $"Basket:{basketId}"; 42 | } 43 | } -------------------------------------------------------------------------------- /Infrastructure/Data/Repositories/ProductRepository.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | using Core.Interfaces; 3 | using Infrastructure.Exceptions; 4 | using Microsoft.EntityFrameworkCore; 5 | 6 | namespace Infrastructure.Data.Repositories 7 | { 8 | public class ProductRepository : IProductRepository 9 | { 10 | private readonly EcommerceContext _context; 11 | 12 | public ProductRepository(EcommerceContext context) 13 | { 14 | _context = context; 15 | } 16 | 17 | public async Task GetProductByIdAsync(int id) 18 | { 19 | return await _context.Products 20 | .Include(p => p.ProductType) 21 | .Include(p => p.ProductBrand) 22 | .FirstOrDefaultAsync(p => p.Id == id) 23 | ?? throw new NotFoundException("Product not found"); 24 | } 25 | 26 | 27 | public async Task> GetProductsAsync() 28 | { 29 | return await _context.Products 30 | .Include(p => p.ProductType) 31 | .Include(p => p.ProductBrand) 32 | .ToListAsync(); 33 | } 34 | 35 | public async Task> GetProductBrandsAsync() 36 | { 37 | return await _context.ProductBrands.ToListAsync(); 38 | } 39 | 40 | public async Task> GetProductTypesAsync() 41 | { 42 | return await _context.ProductTypes.ToListAsync(); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Infrastructure/Data/Repositories/Repository.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | using Core.Enums; 3 | using Core.Interfaces; 4 | using Core.Specifications; 5 | using Microsoft.EntityFrameworkCore; 6 | 7 | namespace Infrastructure.Data.Repositories 8 | { 9 | public class Repository : IRepository where T : BaseEntity 10 | { 11 | private readonly EcommerceContext _context; 12 | 13 | public Repository(EcommerceContext context) 14 | { 15 | _context = context; 16 | } 17 | 18 | public async Task GetByIdAsync(ISpecification spec) 19 | { 20 | return await ApplySpecification(spec).FirstOrDefaultAsync(); 21 | } 22 | 23 | public async Task> ListAsync(ISpecification spec) 24 | { 25 | var query = ApplySpecification(spec); 26 | return await query.ToListAsync(); 27 | } 28 | 29 | public async Task> GetProductBrandsAsync() 30 | { 31 | return await _context.Set().ToListAsync(); 32 | } 33 | 34 | public async Task> GetProductTypesAsync() 35 | { 36 | return await _context.Set().ToListAsync(); 37 | } 38 | 39 | public async Task CountAsync(ISpecification spec) 40 | { 41 | return await ApplySpecification(spec).CountAsync(); 42 | } 43 | 44 | private IQueryable ApplySpecification(ISpecification spec) 45 | { 46 | var query = _context.Set().AsQueryable(); 47 | 48 | if (spec.Criteria != null) 49 | { 50 | query = query.Where(spec.Criteria); 51 | } 52 | 53 | foreach (var include in spec.Includes) 54 | { 55 | query = query.Include(include); 56 | } 57 | 58 | if (spec.IsPagingEnabled) 59 | { 60 | query = query.Skip(spec.Skip).Take(spec.Take); 61 | } 62 | 63 | if (spec.OrderBy != null) 64 | { 65 | if (spec.OrderByDirection == OrderBy.Ascending) 66 | { 67 | query = query.OrderBy(spec.OrderBy); 68 | } 69 | else if (spec.OrderByDirection == OrderBy.Descending) 70 | { 71 | query = query.OrderByDescending(spec.OrderBy); 72 | } 73 | } 74 | 75 | return query; 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /Infrastructure/Data/SeedData/brands.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Id": 1, 4 | "Name": "Adidas" 5 | }, 6 | { 7 | "Id": 2, 8 | "Name": "ASICS" 9 | }, 10 | { 11 | "Id": 3, 12 | "Name": "Victor" 13 | }, 14 | { 15 | "Id": 4, 16 | "Name": "Yonex" 17 | }, 18 | { 19 | "Id": 5, 20 | "Name": "Puma" 21 | }, 22 | { 23 | "Id": 6, 24 | "Name": "Nike" 25 | }, 26 | { 27 | "Id": 7, 28 | "Name": "Babolat" 29 | } 30 | ] -------------------------------------------------------------------------------- /Infrastructure/Data/SeedData/types.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Id": 1, 4 | "Name": "Shoes" 5 | }, 6 | { 7 | "Id": 2, 8 | "Name": "Rackets" 9 | }, 10 | { 11 | "Id": 3, 12 | "Name": "Football" 13 | }, 14 | { 15 | "Id": 4, 16 | "Name": "Kit Bags" 17 | } 18 | ] -------------------------------------------------------------------------------- /Infrastructure/Data/Specifications/ProductCountSpecification.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | using Infrastructure.Data.Specifications; 3 | 4 | namespace API.Specifications 5 | { 6 | public class ProductCountSpecification : BaseSpecification 7 | { 8 | public ProductCountSpecification(int? productBrandId, int? productTypeId, string search) 9 | : base( 10 | x => 11 | (string.IsNullOrEmpty(search) || x.Name.ToLower().Contains(search)) && 12 | (!productBrandId.HasValue || x.ProductBrandId == productBrandId.Value) && 13 | (!productTypeId.HasValue || x.ProductTypeId == productTypeId.Value) 14 | ) 15 | { 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Infrastructure/Data/Specifications/ProductWithTypesAndBrandSpecification.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities; 2 | using Infrastructure.Data.Specifications; 3 | 4 | public class ProductWithTypesAndBrandSpecification : BaseSpecification 5 | { 6 | public ProductWithTypesAndBrandSpecification(string sort, int? productTypeId, int? productBrandId, int skip, int take, string search) 7 | { 8 | AddInclude(p => p.ProductType); 9 | AddInclude(p => p.ProductBrand); 10 | // Default sorting by name in ascending order 11 | ApplyOrderBy(p => p.Name, Core.Enums.OrderBy.Ascending); 12 | 13 | // Parse and apply sorting based on the 'sort' parameter 14 | if (!string.IsNullOrEmpty(sort)) 15 | { 16 | switch (sort.ToLower()) 17 | { 18 | case "priceasc": 19 | ApplyOrderBy(p => p.Price, Core.Enums.OrderBy.Ascending); 20 | break; 21 | case "pricedesc": 22 | ApplyOrderBy(p => p.Price, Core.Enums.OrderBy.Descending); 23 | break; 24 | case "namedesc": 25 | ApplyOrderBy(p => p.Name, Core.Enums.OrderBy.Descending); 26 | break; 27 | // Add more sorting options as needed 28 | default: 29 | ApplyOrderBy(p => p.Name, Core.Enums.OrderBy.Ascending); 30 | break; 31 | } 32 | } 33 | 34 | // Apply filtering based on product type And product brand 35 | if (productBrandId.HasValue || productTypeId.HasValue) 36 | { 37 | // Combine the conditions using And operator 38 | ApplyCriteria(p => 39 | (!productBrandId.HasValue || p.ProductBrandId == productBrandId.Value) && 40 | (!productTypeId.HasValue || p.ProductTypeId == productTypeId.Value)); 41 | } 42 | 43 | // Apply Paging 44 | if (skip >= 0 && take > 0) 45 | { 46 | ApplyPaging(skip, take); 47 | } 48 | 49 | // Apply search criteria 50 | if (!string.IsNullOrEmpty(search)) 51 | { 52 | ApplyCriteria(p => p.Name.ToLower().Contains(search.ToLower())); 53 | } 54 | } 55 | 56 | public ProductWithTypesAndBrandSpecification(int id) : base(product=>product.Id==id) 57 | { 58 | AddInclude(p => p.ProductType); 59 | AddInclude(p => p.ProductBrand); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Infrastructure/Exceptions/NotFoundException.cs: -------------------------------------------------------------------------------- 1 | namespace Infrastructure.Exceptions; 2 | 3 | public class NotFoundException : Exception 4 | { 5 | public NotFoundException(string message) : base(message) 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /Infrastructure/Identity/ApplicationIdentityDbContext.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities.Identity; 2 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore; 4 | 5 | namespace Infrastructure.Identity; 6 | 7 | public class ApplicationIdentityDbContext : IdentityDbContext 8 | { 9 | public ApplicationIdentityDbContext(DbContextOptions options): base(options) 10 | { 11 | 12 | } 13 | 14 | protected override void OnModelCreating(ModelBuilder builder) 15 | { 16 | base.OnModelCreating(builder); 17 | } 18 | } -------------------------------------------------------------------------------- /Infrastructure/Identity/ApplicationIdentityDbContextSeed.cs: -------------------------------------------------------------------------------- 1 | using Core.Entities.Identity; 2 | using Microsoft.AspNetCore.Identity; 3 | using Microsoft.Extensions.DependencyInjection; 4 | 5 | namespace Infrastructure.Identity 6 | { 7 | public static class ApplicationIdentityDbContextSeed 8 | { 9 | public static async Task SeedAsync(IServiceProvider serviceProvider) 10 | { 11 | using (var scope = serviceProvider.CreateScope()) 12 | { 13 | var userManager = scope.ServiceProvider.GetRequiredService>(); 14 | var dbContext = scope.ServiceProvider.GetRequiredService(); 15 | 16 | await SeedUserAsync(userManager, dbContext); 17 | } 18 | } 19 | 20 | private static async Task SeedUserAsync(UserManager userManager, ApplicationIdentityDbContext dbContext) 21 | { 22 | if (!userManager.Users.Any()) 23 | { 24 | var user = new ApplicationUser 25 | { 26 | UserName = "rahul@sahay.com", 27 | Email = "rahul@sahay.com", 28 | DisplayName = "Rahul Sahay", 29 | // Add other properties as needed 30 | Address = new Address 31 | { 32 | Id = Guid.NewGuid().ToString(), 33 | Fname = "Rahul", 34 | Lname = "Sahay", 35 | Street = "123 Bariyatu", 36 | City = "Ranchi", 37 | State = "Jharkhand", 38 | ZipCode = "123456" 39 | } 40 | }; 41 | 42 | var result = await userManager.CreateAsync(user, "Pa$$w0rd@1"); 43 | 44 | if (result.Succeeded) 45 | { 46 | // Optionally, you can do additional seeding or customization here 47 | // For example, add user roles, claims, etc. 48 | } 49 | else 50 | { 51 | throw new Exception($"User creation failed: {string.Join(", ", result.Errors)}"); 52 | } 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Infrastructure/Identity/Migrations/20231121134028_IdentityMigration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace Infrastructure.Identity.Migrations 6 | { 7 | /// 8 | public partial class IdentityMigration : Migration 9 | { 10 | /// 11 | protected override void Up(MigrationBuilder migrationBuilder) 12 | { 13 | 14 | } 15 | 16 | /// 17 | protected override void Down(MigrationBuilder migrationBuilder) 18 | { 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Infrastructure/Identity/Migrations/20231121135735_ModifiedIdentity.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace Infrastructure.Identity.Migrations 6 | { 7 | /// 8 | public partial class ModifiedIdentity : Migration 9 | { 10 | /// 11 | protected override void Up(MigrationBuilder migrationBuilder) 12 | { 13 | 14 | } 15 | 16 | /// 17 | protected override void Down(MigrationBuilder migrationBuilder) 18 | { 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Infrastructure/Infrastructure.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | all 17 | runtime; build; native; contentfiles; analyzers; buildtransitive 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Infrastructure/Services/TokenGenerationService.cs: -------------------------------------------------------------------------------- 1 | using System.IdentityModel.Tokens.Jwt; 2 | using System.Security.Claims; 3 | using System.Text; 4 | using Core.Entities.Identity; 5 | using Core.Interfaces; 6 | using Microsoft.Extensions.Options; 7 | using Microsoft.IdentityModel.Tokens; 8 | 9 | namespace Infrastructure.Services; 10 | 11 | public class TokenGenerationService : ITokenGenerationService 12 | { 13 | private readonly TokenSettings _tokenSettings; 14 | 15 | public TokenGenerationService(IOptions tokenSettings) 16 | { 17 | _tokenSettings = tokenSettings.Value; 18 | } 19 | 20 | public string GenerateToken(IEnumerable claims, int expirationMinutes = 60) 21 | { 22 | var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_tokenSettings.Key)); 23 | var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256); 24 | 25 | var token = new JwtSecurityToken( 26 | issuer: _tokenSettings.Issuer, 27 | audience: _tokenSettings.Audience, 28 | claims: claims, 29 | expires: DateTime.UtcNow.AddMinutes(expirationMinutes), 30 | signingCredentials: credentials 31 | ); 32 | 33 | var tokenHandler = new JwtSecurityTokenHandler(); 34 | return tokenHandler.WriteToken(token); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Infrastructure/bin/Debug/net7.0/Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/bin/Debug/net7.0/Core.dll -------------------------------------------------------------------------------- /Infrastructure/bin/Debug/net7.0/Core.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/bin/Debug/net7.0/Core.pdb -------------------------------------------------------------------------------- /Infrastructure/bin/Debug/net7.0/Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/bin/Debug/net7.0/Infrastructure.dll -------------------------------------------------------------------------------- /Infrastructure/bin/Debug/net7.0/Infrastructure.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/bin/Debug/net7.0/Infrastructure.pdb -------------------------------------------------------------------------------- /Infrastructure/bin/Debug/net7.0/Infrastructure.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net7.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "7.0.0" 7 | }, 8 | "configProperties": { 9 | "System.Reflection.NullabilityInfoContext.IsSupported": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/.NETCoreApp,Version=v7.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")] 5 | -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: System.Reflection.AssemblyCompanyAttribute("Infrastructure")] 14 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 17 | [assembly: System.Reflection.AssemblyProductAttribute("Infrastructure")] 18 | [assembly: System.Reflection.AssemblyTitleAttribute("Infrastructure")] 19 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 20 | 21 | // Generated by the MSBuild WriteCodeFragment class. 22 | 23 | -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 6c5ef6ba66678613c83f030c363be944a7631b94 2 | -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net7.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = Infrastructure 11 | build_property.ProjectDir = /Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Infrastructure/ 12 | -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::System; 3 | global using global::System.Collections.Generic; 4 | global using global::System.IO; 5 | global using global::System.Linq; 6 | global using global::System.Net.Http; 7 | global using global::System.Threading; 8 | global using global::System.Threading.Tasks; 9 | -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/obj/Debug/net7.0/Infrastructure.assets.cache -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/obj/Debug/net7.0/Infrastructure.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/obj/Debug/net7.0/Infrastructure.csproj.CopyComplete -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | f733515a940e9977fede0d1f2783f469bb26fdc5 2 | -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/obj/Debug/net7.0/Infrastructure.dll -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | 7ed3a68fb1d60f6f7b7c339cda57350abba45b13 2 | -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/Infrastructure.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/obj/Debug/net7.0/Infrastructure.pdb -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/ref/Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/obj/Debug/net7.0/ref/Infrastructure.dll -------------------------------------------------------------------------------- /Infrastructure/obj/Debug/net7.0/refint/Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahulsahay19/dotnet-angular-chatgpt/90a2f47aaf2ceb466d5200bf5b58b8be36be46ea/Infrastructure/obj/Debug/net7.0/refint/Infrastructure.dll -------------------------------------------------------------------------------- /Infrastructure/obj/Infrastructure.csproj.EntityFrameworkCore.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Infrastructure/obj/Infrastructure.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | /Users/rahsahay/.nuget/packages/ 8 | /Users/rahsahay/.nuget/packages/ 9 | PackageReference 10 | 6.5.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Infrastructure/obj/Infrastructure.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Infrastructure/obj/project.packagespec.json: -------------------------------------------------------------------------------- 1 | "restore":{"projectUniqueName":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Infrastructure/Infrastructure.csproj","projectName":"Infrastructure","projectPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Infrastructure/Infrastructure.csproj","outputPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Infrastructure/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net7.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net7.0":{"targetAlias":"net7.0","projectReferences":{"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj":{"projectPath":"/Users/rahsahay/Rahul/MyExperiments/MicroServices/dotnet/dotnet-angular-chatgpt/Core/Core.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net7.0":{"targetAlias":"net7.0","dependencies":{"Microsoft.EntityFrameworkCore.Design":{"include":"Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive","suppressParent":"All","target":"Package","version":"[7.0.11, )"},"Microsoft.EntityFrameworkCore.Sqlite":{"target":"Package","version":"[7.0.11, )"},"Microsoft.IdentityModel.Tokens":{"target":"Package","version":"[6.33.0, )"},"StackExchange.Redis":{"target":"Package","version":"[2.7.4, )"},"System.IdentityModel.Tokens.Jwt":{"target":"Package","version":"[6.33.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/7.0.401/RuntimeIdentifierGraph.json"}} -------------------------------------------------------------------------------- /Infrastructure/obj/rider.project.restore.info: -------------------------------------------------------------------------------- 1 | 17010021381317044 -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | redis: 5 | image: "redis:latest" 6 | container_name: "my-redis-container" 7 | ports: 8 | - "6379:6379" 9 | volumes: 10 | - redis-data:/data 11 | 12 | redis-commander: 13 | image: "rediscommander/redis-commander:latest" 14 | container_name: "my-redis-commander-container" 15 | environment: 16 | - REDIS_HOSTS=local:redis:6379 17 | ports: 18 | - "8081:8081" 19 | 20 | volumes: 21 | redis-data: 22 | --------------------------------------------------------------------------------