📐 Architecture and Design Pattern - 📂 Folder Structure - 💻 Libraries - 🚀 Getting Started
A job search website is an online platform that connects job seekers with employers. It is a useful tool that helps both parties save time and effort in the job search and recruitment process.
- Clean Architecture:
- CQRS:
- Api
- Is where endpoints are located.
- receives input data and passes commands or queries down to the
Application
layer.
- Contract:
- Holds the input data within a request body. This data, along with parameters or query parameters, is formatted to comply with the input data requirements of the application layer.
- Invoked by the
Api
layer.
- Application:
- Common is a place to store configurations for validation, authorization, and logging actions. It also contains security interface (jwt service, identity,...), exceptions, mapping configurations, and return result definitions,...
- Each entity is divided into 3 folders:
- Commands folder: Contains 3 files: Command (specifies input data), Handler (processes logic), and Validator (validates input data).
- Queries folder: Contains 3 files: Query (specifies input data), Handler (processes logic), and Response (defines output data).
- Common folder: Contains commonly used data such as mappers for entities with input and output data.
- IRepository folder: Declares interfaces that will be defined in the
Infrastructure
layer - Call the
Infrastructure
layer during data processing. - Called by
Api
folder.
- Infrastructure:
- Common:
- Is the place where common Interface defined.
- Contains application database context and database initialized.
- Each entity has:
- Configuration: file to define the relationship between two entities.
- Repository: to define interface in the Irepository folder in
Application
layer. - Background Service(optional): to define background service.
- EntityFrameworkCore: contains interceptors and imgrations.
- Called by
Application
layer.
- Common:
- Domain:
- Represents data structures used within the system.
- Can be called by the
Infrastructure
layer.
- MediatR
- EntityFrameworkCore
- FluentValidation
- Mapster
- FluentEmail
- Authentication.JwtBearer
- Linq
Here you describe how to run your project locally
Here you list all prerequisites necessary for running your project. For example:
How to clone project
git clone https://github.com/Tam-Vu/JobSite.git
Use the appsettings.Development.json
to create your configuration file
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"JwtSettings": {
"Secret": "",
"TokenExpirationInMinutes": ,
"Issuer": "",
"Audience": ""
},
"EmailSenderSettings": {
"Server": "smtp.gmail.com",
"Port": 587,
"Username": "",
"Password": "",
"EnableSsl": true
},
"WebServer": {
"Host": ""
},
"DatabaseConfiguration": {
"ConnectionString": ""
}
}
How to start your project
cd JobSite
dotnet restore
dotnet run --project src\JobSite.Api