Skip to content

Commit

Permalink
Adjusting the files
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadoc committed Jan 17, 2024
1 parent dbf48dd commit 4240ec2
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 72 deletions.
6 changes: 3 additions & 3 deletions _data/sidebars/acp_user_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ entries:
- title: Manifest JSON file
url: /docs/acp/user/develop-an-app/code-snippets/manifest-json-file.html
- title: Translation JSON file
url: /docs/acp/user/develop-an-app/code-snippets/translation-json-file.html
url: /docs/acp/user/develop-an-app/code-snippets/translation-json-file.html
- title: Connect an app
url: /docs/acp/user/develop-an-app/connect-an-app.html
- title: Set up the message broker
url: /docs/acp/user/develop-an-app/set-up-the-message-broker.html
- title: Debug an app with XDebug
Expand All @@ -39,6 +41,4 @@ entries:
url: /docs/acp/user/sync-api.html
- title: Async API
url: /docs/acp/user/async-api.html
- title: Connect new App
url: /docs/acp/user/develop-an-app/app-connect.html

36 changes: 16 additions & 20 deletions docs/acp/user/app-connect.md → docs/acp/user/connect-an-app.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
---
title: ACP App Connection and Configuration
description: This document provides information on connecting, configuring, and disconnecting an ACP App using AppRegistry.
title: Connect an app
description: Learn how to connect, configure, and disconnect an ACP app using AppRegistry.
template: howto-guide-template
---

This document provides comprehensive information on connecting, configuring, and disconnecting an ACP (AppConnectionProvider) App using the AppRegistry in the Spryker Commerce OS (SCOS) environment. Communication between the ACP App and SCOS is facilitated through the AppRegistry via REST API and message queues.
This document describes how to connect, configure, and disconnect an ACP app (AppConnectionProvider) using the AppRegistry in the Spryker Cloud Commerce OS (SCCOS) environment. Communication between the ACP app and SCCOS is facilitated through the AppRegistry via REST API and message queues.

### Communication Process:
## Communication process

1. **App Registration:**
- The App registers in the AppRegistry and provides manifest(s).
The communication process between an ACP app and SCCOS includes the following stages:

2. **Tenant Registration:**
- The Tenant registers in the AppRegistry and gains access to the list of registered Apps.
1. App registration: The app registers in the AppRegistry and provides the manifests.
2. Tenant registration: The tenant registers in the AppRegistry and gains access to the list of registered apps.
3. Connecting an app: The Tenant initiates the connection process by calling the `apps/connect` endpoint of the AppRegistry.
4. Endpoint invocation: AppRegistry, in turn, calls the `apps/connect` endpoint of the respective app.

3. **Connecting an App:**
- The Tenant initiates the connection process by calling the `apps/connect` endpoint of the AppRegistry.
This process enables tenants to send API requests to the ACP app and enqueue messages. Conversely, the ACP App can send API requests to the AppRegistry and enqueue messages.

4. **Endpoint Invocation:**
- AppRegistry, in turn, calls the `apps/connect` endpoint of the respective App.
![communication-diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/aop/dev/acp-app-connection-and-configuration/architecture-overview.png)

This process enables Tenants to send API requests to the ACP App and enqueue messages. Conversely, the ACP App can send API requests to the AppRegistry and enqueue messages.
## Register an app in the AppRegistry

