From 3cb9c7a9d8547fd614d4a3f2827c9131443d1e08 Mon Sep 17 00:00:00 2001 From: Luis Sousa Date: Tue, 15 Apr 2025 13:01:51 -0300 Subject: [PATCH] feat: private app docs --- .../apps/private-app.mdx | 67 +++++++++++++++++++ .../apps/private-app.mdx | 66 ++++++++++++++++++ .../apps/private-app.mdx | 67 +++++++++++++++++++ mint.json | 6 +- .../apps/private-app.mdx | 66 ++++++++++++++++++ 5 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 docs/en/05_Developing Capabilities/apps/private-app.mdx create mode 100644 docs/pt/05_developing_capabilities/apps/private-app.mdx create mode 100644 en/developing-capabilities/apps/private-app.mdx create mode 100644 pt/developing-capabilities/apps/private-app.mdx diff --git a/docs/en/05_Developing Capabilities/apps/private-app.mdx b/docs/en/05_Developing Capabilities/apps/private-app.mdx new file mode 100644 index 0000000..103f593 --- /dev/null +++ b/docs/en/05_Developing Capabilities/apps/private-app.mdx @@ -0,0 +1,67 @@ +--- +description: | + Guide on integrating private apps in Deco.cx. +--- + +# Private Apps in Deco.cx + +This guide will walk you through the process of creating and integrating a private app in your Deco.cx project. + +## Prerequisites + +Before you begin, make sure you have: +- Created your app +- Uploaded it to GitHub +- Made the repository private +- Invited the deco-bot to your repository +- Notified Deco about the private app invitation + +## Integration Steps + +### 1. Add the App as a Submodule + +Add your private app repository as a Git submodule: + +```bash +git submodule add https://github.com/github-user-or-organization/your-private-app.git $APP_NAME +``` + +### 2. Configure Import Path + +Create an entry in your `deno.json` file in the imports section: + +```json +{ + "imports": { + "$APP_NAME": "$APP_NAME" + } +} +``` + + +### 3. Create App Entry Point + +Create a file at `/apps/$APP_NAME.ts` with the following content: + +```ts +export { default } from "$APP_NAME/mod.ts"; +export * from "$APP_NAME/mod.ts"; +``` + +### 4. Create App Block + +create a file at `.deco/blocks/$APP_NAME.json` with the following content: + +```json +{ + "__resolveType": "site/apps/$APP_NAME.ts" +} +``` + + +## Completion + +Once you've completed these steps, your private app will be available for use in your Deco.cx project. + + +For more information about apps in Deco.cx, you can refer to the [Apps documentation](https://deco.cx/docs/en/developing-capabilities/apps/creating-an-app). \ No newline at end of file diff --git a/docs/pt/05_developing_capabilities/apps/private-app.mdx b/docs/pt/05_developing_capabilities/apps/private-app.mdx new file mode 100644 index 0000000..0c5617f --- /dev/null +++ b/docs/pt/05_developing_capabilities/apps/private-app.mdx @@ -0,0 +1,66 @@ +--- +description: | + Guide on integrating private apps in Deco.cx. +--- + +# Apps Privados no Deco.cx + +Este guia irá te guiar pelo processo de criação e integração de um app privado no seu projeto Deco.cx. + +## Pré-requisitos + +Antes de começar, certifique-se de ter: +- Criado seu app +- Subido para o GitHub +- Tornado o repositório privado +- Convide o deco-bot para o seu repositório +- Notificado o Deco sobre a convite para o app privado + +## Passos de Integração + +### 1. Adicione o App como um Submódulo + +Adicione o repositório do seu app privado como um submódulo do seu projeto: + +```bash +git submodule add https://github.com/github-user-or-organization/your-private-app.git $APP_NAME +``` + +### 2. Configure o Caminho de Importação + +Crie uma entrada no seu `deno.json` na seção imports: + +```json +{ + "imports": { + "$APP_NAME": "$APP_NAME" + } +} +``` + +### 3. Crie o Ponto de Entrada do App + +Crie um arquivo em `/apps/$APP_NAME.ts` com o seguinte conteúdo: + +```ts +export { default } from "$APP_NAME/mod.ts"; +export * from "$APP_NAME/mod.ts"; +``` + +### 4. Crie o Bloco do App + +Crie um arquivo em `.deco/blocks/$APP_NAME.json` com o seguinte conteúdo: + +```json +{ + "__resolveType": "site/apps/$APP_NAME.ts" +} +``` + + +## Conclusão + +Depois de completar esses passos, seu app privado estará disponível para uso no seu projeto Deco.cx. + + +Para mais informações sobre apps no Deco.cx, você pode consultar a [documentação de apps](https://deco.cx/docs/en/developing-capabilities/apps/creating-an-app). \ No newline at end of file diff --git a/en/developing-capabilities/apps/private-app.mdx b/en/developing-capabilities/apps/private-app.mdx new file mode 100644 index 0000000..103f593 --- /dev/null +++ b/en/developing-capabilities/apps/private-app.mdx @@ -0,0 +1,67 @@ +--- +description: | + Guide on integrating private apps in Deco.cx. +--- + +# Private Apps in Deco.cx + +This guide will walk you through the process of creating and integrating a private app in your Deco.cx project. + +## Prerequisites + +Before you begin, make sure you have: +- Created your app +- Uploaded it to GitHub +- Made the repository private +- Invited the deco-bot to your repository +- Notified Deco about the private app invitation + +## Integration Steps + +### 1. Add the App as a Submodule + +Add your private app repository as a Git submodule: + +```bash +git submodule add https://github.com/github-user-or-organization/your-private-app.git $APP_NAME +``` + +### 2. Configure Import Path + +Create an entry in your `deno.json` file in the imports section: + +```json +{ + "imports": { + "$APP_NAME": "$APP_NAME" + } +} +``` + + +### 3. Create App Entry Point + +Create a file at `/apps/$APP_NAME.ts` with the following content: + +```ts +export { default } from "$APP_NAME/mod.ts"; +export * from "$APP_NAME/mod.ts"; +``` + +### 4. Create App Block + +create a file at `.deco/blocks/$APP_NAME.json` with the following content: + +```json +{ + "__resolveType": "site/apps/$APP_NAME.ts" +} +``` + + +## Completion + +Once you've completed these steps, your private app will be available for use in your Deco.cx project. + + +For more information about apps in Deco.cx, you can refer to the [Apps documentation](https://deco.cx/docs/en/developing-capabilities/apps/creating-an-app). \ No newline at end of file diff --git a/mint.json b/mint.json index 70bf9a1..c68fa39 100644 --- a/mint.json +++ b/mint.json @@ -157,7 +157,8 @@ "pages": [ "pt/developing-capabilities/apps/ab-test", "pt/developing-capabilities/apps/creating-an-app", - "pt/developing-capabilities/apps/making-an-app-installable" + "pt/developing-capabilities/apps/making-an-app-installable", + "pt/developing-capabilities/apps/private-app" ], "version": "Português" }, @@ -363,7 +364,8 @@ "pages": [ "en/developing-capabilities/apps/ab-test", "en/developing-capabilities/apps/creating-an-app", - "en/developing-capabilities/apps/making-an-app-installable" + "en/developing-capabilities/apps/making-an-app-installable", + "en/developing-capabilities/apps/private-app" ], "version": "English" }, diff --git a/pt/developing-capabilities/apps/private-app.mdx b/pt/developing-capabilities/apps/private-app.mdx new file mode 100644 index 0000000..0c5617f --- /dev/null +++ b/pt/developing-capabilities/apps/private-app.mdx @@ -0,0 +1,66 @@ +--- +description: | + Guide on integrating private apps in Deco.cx. +--- + +# Apps Privados no Deco.cx + +Este guia irá te guiar pelo processo de criação e integração de um app privado no seu projeto Deco.cx. + +## Pré-requisitos + +Antes de começar, certifique-se de ter: +- Criado seu app +- Subido para o GitHub +- Tornado o repositório privado +- Convide o deco-bot para o seu repositório +- Notificado o Deco sobre a convite para o app privado + +## Passos de Integração + +### 1. Adicione o App como um Submódulo + +Adicione o repositório do seu app privado como um submódulo do seu projeto: + +```bash +git submodule add https://github.com/github-user-or-organization/your-private-app.git $APP_NAME +``` + +### 2. Configure o Caminho de Importação + +Crie uma entrada no seu `deno.json` na seção imports: + +```json +{ + "imports": { + "$APP_NAME": "$APP_NAME" + } +} +``` + +### 3. Crie o Ponto de Entrada do App + +Crie um arquivo em `/apps/$APP_NAME.ts` com o seguinte conteúdo: + +```ts +export { default } from "$APP_NAME/mod.ts"; +export * from "$APP_NAME/mod.ts"; +``` + +### 4. Crie o Bloco do App + +Crie um arquivo em `.deco/blocks/$APP_NAME.json` com o seguinte conteúdo: + +```json +{ + "__resolveType": "site/apps/$APP_NAME.ts" +} +``` + + +## Conclusão + +Depois de completar esses passos, seu app privado estará disponível para uso no seu projeto Deco.cx. + + +Para mais informações sobre apps no Deco.cx, você pode consultar a [documentação de apps](https://deco.cx/docs/en/developing-capabilities/apps/creating-an-app). \ No newline at end of file