Skip to content
Snippets Groups Projects
Commit d589dd71 authored by Matej Vavrek's avatar Matej Vavrek
Browse files

Updated readme

parent ff8206df
No related branches found
No related tags found
2 merge requests!46Milestone-2,!39Documentation to match the codebase - Services, etc.
Pipeline #
......@@ -87,14 +87,24 @@ Much of the business logic, such as restaurant ranking, is left to the business
- **Program.cs**: The entry point for the application, which sets up the ASP.NET Core environment.
- **appsettings.json**: Configuration file used to set environment-specific settings, like connection strings and app configurations. The example of how this file should be set-up can be found in `appsettings-example.json`.
- **Controllers**: Contains the API controllers that handle HTTP requests. Controllers are named after the entity they represent.
- **Middleware**: Contains custom middleware - Exception handling, request logging, authentication. The logging is currently setup to only write to the console.
- **Models**: Contains model classes used in the application, each subfolder contains relevant entity models. The `Converter.cs` class is a static class that handles the conversion between an API model and a data layer model.
- **Middleware**: Contains custom middleware - Exception handling, request logging, authentication and others. The logging is currently setup to write to the console and to an elasticsearch database.
- **Models**: Contains model classes used in the API layer of the application, each subfolder contains relevant entity models.
### The MVC Project
This project represents the more formal forntend of the end product built upon the Model-View-Controller architecture pattern. Currently, the project is mostly a template skeleton that will be iterated upon in the next milestone. The most notable feature of the current version of this project is the Identity Framework integration feature.
### The Business Layer Project
This project encompasses the business logic layer, which takes care of most of the logic for the application. It is primarily composed of services. Each service relates to specific functionality of the application.
Data is passed to this layer in the form of **Data Transfer Objects (DTO)**, which are also contained within this layer. Transformation of data from Models to DTOs is done using the **mapster** library.
### The DAL (Data Access Layer) Project
This layer encompasses low level access to the database, providing models and seeding for the database entities.
- **Models** - Contains database entity models.
- **Data** - Contains the seeding code in `DataInitializer.cs` and Database Context in `RestaurantDBContext.cs`.
- **Constants** - Contains ids that are used for seeding in `SeedingValues.cs`.
- **Enums** - Contains database-relevant enums.
- **ImagePersistence** - Contains logic relevant to storing and reading images from image storage. Currently contains logic related to file system storage.
## Use Case Diagram
![UseCase_Diagram](diagrams/usecase.png)
......@@ -132,14 +142,27 @@ This layer encompasses low level access to the database, providing models and se
- **Comments** (EventComment and ReviewComment): Users can comment on both reviews and events, allowing interaction and feedback. Each comment can have its own parent-child relationship, meaning replies to comments are supported.
## Controllers
## API Controllers
- **EventCommentController** - Provides actions to retrieve, create, update and delete Event comments.
- **EventController** - Provides actions to retrieve, create, update and delete Events.
- **EventParticipantController** - Provides actions to retrieve, create, update and delete Event Participants.
- **Location Controller** - Provides actions to Retrieve and Update Locations. Delete and Create is bound to the existence of a restaurant, hence why these operations are not allowed as standalone operations.
- **Restaurant Controller** - Provides actions to retrieve, create, update and delete Restaurants.
- **LocationController** - Provides actions to Retrieve and Update Locations. Delete and Create is bound to the existence of a restaurant, hence why these operations are not allowed as standalone operations.
- **RestaurantController** - Provides actions to retrieve, create, update and delete Restaurants.
- **ReviewAggregateController** - Provides actions to retrieve review aggregates. In the future, Review Aggregates will be recalculated in a fixed period of time, but currently this is not implemented - instead, you may invoke recalculation by using the POST call with a relevant restaurant ID.
## Services
- **EventCommentService** - Provides methods that help manage event comments within the application.
- **EventParticipantService** - Provides methods that help manage event participants within the application.
- **EventService** - Provides methods that help manage events within the application.
- **ImageService** - Provides methods that help manage images used within the application.
- **LocationService** - Provides methods that help manage restaurant locations within the application.
- **RestaurantMaintainerService** - Provides methods that help manage the user - restaurant relationship of restaurant maintaners.
- **RestaurantService** - Provides methods that help manage restaurants within the application.
- **ReviewAggregateResultService** - Provides methods that help query review aggregate results for restaurants.
- **ReviewCommentService** - Provides methods that help manage review comments within the application.
- **ReviewService** - Provides methods that help manage reviews within the application.
- **UserService** - Provides methods that help manage users within an application.
## Technical Overview
- **Framework**: ASP.NET Core
- **Language**: C#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment