Skip to content

CloudSales is a sample api-based application designed to demonstrate cloud service build with best design practices.

Notifications You must be signed in to change notification settings

VukTheBeast/cloud-sales

Repository files navigation

Crayon CloudSales

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.


🧭 Overview

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.

✅ Features

  • 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.

🧱 Design Principles

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:

Onion Architecture Diagram

  • 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).

    image

This design is inspired by:


🛠️ Technologies


🚀 Getting Started

Prerequisites

Setup

  1. Clone the repository:
    git clone https://github.com/your-org/crayon-cloudsales.git
    

About

CloudSales is a sample api-based application designed to demonstrate cloud service build with best design practices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages