Principle:Langgenius Dify Web App Sharing
| Knowledge Sources | Dify |
|---|---|
| Domains | Frontend, Sharing |
| Last Updated | 2026-02-12 07:00 GMT |
Overview
Web App Sharing is the principle governing the public web app sharing mechanism that enables external access to Dify applications without requiring platform authentication.
Description
Dify allows application builders to publish their AI-powered applications as standalone web apps accessible via public URLs. The Web App Sharing principle defines how these shared applications are configured, served, and rendered to external users. This includes generating shareable links, embedding configuration for custom domains, and rendering the appropriate application interface (chat, completion, or workflow) based on the application type.
The frontend implements this principle through a dedicated web app context that loads the shared application configuration, including its visual theme, input parameters, and interaction mode. When a user accesses a shared web app URL, the system resolves the application identity, loads its configuration, and renders the appropriate interface without exposing the internal platform. This separation ensures that shared applications present a clean, branded experience to end users while maintaining the full feature set of the underlying Dify application.
This principle is critical because sharing is one of Dify's primary deployment mechanisms. Application builders create AI applications within the platform and then share them with end users who may have no knowledge of or access to the Dify platform itself. The sharing mechanism must therefore be robust, secure, and capable of delivering a polished user experience that reflects well on the application builder.
Usage
Use this principle when:
- Implementing or modifying the public web app rendering pipeline
- Adding new application types that need to support public sharing
- Building features related to custom domains, embedding, or white-label deployment
Theoretical Basis
This principle is based on the Public Interface Pattern and Tenant Isolation concepts from multi-tenant architecture. Each shared web app operates as an isolated public-facing interface backed by a specific tenant's application configuration. The pattern also draws from URL-based resource resolution, where the URL serves as the primary key for identifying and loading the correct application context.