https://github.com/vitaliy-bezugly/ordersapi
A set of clean approaches based on cqrs (mediatR) to api development using the fictional example of customer orders
https://github.com/vitaliy-bezugly/ordersapi
api-rest asp-net-core cqrs mediatr sqlite unit-testing x-unit
Last synced: over 1 year ago
JSON representation
A set of clean approaches based on cqrs (mediatR) to api development using the fictional example of customer orders
- Host: GitHub
- URL: https://github.com/vitaliy-bezugly/ordersapi
- Owner: vitaliy-bezugly
- Created: 2023-02-24T20:20:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-09T17:16:01.000Z (about 3 years ago)
- Last Synced: 2025-01-17T14:56:30.436Z (over 1 year ago)
- Topics: api-rest, asp-net-core, cqrs, mediatr, sqlite, unit-testing, x-unit
- Language: C#
- Homepage: https://clean-order-api.herokuapp.com/
- Size: 294 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Orders api
A set of clean approaches based on cqrs (mediatR) to api development using the fictional example of customer orders
## 🧐 About app
The API describes a fictional example of creating product orders for a specific customer. The API, built using RESTful principles, allows you to perform CRUD operations on 3 data types: Customer, Product, and Order.
This project is based on ASP .NET Core using the MediatR library. The application uses Sqlite as a persistent data store. The main reasons for this are ease of implementation and no need for a SQL server, which is acceptable for a home project.
## 🚀 Deployment
This application has already been deployed to the web using the Heroku service.
To use it as API add to the route api/v1/[ControllerName]
## 🛠️ Run Locally
Clone the project
```bash
git clone https://github.com/VitaliyMinaev/OrdersApi.git
```
Go to the project directory
```bash
cd OrdersApi
```
Start the server
```bash
dotnet run
```
## 🧿 Environment Variables
To run this project, you will need to add the following environment variables
`DatabaseCreated` - Responsible for the state of the data source, takes the value "true" if the database has already been created and the current state of the objects describes their representation in the database (no migrations are required) and "false" if the database requires a migration operation (recommended value for the first run)
## 💻 Libraries and frameworks with which the application was created
-
ASP .NET Core Web API- as backend framework MediatR-
Entity Framework Core- as ORM -
Sqlite- as data storage -
In Memory caching- withScrutor -
XUnit- as framework for testing
## 👨💻 Authors
- [@VitaliyMinaev](https://github.com/VitaliyMinaev)
## Screenshots
