Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch dev with rel-9.0 #21654

Merged
merged 30 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3612baa
Layered solution index revised
ahmetfarukulu Dec 2, 2024
886264b
Add development environment setup instructions to microservice guide
ahmetfarukulu Dec 3, 2024
17a0eb1
Add overview documentation and enhance index for layered web applicat…
ahmetfarukulu Dec 3, 2024
9d97528
Solution structure doc added for layered web app document
ahmetfarukulu Dec 3, 2024
12efa03
Add navigation links and main components documentation for layered we…
ahmetfarukulu Dec 3, 2024
9b3ae98
Add documentation for web applications in layered solution template
ahmetfarukulu Dec 4, 2024
ed2371d
Refactor OrderAppService to use IRepository<Order, Guid> for better t…
ahmetfarukulu Dec 4, 2024
d28bafc
Remove outdated section on exposing integration services as HTTP APIs…
ahmetfarukulu Dec 5, 2024
60020ac
Add configuration for static HTTP client proxies in CloudCrmOrderingS…
ahmetfarukulu Dec 5, 2024
b2b7353
Add note on automatic API scope creation for Catalog microservice in …
ahmetfarukulu Dec 5, 2024
e3c195f
Add section on MVC and Razor Pages in web applications documentation
ahmetfarukulu Dec 5, 2024
17084d5
Add Angular section to layered web application documentation
ahmetfarukulu Dec 5, 2024
e4b0f73
Add Blazor UI section to layered web application documentation
ahmetfarukulu Dec 5, 2024
8a529bb
Add Db Migrator documentation and navigation links in layered web app…
ahmetfarukulu Dec 5, 2024
7b0b784
Add documentation for mobile applications in layered web application …
ahmetfarukulu Dec 5, 2024
adf135c
Add built-in features and authentication documentation to layered web…
ahmetfarukulu Dec 6, 2024
f1f0cce
adding-new-microservices link fixed in documentation
ahmetfarukulu Dec 6, 2024
d3b9473
Add database configurations documentation for layered web application
ahmetfarukulu Dec 9, 2024
923b86d
Add SaaS module connection string management and database migration i…
ahmetfarukulu Dec 16, 2024
b7d4b7a
Add logging documentation for layered web application solution template
ahmetfarukulu Dec 16, 2024
972ecf9
Add Swagger integration documentation for layered web application
ahmetfarukulu Dec 16, 2024
4d973f3
Add multi-tenancy documentation for layered solution template
ahmetfarukulu Dec 16, 2024
834d81f
Add BLOB storing documentation for layered web application solution t…
ahmetfarukulu Dec 16, 2024
09eefc1
Add CORS configuration documentation for layered web application solu…
ahmetfarukulu Dec 16, 2024
d3373e8
Add Helm charts and Kubernetes deployment documentation for layered s…
ahmetfarukulu Dec 16, 2024
343f77a
Clarify instructions for stopping applications before building the so…
ahmetfarukulu Dec 16, 2024
d126bd3
Optimised images with calibre/image-actions
github-actions[bot] Dec 16, 2024
75cb1e8
Refactor OrderEventHandler to use IProductRepository for improved abs…
ahmetfarukulu Dec 16, 2024
56c4645
Update blob-storing.md
EngincanV Dec 17, 2024
3a67f27
Merge pull request #21648 from abpframework/doc/startup-template
EngincanV Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/en/get-started/microservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@

In this quick start guide, you will learn how to create and run a microservice solution using [ABP Studio](../studio/index.md).

## Setup your development environment

First things first! Let's setup your development environment before creating the first project.

### Pre-requirements

The following tools should be installed on your development machine:

* [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or another IDE that supports .NET development
* [.NET 9.0+](https://dotnet.microsoft.com/en-us/download/dotnet)
* [Node v22.11+](https://nodejs.org/)
* [Docker Desktop with Kubernetes](https://www.docker.com/products/docker-desktop/)
* [helm](https://helm.sh/docs/intro/install/)
* [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/deploy/)
* [mkcert](https://github.com/FiloSottile/mkcert#installation)

## Creating a New Solution

> 🛈 This document uses [ABP Studio](../studio/index.md) to create new ABP solutions. **ABP Studio** is in the beta version now. If you have any issues, you can use the [ABP CLI](../cli/index.md) to create new solutions. You can also use the [getting started page](https://abp.io/get-started) to easily build ABP CLI commands for new project creations.
Expand Down
465 changes: 465 additions & 0 deletions docs/en/solution-templates/layered-web-application/_index.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Layered Solution: Authentication

```json
//[doc-nav]
{
"Previous": {
"Name": "Built-In Features",
"Path": "solution-templates/layered-web-application/built-in-features"
},
"Next": {
"Name": "Database configurations in the Layered solution",
"Path": "solution-templates/layered-web-application/database-configurations"
}
}
```

> Some of the features mentioned in this document may not be available in the free version. We're using the **\*** symbol to indicate that a feature is available in the **[Team](https://abp.io/pricing)** and **[Higher](https://abp.io/pricing)** licenses.

The [Layered solution template](index.md) is fully configured for authentication. All the services and applications are configured to use the [OpenIddict](https://documentation.openiddict.com) library for authentication. They are configured in a common way for authentication. This document explains that common authentication structure.

If you choose the *Tiered* option while [creating](../../get-started/layered-web-application.md#creating-a-new-solution) the solution, the solution will have the `*.AuthServer` project.

## OpenIddict

[OpenIddict](https://documentation.openiddict.com) is an open-source library that provides a simple and easy way to implement an OpenID Connect server in your application. ABP has built-in modules ([OpenIddict](../../modules/openiddict.md), [OpenIddict UI **\***](../../modules/openiddict-pro.md)) to integrate OpenIddict into the solution.

## Domain Layer

The layered solution template *Domain* layer is the responsible for the OpenIddict definitions (Applications, Scopes, etc.). Also, it provides the *OpenIddictDataSeedContributor* class to seed the initial data. It creates the default clients (applications) and scopes for the solution.

The [OpenIddict UI **\***](../../modules/openiddict-pro.md) module is added only if you choose the OpenIddict UI module while creating the solution.

![new-solution-openiddict-module](images/new-solution-openiddict-module.png)

The OpenIddict UI **\*** module provides a user interface to manage the OpenIddict entities such as applications, scopes, etc. You can manage these entities from the application UI.

![openiddict-ui](images/openiddict-ui.png)

## The Authentication Application

The solution may include an external authentication server (`auth-server`) application if you select the *Tiered* option during solution creation. Otherwise, the authentication server is integrated into one of the [Web Applications](web-applications.md).

The authentication server handles token generation, validation, and user account management (e.g., login, registration). It uses the [Account](../../modules/account.md) or [Account Pro **\***](../../modules/account-pro.md) module. The [Account Pro **\***](../../modules/account-pro.md) module additionally supports [social logins](../../modules/account-pro.md#social--external-logins) (e.g., Google, Facebook). Social logins can be enabled, disabled, and configured directly from the application's user interface.

![account-external-provider](images/account-external-provider.png)

## Authentication Flows

Applications in the solution use different authentication flows depending on the application type:

- **MVC UI Web Application**:
Uses the [Hybrid Flow](https://openid.net/specs/openid-connect-core-1_0.html#HybridFlowAuth) (OpenID Connect Authentication) for user authentication.
- **SPA and Swagger Applications**:
Use the [Authorization Code Flow](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth) to authenticate users.

Once a user logs into the system and obtains a token from the authentication server, the `*.HttpApi.Host` application use [JWT Bearer Authentication](https://jwt.io/introduction/) to authorize the user's actions.
49 changes: 49 additions & 0 deletions docs/en/solution-templates/layered-web-application/blob-storing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Layered Solution: BLOB Storing

```json
//[doc-nav]
{
"Previous": {
"Name": "Multi-Tenancy",
"Path": "solution-templates/layered-web-application/multi-tenancy"
},
"Next": {
"Name": "CORS Configuration",
"Path": "solution-templates/layered-web-application/cors-configuration"
}
}
```

> Some of the features mentioned in this document may not be available in the free version. We're using the **\*** symbol to indicate that a feature is available in the **[Team](https://abp.io/pricing)** and **[Higher](https://abp.io/pricing)** licenses.

This document explains how to store BLOBs (Binary Large Objects) in a layered solution. It is common to store files, images, videos, and other large objects in a distributed system. You can learn more about BLOB storage in the [BLOB Storing System](../../framework/infrastructure/blob-storing/index.md) documentation.

In the layered solution template, the [Database Provider](../../framework/infrastructure/blob-storing/database.md) is used to store BLOBs in the database. The `Volo.Abp.BlobStoring.Database.EntityFrameworkCore` or `Volo.Abp.BlobStoring.Database.MongoDB` package provides the necessary implementations to store and retrieve BLOBs in the database. This setup is integrated into the layered solution template and is used in all related projects. You can change the database configuration in the `appsettings.json` file of the related project.

You can use the `IBlobContainer` or `IBlobContainer<T>` service to store and retrieve BLOBs. Here is an example of storing a BLOB:

```csharp
public class MyService : ITransientDependency
{
private readonly IBlobContainer _blobContainer;

public MyService(IBlobContainer blobContainer)
{
_blobContainer = blobContainer;
}

public async Task SaveBytesAsync(byte[] bytes)
{
await _blobContainer.SaveAsync("my-blob-1", bytes);
}

public async Task<byte[]> GetBytesAsync()
{
return await _blobContainer.GetAllBytesOrNullAsync("my-blob-1");
}
}
```

The *File Management* module is optional and can be added to the solution during the creation process. It provides a user interface to manage folders and files. You can learn more about the module in the [File Management *](../../modules/file-management.md) document.

![file-management](images/file-management-index-page.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Layered Solution: Built-In Features

```json
//[doc-nav]
{
"Previous": {
"Name": "Mobile Applications",
"Path": "solution-templates/layered-web-application/mobile-applications"
},
"Next": {
"Name": "Authentication",
"Path": "solution-templates/layered-web-application/authentication"
}
}
```

The Layered solution template includes several built-in features to help you get started with your layered web application. These features are designed to provide a solid foundation for your application and help you focus on your business logic. This document provides an overview of the built-in features included in the Layered solution template. The following documents explains these features in details:

* [Authentication](authentication.md)
* [Database configurations](database-configurations.md)
* [Logging (with Serilog)](logging.md)
* [Swagger integration](swagger-integration.md)
* [Multi-Tenancy](multi-tenancy.md)
* [BLOB storing](blob-storing.md)
* [CORS configuration](cors-configuration.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Layered Solution: CORS Configuration

```json
//[doc-nav]
{
"Previous": {
"Name": "BLOB Storing",
"Path": "solution-templates/layered-web-application/blob-storing"
},
"Next": {
"Name": "Helm Charts and Kubernetes",
"Path": "solution-templates/layered-web-application/helm-charts-and-kubernetes"
}
}
```

Cross-Origin Resource Sharing (CORS) is a security feature that allows web applications to make requests to a different domain than the one that served the web page.

In the layered solution template, CORS configuration is applied in the following cases:
- If you select the [Tiered solution](solution-structure.md#tiered-structure-).
- If you choose [Angular](web-applications.md#angular) as the web application type.
- If you choose [No UI](web-applications.md#no-ui) as the web application type.

The CORS settings are configured in the `appsettings.json` file of the corresponding project. Typically, the web application serves as the entry point for front-end applications, so it must be configured to accept requests from different origins.

The default configuration in `appsettings.json` is as follows:

```json
{
"App": {
"CorsOrigins": "https://*.MyProjectName.com"
}
}
```

You can modify the `CorsOrigins` property to include additional domains or wildcard subdomains as required by your application.
Loading
Loading