Skip to content

DA App SDK

Chris Millar edited this page Jun 26, 2024 · 12 revisions

The Dark Alley App SDK allows you to work with protected Dark Alley content. This allows you to build custom apps for your creators when you have a special use case Dark Alley does not cover out of the box.

Supported experiences

  1. Fullscreen apps
  2. Library plugin apps - (coming soon)

Getting Started

You will need

  1. A site - ex: https://main--geometrixx--aemsites.aem.live
  2. A page - ex: https://main--geometrixx--aemsites.aem.live/tools/tags
  3. A block - ex: https://main--geometrixx--aemsites.aem.live/blocks/tag-browser

TLDR Code

tag-browser.js

import DA_SDK from 'https://da.live/nx/sdk.js';

export default async function decorate(el) {
  const { project, token } = await DA_SDK;
  // Do cool stuff
}

Visit your app on da.live

Visit: https://da.live/app/aemsites/geometrixx/{branch-name}/tools/tags

For local development, you can use a branch name of local which will send requests to http://localhost:3000.

Notes

  1. It is important to publish the page hosting your block. Some projects keep aem.page behind authentication and you want to provide a seamless single sign in experience.
  2. You have 500ms to import the DA_SDK. At 500ms, a message containing project details will be sent from da.live to your block. If the SDK has not been imported by then, it will miss the message.
  3. You break it, you buy it. Failure to respect AEM Edge Delivery Services content APIs for JSON and HTML will result in content that cannot be previewed or published nor will it be editable in DA.
Clone this wiki locally