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.
What's inside Lowdefy
- 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.
Overview of the _string operator
The_stringoperator allows you to run JavaScriptStringmethods within Lowdefy. It can be used as a standalone operator or as a_buildoperator method.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-utilspackage 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 onwindow.lowdefyfor assertions on page state, request responses, and validation status.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.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
UploadDraggerblock with theuploadPolicyRequestIdproperty instead. S3UploadDragger remains as an alias for backward compatibility.To function, S3UploadDragger requires:
- An
AwsS3Bucketconnection. - An
AwsS3PresignedPostPolicyrequest to define the upload policy.
- An
Overview of the _object operator
The_objectoperator allows you to run standard JavaScriptObjectmethods within Lowdefy. It can be used as a standalone operator or as a_buildoperator method.Overview of the _build operator
The_buildoperator 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.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.Implement a DropdownButton
TheDropdownButtonis 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'seventssection. 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 clickedCreate card-style tab panels
To change the visual style of the tabs to a card layout, set thetabTypeproperty tocard. 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: activeIntegrate external services using Connections and Requests
Lowdefy uses a two-part system to integrate with external services like APIs or databases:
- Connections: Used to configure the settings for the external service. This typically includes connection strings, base URLs, and secrets (passwords or API keys).
- 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.
Implement a page layout with a top header navigation menu using PageHeaderMenu
ThePageHeaderMenucomponent 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 theblocksarray.- 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