dify/web
2026-09-07 06:34:19 -04:00
..
__mocks__ feat: add skill enable feature switch (#41246) 2026-08-25 08:42:15 +00:00
__tests__ feat(web): add marketplace creator profiles and homepage redesign (#41538) 2026-09-04 08:09:45 +00:00
.storybook fix(agent): refine knowledge picker UX and permission filtering 2026-09-07 06:06:44 -04:00
.vscode
app fix(knowledge-fs): resolve CI failures and defer workflow runtime initialization 2026-09-07 15:36:28 +08:00
assets
bin
config fix(web): append /api/v1 when SSR reads MARKETPLACE_API_URL (#41824) 2026-09-04 10:38:53 +00:00
constants
context fix(knowledge-fs): resolve CI failures and defer workflow runtime initialization 2026-09-07 15:36:28 +08:00
docker feat(web): make markdown form field name length configurable (#41697) 2026-09-03 03:21:10 +00:00
docs docs: clarify frontend guidance ownership and dependencies (#41848) 2026-09-05 13:28:40 +00:00
features fix(agent): remove redundant knowledge picker help icons 2026-09-07 06:34:19 -04:00
hooks feat: app deployment v2 (#41444) 2026-09-04 02:01:35 +00:00
i18n fix(agent): remove redundant knowledge picker help icons 2026-09-07 06:34:19 -04:00
i18n-config Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-04 19:42:31 +08:00
models fix(knowledge-fs): resolve CI failures and defer workflow runtime initialization 2026-09-07 15:36:28 +08:00
next fix: separate WebApp analytics from console page tracking (#41251) 2026-08-26 03:02:38 +00:00
plugins chore: enforce titles on CSS-truncated elements (#41438) 2026-09-01 06:18:53 +00:00
public Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-04 19:42:31 +08:00
scripts chore(web): prune unused i18n keys (#41725) 2026-09-03 08:01:55 +00:00
service fix(knowledge-fs): resolve CI failures and defer workflow runtime initialization 2026-09-07 15:36:28 +08:00
test feat(agent): enable autonomous KnowledgeFS CLI access 2026-09-07 03:32:33 -04:00
themes
types feat(web): add marketplace creator profiles and homepage redesign (#41538) 2026-09-04 08:09:45 +00:00
utils feat(web): add marketplace creator profiles and homepage redesign (#41538) 2026-09-04 08:09:45 +00:00
.env.example feat(web): make markdown form field name length configurable (#41697) 2026-09-03 03:21:10 +00:00
.gitignore chore(web): remove obsolete PWA assets (#40082) 2026-08-06 07:41:01 +00:00
AGENTS.md Merge remote-tracking branch 'origin/main' into deploy/konwledge 2026-09-07 10:44:31 +08:00
CLAUDE.md
dev-proxy.config.ts
Dockerfile chore: upgrade Node.js runtime to 24 LTS (#41573) 2026-09-01 06:57:38 +00:00
Dockerfile.dockerignore chore: upgrade Node.js runtime to 24 LTS (#41573) 2026-09-01 06:57:38 +00:00
env.ts feat(web): make markdown form field name length configurable (#41697) 2026-09-03 03:21:10 +00:00
global.d.ts feat(web): add marketplace creator profiles and homepage redesign (#41538) 2026-09-04 08:09:45 +00:00
instrumentation-client.ts
next.config.ts chore(deps): upgrade workspace dependencies (#41564) 2026-09-01 04:19:06 +00:00
oxlint.unused.config.json
package.json refactor(knowledge-fs): bridge URL state into Jotai 2026-09-02 10:10:11 +08:00
postcss.config.mjs chore(web): upgrade Next.js to 16.3 (#39962) 2026-08-04 04:46:44 +00:00
proxy.ts feat(web): add marketplace creator profiles and homepage redesign (#41538) 2026-09-04 08:09:45 +00:00
README.md docs: clarify frontend guidance ownership and dependencies (#41848) 2026-09-05 13:28:40 +00:00
tsconfig.json chore(deps): upgrade pnpm workspace dependencies (#41138) 2026-08-24 07:07:47 +00:00
tsslint.config.ts
vite.config.ts tweaks 2026-09-02 16:59:53 +08:00
vitest.browser.setup.ts chore: upgrade Vite+ to 0.2.9 (#40762) 2026-08-14 04:42:28 +00:00
vitest.setup.ts chore: upgrade Vite+ to 0.2.9 (#40762) 2026-08-14 04:42:28 +00:00

Dify Frontend

This is a Next.js application with vinext as the default local development server.

Getting Started

Run by source code

The required Node.js and pnpm versions are pinned by the repository root devEngines.runtime and packageManager fields. Vite+ is also available for repository checks and tests; use its official documentation as the installation reference.

Run the following commands from the repository root.

First, install the dependencies:

pnpm install

Then, configure the environment variables. Create web/.env.local and copy the contents from web/.env.example. Modify the values of these environment variables according to your requirements:

cp web/.env.example web/.env.local

Important

  1. When the frontend and backend run on different subdomains, set NEXT_PUBLIC_COOKIE_DOMAIN=1. The frontend and backend must be under the same top-level domain in order to share authentication cookies.
  2. It's necessary to set NEXT_PUBLIC_API_PREFIX and NEXT_PUBLIC_PUBLIC_API_PREFIX to the correct backend API URL.

Finally, start the default development stack from the repository root. This runs vinext and the local API proxy together:

pnpm dev

Use pnpm -C web dev only when you specifically need the Next.js development server without the default vinext process. Proxy environment variables are documented in web/.env.example; route ownership remains in web/dev-proxy.config.ts.

Open http://localhost:3000 with your browser to see the result.

You can start editing the files under web/app. The page auto-updates as you edit the file.

Deploy

Deploy on server

First, build the app for production:

pnpm -C web run build

Then, start the server:

pnpm -C web run start

If you build the Docker image manually, use the repository root as the build context:

docker build -f web/Dockerfile -t dify-web .

If you want to customize the host and port:

pnpm -C web run start --port=3001 --host=0.0.0.0

Storybook

This project uses Storybook for UI component development.

To start the storybook server, run:

pnpm -C web storybook

Open http://localhost:6006 with your browser to see the result.

Lint Code

If your IDE is VSCode, rename .vscode/settings.example.json to .vscode/settings.json for lint code setting.

Then follow the Lint Documentation to lint the code.

Test

We use Vitest and React Testing Library through Vite+. Run unit tests in happy-dom with:

cd web
vp test run --project unit

Select a project explicitly; bare vp test also runs Browser Mode. Use vp instead of the standalone vitest command. The Frontend Testing Guide owns test policy, Browser Mode admission, and diagnostic commands.

Documentation

Visit https://docs.dify.ai to view the full documentation.

Community

The Dify community can be found on Discord community, where you can ask questions, voice ideas, and share your projects.