Skip to content
DIH Knowledge Base
    Sign in

    Diagrams & architecture

    Architecture and business-process documentation for SaaS products often needs diagrams without maintaining separate draw.io exports. This PoC uses Mermaid (rendered client-side) plus patterns for workshop boards, Postman, and static downloads (CSV templates).

    flowchart LR
    subgraph Public
      A["Marketing / docs home"]
      B["Public guides"]
    end
    subgraph Authenticated
      C["Keycloak login"]
      D["Platform docs"]
      E["Product docs"]
    end
    A --> B
    B -->|requiresAuth| C
    C --> D
    D --> E
    E -->|missing role| F["ODS upsell"]
    E -->|has group| G["Full content"]
    Simplified doc access flow (this PoC)

    Short summary: your application obtains a JWT from Keycloak, then calls the Connect API with Authorization: Bearer ….

    sequenceDiagram
    participant App as "Your app"
    participant DIH as "Connect API"
    participant IAM as "Keycloak"
    App->>IAM: Client credentials / user login
    IAM-->>App: Access token (JWT)
    App->>DIH: GET /assets (Bearer token)
    DIH-->>App: 200 JSON
    Typical machine-to-machine and user-delegated access
    flowchart TB
    subgraph K8s["K8s cluster"]
      POD["Docs SSR pod"]
      POD -->|OIDC| KC["Keycloak"]
    end
    User["Reader browser"] --> POD
    Author["GitLab CI"] -->|build image| POD
    Docs on Node adapter — aligns with this repository's Docker/K8s target

    For discovery workshops, teams often keep whiteboard artefacts outside git. Link or embed them from Starlight so narrative docs stay the source of truth.

    FigJam (Figma) provides an embed URL from Share → Embed. Use a custom WorkshopEmbed wrapper:

    import WorkshopEmbed from '@/components/WorkshopEmbed.astro';
    <WorkshopEmbed
    title="Connector onboarding workshop"
    src="https://www.figma.com/embed?embed_host=share&url=ENCODED_FIGJAM_BOARD_URL"
    href="https://www.figma.com/board/..."
    caption="FigJam board — updated by product design"
    />

    FigJam embed (PoC placeholder)

    Paste a share / embed URL from FigJam or Excalidraw in WorkshopEmbed.

    Open FigJam
    Replace `src` with your board’s embed URL from Share → Embed. PoC shows the link-only pattern until a board URL is configured.

    Pair narrative docs with a Postman collection and the same OpenAPI spec as the API embed page.

    Import in Postman: File → Import → select connect-api-poc.postman_collection.json, set collection variables baseUrl and accessToken (JWT from Keycloak).

    To publish a Run in Postman button, upload the collection to a Postman workspace and use the share link Postman generates (same JSON file as source of truth in git).

    Ship templates, sample payloads, and legal PDFs as static files under public/downloads/. Starlight pages link to them with a small DocDownload card (no extra build step).

    Example Markdown-only link (same file):

    Download the [CSV import template](/downloads/templates/connect-asset-export-template.csv).
    ToolBest for
    Mermaid in MDXFlows in git, reviewable diffs
    Excalidraw / FigJamWorkshop diagrams, linked or embedded boards
    Postman + OpenAPITry-it-out collections aligned with reference
    Static downloadsCSV templates, SDK zips, sample payloads
    PlantUMLStrict UML, via remark plugin
    D2 / StructurizrC4 architecture as code

    Next: Embedded API docs.