Getting started with the project - ita-social-projects/WhatBackend GitHub Wiki
- Introduction
- Entities & their relations
- Project architecture
- Project structure
- Interacting with endpoints
- Authentication & authorization
- Useful links
General logic & application purpose description
PLACEHOLDER
Divide into subchapters and describe. Add ER-model
PLACEHOLDER
The architecture of our project is multi-layered, each of which has its own responsibilities: The main layer of interaction is the API with which the client works Associated with him
- The main part of the project with
-
- Data layer
-
- Core level
-
- Business logic level
- Admin panel
- Message sending microservices Brief description of project components and how they interact with each other:
PLACEHOLDER
Back-end side of the project is stored inside CharlieBackend solution, which is a container for projects in Visual Studio.
The solution consists of the following projects:
Name | Type | Description | References to other projects |
---|---|---|---|
CharlieBackend.Core | class library | Is a project that stores core elements of the application such as entities, DTOs and models. | none |
CharlieBackend.Data | class library | Is a project that stores: application's database context, configurations for all of the entities, and repositories that provide access to database interaction operations (including basic CRUD operations). | CharlieBackend.Core |
CharlieBackend.Business | class library | Is a project that stores business logic services (both interfaces and their implementations). | CharlieBackend.Core, CharlieBackend.Data |
CharlieBackend.Api | web application | Is a ASP.NET Core Web API project that is responsible for handling HTTP requests. | CharlieBackend.Core, CharlieBackend.Business, CharlieBackend.Root |
CharlieBackend.Root | class library | Is a composition root project for dependency injection. | CharlieBackend.Business, CharlieBackend.Data |
CharlieBackend.Api.UnitTest | unit test project | Is a project that stores unit tests. | CharlieBackend.Core, CharlieBackend.Business, CharlieBackend.Data |
CharlieBackend.AdminPanel | web application | Is a ASP.NET Core MVC project that provides admin-specific UI for application's administrator. | CharlieBackend.Core |
Currently all of the projects are targeting .NET Core 3.1
In the list below you can see some of the main NuGet packages that are installed and used by the projects:
- CharlieBackend.Core
- CharlieBackend.Data
- CharlieBackend.Business
- CharlieBackend.Api
- CharlieBackend.Api.UnitTest
Some of the projects may reference same NuGet packages.
Description See wiki page
PLACEHOLDER
To log in to the app you should open Swagger and in the “Account” section choose first request (path “/api/accounts/auth”) and pass email and password (remember, that in the table accounts in the column ‘password’ we store encrypted passwords and you can not use them). If you passed incorrect parameters you will receive error 401 “Incorrect credential, please, try again”. In case of a successful transaction, you will receive code 200 and information about your account.
For account validation uses the JSON web security token (JWT). This allows protecting information transferred between client and server in one of the safest ways. JWT contains:
- header - information on how the JWT signature should be calculated
- payload - carry the bulk of our JWT, also called the JWT Claims.
- signature - a hash of the following components: the header, the payload, secret.
Upon successful operation, you will receive a bearer token - a cryptic string, generated by the server in response to a login request. Before submitting requests, you must submit this token in the "Authorization" field.
There are four user roles in the application:
- student,
- mentor,
- secretary,
- admin.
When registering an account, you must enter email, first name, last name, password (and confirm it). You will then have a user account with no role assigned. The role must be specified later. You can choose only three roles: student, mentor, secretary in the appropriate API section (admin can be added only to the database and by other admin).
PLACEHOLDER
PLACEHOLDER