Crayon CloudSales is a sample api-based application designed to demonstrate cloud service ordering and purchasing flow. It is built using the Clean Architecture approach and incorporates technologies such as ASP.NET Core, MediatR, FluentValidation, and Entity Framework Core. The solution simulates integration with external cloud platforms like CCP (Crayon Cloud Platform) and handles user account management, software ordering, and purchase tracking.
The project consists of the following layers:
- Application Layer: Contains business logic, command/query handlers, validation, and service interfaces.
- Infrastructure Layer: Includes integrations with external services (e.g., CCP)
- Persistence Layer: Manages database-related concerns like migrations and entity configurations, data access via Entity Framework Core.
- Web API Layer: The entry point for the application, exposing endpoints for account operations and software purchasing.
- Retrieve and display available cloud software from external APIs.
- Validate and process software orders.
- Store purchased software data in a local database.
- Unit testing support using NUnit, FakeItEasy, and Shouldly.
This project is built following the Clean Architecture and SOLID principles, specifically embracing the Dependency Inversion Principle. The goal is to achieve a system with:
- High maintainability: Business rules are isolated from external concerns.
- Testability: Core logic is free of infrastructure dependencies.
- Flexibility: External systems (like databases or APIs) can be swapped or modified with minimal changes.
The separation of concerns is achieved through:
-
Interfaces and abstractions in the Application layer.
-
Dependency Injection to wire up implementations at runtime.
-
Inversion of Control to make high-level modules independent of low-level modules (image bellow).
This design is inspired by:
- .NET 8 SDK
- [SQL Server or localdb] (for EF Core)
- Visual Studio or Rider
- Clone the repository:
git clone https://github.com/your-org/crayon-cloudsales.git
