dify/web
Baki Burak Öğün 29cff809b9
fix(i18n): comprehensive Turkish (tr-TR) translation fixes and missing keys (#33885)
Co-authored-by: bakiburakogun <bakiburakogun@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Baki Burak Öğün <b.burak.ogun@goc.local>
2026-03-23 21:19:53 +08:00
..
.husky chore: skip pre commit check for merge (#33287) 2026-03-11 18:08:14 +08:00
.storybook chore: update to story book nextjs-vite (#31536) 2026-01-26 17:07:20 +08:00
.vscode chore: init tsslint (#31209) 2026-01-20 11:08:50 +08:00
__mocks__ feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
__tests__ refactor(web): migrate dataset-related toast callsites to base/ui/toast and update tests (#33892) 2026-03-23 13:13:52 +08:00
app test(workflow): improve dataset item tests with edit and remove functionality (#33937) 2026-03-23 20:16:59 +08:00
assets feat: introduce trigger functionality (#27644) 2025-11-12 17:59:37 +08:00
bin refactor(web): migrate to Vitest and esm (#29974) 2025-12-22 16:35:22 +08:00
config ci: use codecov (#33723) 2026-03-19 13:24:59 +08:00
constants fix: check and update doc links (#30849) 2026-01-21 16:31:48 +08:00
context refactor(web): update frontend toast call sites to use the new shortcut API (#33808) 2026-03-20 16:02:22 +08:00
contract feat: enhance model plugin workflow checks and model provider management UX (#33289) 2026-03-18 10:16:15 +08:00
docker chore(web): remove PM2 process manager (#30252) 2026-03-01 19:31:45 +08:00
docs docs(web): update dev guide (#33815) 2026-03-20 17:23:17 +08:00
hooks refactor(web): replace MediaType enum with const object (#33834) 2026-03-23 17:53:55 +08:00
i18n fix(i18n): comprehensive Turkish (tr-TR) translation fixes and missing keys (#33885) 2026-03-23 21:19:53 +08:00
i18n-config docs(web): update dev guide (#33815) 2026-03-20 17:23:17 +08:00
models feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
next refactor: route next/navigation through compat re-export (#33636) 2026-03-18 12:57:03 +08:00
plugins chore: remove next img (#33517) 2026-03-16 16:48:22 +08:00
public chore: revert #33540 #32966 (#33566) 2026-03-17 12:55:58 +08:00
scripts ci: use codecov (#33723) 2026-03-19 13:24:59 +08:00
service refactor(web): update frontend toast call sites to use the new shortcut API (#33808) 2026-03-20 16:02:22 +08:00
test refactor(web): migrate document list query state to nuqs (#32339) 2026-03-03 18:29:23 +08:00
themes style: update banner item styles and enhance dark/light theme variables (#32111) 2026-02-09 15:32:40 +08:00
types fix: remove explore context and migrate query to orpc contract (#32320) 2026-02-14 16:18:26 +08:00
utils test(workflow): add unit tests for workflow components (#33741) 2026-03-19 18:35:16 +08:00
.dockerignore chore: update dockerignore (#30460) 2026-01-05 10:55:14 +08:00
.env.example docs(web): update dev guide (#33815) 2026-03-20 17:23:17 +08:00
.gitignore chore: no custom lint cache location (#31195) 2026-01-19 10:37:49 +08:00
.npmrc chore(web): remove version prefixes from package.json (#31286) 2026-01-20 21:14:50 +08:00
.nvmrc fix: downgrade node version to 22 (#32897) 2026-03-03 16:00:56 +08:00
AGENTS.md refactor(web): consolidate query/mutation guidance and deprecate use-base wrappers (#33456) 2026-03-16 13:38:29 +08:00
CLAUDE.md test: add comprehensive tests for CustomizeModal component (#29709) 2025-12-16 14:21:05 +08:00
Dockerfile chore: update script for build docker (#33261) 2026-03-11 11:42:19 +08:00
README.md docs(web): update dev guide (#33815) 2026-03-20 17:23:17 +08:00
env.ts chore: add support email env (#33075) 2026-03-06 14:29:29 +08:00
eslint-suppressions.json refactor(web): replace MediaType enum with const object (#33834) 2026-03-23 17:53:55 +08:00
eslint.config.mjs chore: update deps (#33862) 2026-03-23 10:54:01 +08:00
eslint.constants.mjs refactor: migrate tag filter overlay and remove dead z-index override prop (#33791) 2026-03-20 11:15:22 +08:00
global.d.ts feat: integrate Google Analytics event tracking and update CSP for script sources (#30365) 2025-12-30 18:06:47 +08:00
knip.config.ts chore: update deps (#33862) 2026-03-23 10:54:01 +08:00
next.config.ts feat(build): set root directory for turbopack configuration (#33812) 2026-03-23 10:04:53 +08:00
package.json chore(dep): move hono and @hono/node-server to devDependencies (#33742) 2026-03-23 16:22:33 +08:00
pnpm-lock.yaml chore(dep): move hono and @hono/node-server to devDependencies (#33742) 2026-03-23 16:22:33 +08:00
postcss.config.js refactor(web): migrate to Vitest and esm (#29974) 2025-12-22 16:35:22 +08:00
proxy.ts refactor: route low-cost next modules through compat re-exports (#33622) 2026-03-18 10:37:29 +08:00
tailwind-common-config.ts chore: update deps (#33862) 2026-03-23 10:54:01 +08:00
tailwind-css-plugin.ts refactor: import component css in globals.css (#32180) 2026-02-10 13:55:42 +08:00
tailwind.config.ts chore: update deps (#33862) 2026-03-23 10:54:01 +08:00
taze.config.js chore: update deps (#33862) 2026-03-23 10:54:01 +08:00
tsconfig.json feat: frontend part of support try apps (#31287) 2026-01-22 18:16:37 +08:00
tsslint.config.ts fix: enforce no-leaked-conditional-rendering as error and fix violations (#31262) 2026-01-20 23:08:59 +08:00
typography.js refactor(web): migrate to Vitest and esm (#29974) 2025-12-22 16:35:22 +08:00
vite.config.ts ci: use codecov (#33723) 2026-03-19 13:24:59 +08:00
vitest.setup.ts chore: remove next img (#33517) 2026-03-16 16:48:22 +08:00

README.md

Dify Frontend

This is a Next.js project, but you can dev with vinext.

Getting Started

Run by source code

Before starting the web frontend service, please make sure the following environment is ready.

You can also use Vite+ with the corresponding vp commands. For example, use vp install instead of pnpm install and vp test instead of pnpm run test.

[!TIP] It is recommended to install and enable Corepack to manage package manager versions automatically:

npm install -g corepack
corepack enable

Learn more: Corepack

First, install the dependencies:

pnpm install

Then, configure the environment variables. Create a file named .env.local in the current directory and copy the contents from .env.example. Modify the values of these environment variables according to your requirements:

cp .env.example .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, run the development server:

pnpm run dev
# or if you are using vinext which provides a better development experience
pnpm run dev:vinext
# (optional) start the dev proxy server so that you can use online API in development
pnpm run dev:proxy

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

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

Deploy

Deploy on server

First, build the app for production:

pnpm run build

Then, start the server:

pnpm run start

If you want to customize the host and port:

pnpm 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 storybook

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

Lint Code

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

Then follow the Lint Documentation to lint the code.

Test

We use Vitest and React Testing Library for Unit Testing.

📖 Complete Testing Guide: See web/docs/test.md for detailed testing specifications, best practices, and examples.

[!IMPORTANT] As we are using Vite+, the vitest command is not available. Please make sure to run tests with vp commands. For example, use npx vp test instead of npx vitest.

Run test:

pnpm test

[!NOTE] Our test is not fully stable yet, and we are actively working on improving it. If you encounter test failures only in CI but not locally, please feel free to ignore them and report the issue to us. You can try to re-run the test in CI, and it may pass successfully.

Example Code

If you are not familiar with writing tests, refer to:

Analyze Component Complexity

Before writing tests, use the script to analyze component complexity:

pnpm analyze-component app/components/your-component/index.tsx

This will help you determine the testing strategy. See [web/testing/testing.md] for details.

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.