Lowdefy Documentation

website·Indexed 34 days ago

https://docs.lowdefy.com/

Lowdefy is a framework for building web apps using YAML or JSON configuration files. It features a schema-driven approach with blocks, actions, and operators, and is built as a Hono server with Vite. The platform includes support for AI agents via Model Context Protocol (MCP), server hooks, and a dedicated CLI for local development and building.

Tokens
300.1K
Snippets
1.7K
Records
2.1K
Agent score
56%

What's inside Lowdefy

  1. Overview of Lowdefy User Authentication

    Lowdefy implements user authentication using the Auth.js library. It supports both stateless authentication via JSON Web Tokens (JWT) and database-backed sessions. User authorization is managed at the page level, allowing pages to be public or private, with role-based access control (RBAC) used to restrict access to pages and APIs. Authorization checks are performed on the Lowdefy server during request execution.
  2. Overview of the _string operator

    The _string operator allows you to run JavaScript String methods within Lowdefy. It can be used as a standalone operator or as a _build operator method.
  3. Overview of Lowdefy E2E Testing

    End-to-end (e2e) testing for Lowdefy apps verifies application behavior from the user's perspective by automating a real browser. The @lowdefy/e2e-utils package provides a Playwright-based toolkit that integrates with Lowdefy's block system, state management, and request lifecycle. Tests run against a production build of the app, which exposes internal state on window.lowdefy for assertions on page state, request responses, and validation status.
  4. Overview of TiptapMentionInput

    TiptapMentionInput is a rich-text editor that provides @-mention support. It includes all features of TiptapInput and adds a mention dropdown that can be populated via a static options list or an API request. It supports both individual mentions and group mentions (e.g., roles, teams, queues) which can be categorized into sections and styled with custom colors.
  5. Overview of S3UploadDragger

    S3UploadDragger is a drag-and-drop file upload area specifically for AWS S3. It supports file type filtering, upload limits, custom styling, and paste-to-upload.

    Important: This block is deprecated. Users should use the provider-neutral UploadDragger block with the uploadPolicyRequestId property instead. S3UploadDragger remains as an alias for backward compatibility.

    To function, S3UploadDragger requires:

    1. An AwsS3Bucket connection.
    2. An AwsS3PresignedPostPolicy request to define the upload policy.
  6. Overview of the _object operator

    The _object operator allows you to run standard JavaScript Object methods within Lowdefy. It can be used as a standalone operator or as a _build operator method.
  7. Overview of the _build operator

    The _build operator evaluates expressions at build time. This is useful for calculating values, looping over static data (such as JSON files generated by other applications), or reading environment variables before the application is deployed.
  8. Overview of TiptapInput rich-text editor

    TiptapInput is a rich-text editor built on TipTap that supports bold, italic, strike-through, highlights, headings, lists, tables, links, and image uploads. It allows for flexible height configuration (fixed or auto-sizing) and can be set to read-only mode.
    - id: tiptap_default
      type: TiptapInput
      properties:
        title: Notes
        placeholder: Start typing here. Try **bold**, *italic*, or headings.
  9. Implement a DropdownButton

    The DropdownButton is a display block that renders a button which opens a dropdown menu of action items. Each item in the menu can trigger a specific event defined in the block's events section. It supports various visual styles, sizes, and a 'split button' mode where the main button has a primary action and a separate arrow for the dropdown menu.
    - id: db_basic
      type: DropdownButton
      properties:
        title: Actions
        items:
          - title: Edit
            eventName: onEdit
            icon: AiOutlineEdit
          - title: Duplicate
            eventName: onDuplicate
            icon: AiOutlineCopy
          - type: divider
          - title: Delete
            eventName: onDelete
            icon: AiOutlineDelete
            danger: true
      events:
        onEdit:
          - id: db_basic_edit_msg
            type: DisplayMessage
            params:
              content: Edit clicked
  10. Create card-style tab panels

    To change the visual style of the tabs to a card layout, set the tabType property to card. This is useful for dashboards or high-level overview sections.
    - id: card_tabs
      type: Tabs
      properties:
        tabType: card
        tabs:
          - key: overview
            title: Overview
          - key: analytics
            title: Analytics
      slots:
        overview:
          blocks:
            - id: card_overview_content
              type: Paragraph
              properties:
                content: Dashboard overview showing key metrics.
        analytics:
          blocks:
            - id: card_analytics_progress
              type: Progress
              properties:
                percent: 72
                status: active
  11. Integrate external services using Connections and Requests

    Lowdefy uses a two-part system to integrate with external services like APIs or databases:

    1. Connections: Used to configure the settings for the external service. This typically includes connection strings, base URLs, and secrets (passwords or API keys).
    2. Requests: Used to perform specific actions against a defined connection, such as executing a database query, inserting a record, or calling a specific API endpoint.
  12. Implement a page layout with a top header navigation menu using PageHeaderMenu

    The PageHeaderMenu component creates a page layout featuring a top navigation bar. It supports a main menu, breadcrumbs, user profile settings, notifications, and a footer slot. The main content of the page is defined within the blocks array.
    - id: phm_basic
      type: PageHeaderMenu
      properties:
        menu:
          links:
            - id: phm_basic_home
              type: MenuLink
              properties:
                title: Home
                icon: AiOutlineHome
      blocks:
        - id: phm_basic_title
          type: Title
          properties:
            content: Welcome
            level: 2