You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
-LAN- f04844435f
chore: bump version from 1.7.2 to 1.8.0 (#24539)
2 ay önce
..
.husky chore: merge lint dependency group into dev group of python packages (#18088) 6 ay önce
.storybook Introduce Plugins (#13836) 8 ay önce
.vscode Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 6 ay önce
__mocks__ feat: regenerate history switch navigation (#8749) 1 yıl önce
__tests__ fix: goto-anything command filter should only match shortcut (#23862) 2 ay önce
app Fix tooltip visibility issues during scroll in model selector popup (#24593) 2 ay önce
assets fix: missing files (#2291) 1 yıl önce
bin Feat/embedding (#553) 2 yıl önce
config fix(web): make iteration panel respect MAX_PARALLEL_LIMIT environment variable (#23083) (#23104) 3 ay önce
context refactor: Update shareCode in useEffect to avoid setState during render (#24468) 2 ay önce
docker feat: introduce new env ALLOW_UNSAFE_DATA_SCHEME to allow rendering data uri scheme (#21321) 3 ay önce
hooks Update use-document-title.ts to fix favicon.ico path (#23872) 2 ay önce
i18n chore: translate i18n files (#24566) 2 ay önce
i18n-config docs: format all md files (#24195) 2 ay önce
models feat: support bool type variable frontend (#24437) 2 ay önce
public fixing embedded chat styling (#23198) 3 ay önce
scripts feat: Optimize Docker build process by adding script to remove unnecessary files (#24450) 2 ay önce
service feat: add multi model credentials (#24451) 2 ay önce
themes feat(theme): add color variable config (#24541) 2 ay önce
types Chore: remove some dead code in experience-enhance-group (#24110) 2 ay önce
utils feat: support bool type variable frontend (#24437) 2 ay önce
.dockerignore Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 6 ay önce
.env.example feat: introduce new env ALLOW_UNSAFE_DATA_SCHEME to allow rendering data uri scheme (#21321) 3 ay önce
.gitignore Introduce Plugins (#13836) 8 ay önce
Dockerfile feat: Optimize Docker build process by adding script to remove unnecessary files (#24450) 2 ay önce
README.md docs: format all md files (#24195) 2 ay önce
eslint.config.mjs lint: fix sonarjs/no-dead-store issues (#23653) 2 ay önce
global.d.ts Fix API documentation layout and dark mode contrast issues (#23462) 2 ay önce
jest.config.ts feat/TanStack-Form (#18346) 6 ay önce
jest.setup.ts feat/TanStack-Form (#18346) 6 ay önce
middleware.ts Revert "♻️ refactor(middleware): remove duplicate CSP header assignment" (#20592) 5 ay önce
next.config.js feat: Optimize Docker build process by adding script to remove unnecessary files (#24450) 2 ay önce
package.json chore: bump version from 1.7.2 to 1.8.0 (#24539) 2 ay önce
pnpm-lock.yaml chore: restore @mdx-js dependencies in package.json and pnpm-lock.yaml (#23792) 2 ay önce
postcss.config.js Initial commit 2 yıl önce
tailwind-common-config.ts fix: add background color for chat bubble in light and dark themes (#22472) 3 ay önce
tailwind.config.js Introduce Plugins (#13836) 8 ay önce
tsconfig.json Initial commit 2 yıl önce
typography.js Chore: frontend infrastructure upgrade (#16420) 7 ay önce

README.md

Dify Frontend

This is a Next.js project bootstrapped with create-next-app.

Getting Started

Run by source code

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

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
# For production release, change this to PRODUCTION
NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT
# The deployment edition, SELF_HOSTED
NEXT_PUBLIC_EDITION=SELF_HOSTED
# The base URL of console application, refers to the Console base URL of WEB service if console domain is
# different from api or web app domain.
# example: http://cloud.dify.ai/console/api
NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
# The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from
# console or api domain.
# example: http://udify.app/api
NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api

# SENTRY
NEXT_PUBLIC_SENTRY_DSN=

Finally, run the development server:

pnpm run dev

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

If you want to customize the number of instances launched by PM2, you can configure PM2_INSTANCES in docker-compose.yaml or Dockerfile.

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.

Test

We start to use Jest and React Testing Library for Unit Testing.

You can create a test file with a suffix of .spec beside the file that to be tested. For example, if you want to test a file named util.ts. The test file name should be util.spec.ts.

Run test:

pnpm run test

If you are not familiar with writing tests, here is some code to refer to:

Documentation

Visit https://docs.dify.ai/getting-started/readme 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.