How hosseinjafaridev/sabzmarket works
SabzMarket is a Persian agricultural marketplace with seller and buyer desktop clients backed by an ASP.NET API. Its domain workflow includes account and seller/farmer profiles, product listings and categories, carts, checkout, order-detail fulfillment, and error logging. The API delegates to application services and repositories over an EF Core context; shared DTOs and view models carry data across layers. The README identifies the three-layer branch structure. Client-to-API and several unexcerpted feature links are not shown, so they are omitted or marked unverified.
Main entry points: SellerService.cs Seller service · OrderService.cs Checkout and orders · SabzMarketDbContext.cs EF data context · FarmerService.cs Farmer service
Components 26
Desktop clients
- Seller desktop
SabzMarket/Program.cs - Buyer desktop
SabzMarketBuyer.UI/Program.cs - Seller HTTP helper
SabzMarket/Http/HttpClientHelper.cs - Buyer HTTP helper
SabzMarketBuyer.UI/Http/HttpClientHelper.cs
API presentation
- Seller endpoints
SabzMarket.API/Controllers/SellerController.cs - Farmer endpoints
SabzMarket.API/Controllers/FarmerController.cs - Product endpoints
SabzMarket.API/Controllers/ProductController.cs - Cart endpoints
SabzMarket.API/Controllers/CartItemController.cs - Order endpoints
SabzMarket.API/Controllers/OrderController.cs
Application services
- Seller service
SabzMarket.BLL/SellerService.cs - Farmer service
SabzMarket.BLL/FarmerService.cs - Product service
SabzMarket.BLL/ProductService.cs - Cart service
SabzMarket.BLL/CartItemService.cs - Checkout and orders
SabzMarket.BLL/OrderService.cs - Photo saving
SabzMarket.BLL/SavePhoto.cs - Error logging service
SabzMarket.BLL/ErrorService.cs
Persistence
- Seller repository
SabzMarket.DAL/SellerRepository.cs - Product repository
SabzMarket.DAL/ProductRepository.cs - Order repository
SabzMarket.DAL/OrderRepository.cs - EF data context
SabzMarket.DAL/SabzMarketDbContext.cs - Marketplace entities
SabzMarket.DAL/Entities
Shared contracts
- API route catalog
SabzMarket.Share/ApiRoutes.cs - DTOs and view models
SabzMarket.Share/Models - Domain messages
SabzMarket.Share/Messages.cs
Other components
- Seller
- Buyer
Connections 26
- Seller → Seller desktop: uses
- Buyer → Buyer desktop: uses
- Seller desktop → Seller HTTP helper: HTTP requests
- Buyer desktop → Buyer HTTP helper: HTTP requests
- Seller HTTP helper → API route catalog: uses routes
SabzMarket/Http/HttpClientHelper.cs - Buyer HTTP helper → API route catalog: uses routes
SabzMarketBuyer.UI/Http/HttpClientHelper.cs - Seller endpoints → Seller service: delegates
SabzMarket.API/Controllers/SellerController.cs - Farmer endpoints → Farmer service: delegates
SabzMarket.API/Controllers/FarmerController.cs - Product endpoints → Product service: delegates
SabzMarket.API/Controllers/ProductController.cs - Cart endpoints → Cart service: delegates
SabzMarket.API/Controllers/CartItemController.cs - Seller service → Seller repository: calls
SabzMarket.BLL/SellerService.cs - Seller service → Photo saving: saves photos
SabzMarket.BLL/SellerService.cs - Farmer service → Photo saving: saves photos
SabzMarket.BLL/FarmerService.cs - Farmer service → Domain messages: uses messages
SabzMarket.BLL/FarmerService.cs - Product service → Product repository: calls
SabzMarket.BLL/ProductService.cs - Product service → Photo saving: saves photos
SabzMarket.BLL/ProductService.cs - Order endpoints → Checkout and orders: delegates
- Checkout and orders → Order repository: calls
SabzMarket.BLL/OrderService.cs - Order repository → EF data context: queries and writes
SabzMarket.DAL/OrderRepository.cs - Seller repository → EF data context: queries and writes
SabzMarket.DAL/SellerRepository.cs - Product repository → EF data context: queries and writes
SabzMarket.DAL/ProductRepository.cs - EF data context → Marketplace entities: maps entities
SabzMarket.DAL/SabzMarketDbContext.cs - Checkout and orders → Cart service: loads and clears cart
SabzMarket.BLL/OrderService.cs - Checkout and orders → Error logging service: logs failures
SabzMarket.BLL/OrderService.cs - Seller endpoints → DTOs and view models: accepts and returns
SabzMarket.API/Controllers/SellerController.cs - Seller service → DTOs and view models: maps profile data
SabzMarket.BLL/SellerService.cs