This web application serves as a platform for price negotiations between customers and employees of an online store. Customers can propose a price for a product, and employees have the ability to accept or reject the proposal. Built using CLEAN architecture and containerized using Docker for ease of use.
- .NET 7
- MSSQL Server
- Dapper
- MediatR
- Xunit
- Fluent Validations
- Serilog
- Clean Architecture
The application follows the principles of Clean Architecture, emphasizing separation of concerns and maintainability. It's organized into distinct layers:
- Presentation Layer: Responsible for handling API requests and responses.
- Infrastructure Layer: Manages external concerns like database access, adhering to interfaces defined in the Domain layer.
- Application Layer: Contains the business logic, including negotiation processes and product catalog management.
- Domain Layer: Holds the core business entities and logic, ensuring independence from external concerns.
The application utilizes MSSQL Server Docker image for data storage. The database schema comprises tables for product catalog, negotiation details, and any necessary additional entities.
To run the application locally:
-
Clone the repository.
-
Create and run a container using docker-compose located in my project.
-
Set up the MSSQL Server database using command below:
docker exec -it pricenegotiationdb /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password123 -i /sql-scripts/init-script.sql
-
Access the API endpoints through a tool like Postman or via your browser.
(default port is set to 5000 so you can access swagger by going to: localhost:5000/swagger)