![Communication Diagram](https://spryker.s3.eu-central-1.amazonaws.com/docs/aop/dev/app-endpoint/architecture-owerview.png)
To register your app, run the following command:

## Registering an App in the AppRegistry

To register your App, utilize the following console command:
```bash
docker/sdk cli vendor/bin/acp app:register --appIdentifier {YOUR APP IDENTIFIER} --registryUrl http://glue.registry.spryker.local --baseUrl "http://{YOUR APPS BASE URL e.g. stripe.spryker.local}" --authorizationToken 123455 -v
```

## Connect an App to Teant
## Connect an app to a tenant

The `spryker/app-kernel` module contains all the necessary code to interact with the AppStoreCatalog, enabling the persistence and retrieval of configurations for a given App.
The `spryker/app-kernel` module contains all the necessary code to interact with AppStoreCatalog, enabling the persistence and retrieval of configurations for a given app.

## Test the endpoints

Expand Down Expand Up @@ -70,4 +66,4 @@ curl --location --request POST 'http://my-app.de.spryker.local/private/disconnec
--data-raw ''
```

Now, check if the previously created configuration in the spy_app_config table has been removed from your database.
Now, check if the previously created configuration in the `spy_app_config` table has been removed from your database.
11 changes: 7 additions & 4 deletions docs/acp/user/develop-an-app/develop-an-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ redirect_from:

This document will walk you through the process of developing an app using Spryker's Mini-Framework. Follow the steps below to set up and start your app development.

## Guidlines
Development guidelines for ACP APP contains general rules how to desigtn app and write code for it.
ACP Apps are based on the [mini-framework](https://github.com/spryker-projects/mini-framework) that is based on the Spryker Framework as a result we recomend to follow the same rules that are applicable for the [Spryker project development](https://docs.spryker.com/docs/scos/dev/guidelines/project-development-guidelines.html#updating-spryker).
{% info_block infoBox "Development guidelines" %}

Development guidelines for ACP apps contains general rules how to design an app and write code for it.
ACP apps are based on the [mini-framework](https://github.com/spryker-projects/mini-framework), which is its turn is based on the Spryker Framework. Therefore, we recommend following the same rules that are applicable for the [Spryker project development](https://docs.spryker.com/docs/scos/dev/guidelines/project-development-guidelines.html#updating-spryker).

{% endinfo_block %}

## Prerequisites

Expand Down Expand Up @@ -207,7 +210,7 @@ You can now test the `configure` request with the following snippets. Run the cU

### Test the /private/configure endpoint

Please follow [these steps](/docs/acp/user/app-connect.html#test-the-endpoints).
Follow the guidelines in [Test the endpoints](/docs/acp/user/app-connect.html#test-the-endpoints).

## Implement business logic

Expand Down
44 changes: 44 additions & 0 deletions docs/acp/user/intro-to-acp/acp-architecture-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: ACP architecture overview
description: Learn about the App Orchestration Platform architecture and how to use it.
template: concept-topic-template
redirect_from:
- /docs/aop/user/intro-to-acp/acp-overview.html
keywords: acp
---

The App Composition Platform (ACP) aims to streamline the development process of the Spryker apps by providing a unified architecture. This architecture encompasses the communication between Spryker Cloud Commerce OS (SCCOS), AppStoreCatalog, and third-party APIs. By adopting ACP, developers can focus on third-party implementations, reducing development time, simplifying testing, and separating responsibilities.

## Key responsibilities of apps

Every app within ACP is responsible for the following tasks:

* Persist configuration data for the app, managing `Connect/Disconnect` requests from the AppStoreCatalog.
* Handle synchronous requests from SCCOS.
* Process messages received from SCCOS.
* Send messages to SCCOS.
* Implement a third-party API.

While these tasks are common across all apps, the primary differentiator among app categories lies in the communication with third-party APIs.

The following diagram illustrates the high-level architecture that significantly reduces development effort, enhances testability, clarifies responsibilities, and improves overall usability.

![high-Level-architecture](https://spryker.s3.eu-central-1.amazonaws.com/docs/aop/dev/acp-architecture/high-level-architecture.png)

## SCCOS

SCOS consists of a Category root module (for example, `spryker/payment`) and a Connector module for this category (for example, `spryker/payment-app`). The Connector module facilitates communication between SCCOS and apps of that category.

## App

The app uses `spryker/app-kernel`, the Category App package (for example, `spryker/app-payment`), standalone packages, and, at the project level, a module that provides a `PlatformPluginInterface` implementation to the Category package (for example, Stripe).

- The `spryker/app-kernel` contains all necessary code to interact with the AppStoreCatalog, capable of persisting and receiving configurations for a given app.
- The Category package (e.g., `spryker/app-payment`) abstracts the communication between SCCOS and the app, providing a `PlatformPluginInterface`.
- The Category implementation module furnishes a `PlatformPluginInterface` implementation that handles method calls, either internally or by consuming a third-party provider API.

Both `spryker/app-kernel` and `spryker/app-<categoty>` contain the logic needed for communication with the AppStoreCatalog and SCCOS, ensuring comprehensive coverage of the APIs within these packages.

## Next steps

To integrate and use ACP Apps in your project, follow the [ACP Installation guide](/docs/acp/user/app-composition-platform-installation.html#getting-sccos-acp-ready).
45 changes: 0 additions & 45 deletions docs/acp/user/intro-to-acp/acp-architecture.md

This file was deleted.

0 comments on commit 4240ec2

Please sign in to comment.