How moataz-1/smartclean works
Smartclean is an ASP.NET API for product and category browsing/management, customer baskets, and account authentication. The principal workflow starts with an API client calling a controller, which uses the unit-of-work abstraction to reach application data; product operations also map DTOs and manage product images. Authentication supports registration, login, email confirmation, and password reset. The graph reflects documented calls and source-index references; several repository implementations and ancillary controllers were not excerpted, so their internal behavior and some wiring remain uncertain.
Main entry points: DependencyInjection.cs Service registration · UnitOfWork.cs Unit of work · ProductRepositry.cs Product repository · ProductsController.cs Products API
Components 20
API surface
- Account API
Smartclean.API/Controllers/AccountController.cs - Products API
Smartclean.API/Controllers/ProductsController.cs - Categories API
Smartclean.API/Controllers/CategorysController.cs - Basket API
Smartclean.API/Controllers/BasketController.cs - Controller base
Smartclean.API/Controllers/BaseController.cs - API responses
Smartclean.API/Helper/ResponseAPI.cs
Domain model
- Product DTOs
Smartclean.core/DTO/ProductDTO.cs - Product model
Smartclean.core/Entities/Product/Product.cs - Category model
Smartclean.core/Entities/Product/Category.cs - Basket model
Smartclean.core/Entities/CustomerBasket.cs - Account model
Smartclean.core/Entities/AppUser.cs
Persistence
- Unit of work
Smartclean.infrastructure/Repositories/UnitOfWork.cs - Product repository
Smartclean.infrastructure/Repositories/ProductRepositry.cs - Authentication repository
Smartclean.infrastructure/Repositories/AuthRepository.cs - Application database
Smartclean.infrastructure/Data/AppDbContext.cs
Supporting services
- Image management
Smartclean.infrastructure/Services/ImageManagementService.cs - Email delivery
Smartclean.infrastructure/Services/EmailService.cs - Token generation
Smartclean.infrastructure/Services/GenerateToken.cs - Service registration
Smartclean.infrastructure/DependencyInjection.cs
Other components
- API client
Connections 20
- API client → Account API: calls
Smartclean.API/Controllers/AccountController.cs - API client → Products API: calls
Smartclean.API/Controllers/ProductsController.cs - API client → Categories API: calls
Smartclean.API/Controllers/CategorysController.cs - API client → Basket API: calls
Smartclean.API/Controllers/BasketController.cs - Account API → Unit of work: uses
Smartclean.API/Controllers/AccountController.cs - Products API → Unit of work: uses
Smartclean.API/Controllers/ProductsController.cs - Categories API → Unit of work: uses
Smartclean.API/Controllers/CategorysController.cs - Basket API → Unit of work: uses
Smartclean.API/Controllers/BasketController.cs - Products API → Product DTOs: accepts and returns
Smartclean.API/Controllers/ProductsController.cs - Product repository → Application database: queries and saves
Smartclean.infrastructure/Repositories/ProductRepositry.cs - Product repository → Image management: manages images
Smartclean.infrastructure/Repositories/ProductRepositry.cs - Product repository → Product DTOs: maps
Smartclean.infrastructure/Repositories/ProductRepositry.cs - Authentication repository → Email delivery: sends email
Smartclean.infrastructure/Repositories/AuthRepository.cs - Authentication repository → Token generation: creates login token
Smartclean.infrastructure/Repositories/AuthRepository.cs - Service registration → Application database: registers
Smartclean.infrastructure/DependencyInjection.cs - Service registration → Unit of work: registers
Smartclean.infrastructure/DependencyInjection.cs - Service registration → Authentication repository: registers
Smartclean.infrastructure/DependencyInjection.cs - Service registration → Image management: registers
Smartclean.infrastructure/DependencyInjection.cs - Service registration → Email delivery: registers
Smartclean.infrastructure/DependencyInjection.cs - Service registration → Token generation: registers
Smartclean.infrastructure/DependencyInjection.cs