https://github.com/zonel/pricenegotiationapi
💲 Web API platform for price negotiations between customers and employees of an online store.
https://github.com/zonel/pricenegotiationapi
clean-architecture dapper docker-compose dotnet fluentvalidation mediatr mssql serilog webapi xunit
Last synced: 3 months ago
JSON representation
💲 Web API platform for price negotiations between customers and employees of an online store.
- Host: GitHub
- URL: https://github.com/zonel/pricenegotiationapi
- Owner: zonel
- Created: 2023-12-11T10:35:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-18T11:43:51.000Z (over 1 year ago)
- Last Synced: 2025-02-17T23:23:22.880Z (3 months ago)
- Topics: clean-architecture, dapper, docker-compose, dotnet, fluentvalidation, mediatr, mssql, serilog, webapi, xunit
- Language: C#
- Homepage:
- Size: 98.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PriceNegotiationAPI
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.## Technologies
- .NET 7
- MSSQL Server
- Dapper
- MediatR
- Xunit
- Fluent Validations
- Serilog
- Clean Architecture## Architecture
The application follows the principles of Clean Architecture, emphasizing separation of concerns and maintainability. It's organized into distinct layers:
### 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.## Database Overview
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.
## API Endpoints
### Products Endpoint:
### Negotiation Endpoint:
### User Endpoint:
## Launch Instructions
To run the application locally:
1. Clone the repository.
2. Create and run a container using docker-compose located in my project.
3. 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 ```
6. 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)**