How alexborges000/ecommercehub works
BlazorShop is a Blazor/ASP.NET Core e-commerce application. Its documented user workflow is browsing the product and category catalog, viewing product details, and managing a shopping cart through the Web client and REST API, with data persisted by the API. The tree also shows account, authentication, and address capabilities. Checkout, inventory, purchase history, and administration are documented as in development; their wiring is not established by the sampled source, so they are not represented as implemented flows.
Main entry points: CarrinhoCompraController.cs Cart endpoints · AppDbContext.cs SQL database · DTOs Shared DTOs · ProdutosController.cs Product endpoints
Components 19
Web client
- Blazor application
BlazorShop.Web/Program.cs - Catalog client
BlazorShop.Web/Services/ProdutoService.cs - Cart client
BlazorShop.Web/Services/CarrinhoCompraService.cs - Account client
BlazorShop.Web/Services/UsuarioService.cs
REST API
- Product endpoints
BlazorShop.Api/Controllers/ProdutosController.cs - Cart endpoints
BlazorShop.Api/Controllers/CarrinhoCompraController.cs - User endpoints
BlazorShop.Api/Controllers/UsuarioController.cs - Address endpoints
BlazorShop.Api/Controllers/EnderecoController.cs - Address service
BlazorShop.Api/Services/Address/EnderecoService.cs
Commerce data
- Cart repository
BlazorShop.Api/Repositories/CarrinhoCompraRepository.cs - Product repository
BlazorShop.Api/Repositories/ProdutoRepository.cs - Address repository
BlazorShop.Api/Repositories/EnderecoRepository.cs - SQL database
BlazorShop.Api/Context/AppDbContext.cs - Shared DTOs
BlazorShop.Models/DTOs
Accounts and security
- Auth endpoints
BlazorShop.Api/Controllers/AuthController.cs - Authentication service
BlazorShop.Api/Security/Authentication/AuthService.cs - User services
BlazorShop.Api/Services/Usuarios - User repository
BlazorShop.Api/Repositories/UsuarioRepository.cs
Other components
- Shopper
Connections 22
- Shopper → Blazor application: uses
- Catalog client → Product endpoints: REST requests
- Cart client → Cart endpoints: REST requests
- Account client → User endpoints: REST requests
- Cart endpoints → Cart repository: invokes
- Cart endpoints → Product repository: looks up products
- Cart repository → SQL database: reads and writes
- Product repository → SQL database: reads
- User endpoints → User services: invokes
- User services → User repository: uses
- User endpoints → Address service: address operations
- Address endpoints → Address service: invokes
- Address service → Address repository: uses
- Address repository → SQL database: reads and writes
- Auth endpoints → Authentication service: invokes
- Authentication service → User repository: looks up users
- User repository → SQL database: reads and writes
- Product endpoints → Product repository: catalog access
- Product endpoints → Shared DTOs: exchanges DTOs
- Cart endpoints → Shared DTOs: exchanges DTOs
- Catalog client → Shared DTOs: uses DTOs
- Cart client → Shared DTOs: uses DTOs