You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web
Garfield Dai 849994d35e 0.15.7
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEEFK5K98uJ0hmL9JLza6DRCN7QEf8FAmgPMZ8ACgkQa6DRCN7Q
 Ef+gkgv/Ved5ez/UgKHiGyxMM9MWiO9JDWKBrZP+NbhqSIz2B7efCg7PcEWveqCR
 ma5pD2T83z9lYsI4VYB/08HRdF4w5FbFbZXg5zy7R9OMc/5oEZ1tyxiOp/RLzOqi
 kCDhHX5CVadUjC98oy9q41S+AmlpV5hjjl5ZQHH9XIx/Uy/0LZMdhB4EOhDwNqj2
 MU0xekTEaouJFeIe1ewyVBZd2GC18EDjqv9ABiBeaJwx97SQ93pCNhjxnn2wm5cT
 Q96qkkNb/E3JoaOPhws5/pGLM+5SK0dYFTZkwWER1GUfrh+5wzLWbzAKwoewDRaV
 g62waOORvaYphXKh7KxmrC3Gb9eGMrK9haRwJfyfxzHCwqtI4+SFnv+izapU7hlm
 c24s73p2v9sFzjHBWEPqHvuJ7F5Q8odR40ECGhBmzgJVnXdDDu+h69MYWDq2LPAl
 3295Wa4zjF9krC9R9BU+ra7DLw90TA53Cf3yXdMyuoOpU41uqtj/7iF8p2axnIxL
 srqhqJWw
 =3gSn
 -----END PGP SIGNATURE-----

Merge tag '0.15.7' into e-260

0.15.7
11 months ago
..
.husky feat: add format util unit and add pre-commit unit check (#8427) 2 years ago
.storybook feat: storybook (#9324) 1 year ago
.vscode feat: add frontend unit test framework (#6426) 2 years ago
__mocks__ feat: regenerate history switch navigation (#8749) 1 year ago
app fix: get realtime groups and members data every time user open the di… (#18988) 11 months ago
assets fix: missing files (#2291) 2 years ago
bin Feat/embedding (#553) 3 years ago
config fix: add full doc mode preview length limit (#12310) 1 year ago
context Feat/e permission (#18656) 11 months ago
docker fix: clickjacking (#18552) 11 months ago
hooks fix: check dsl version when create app from explore template (#18872)… (#18881) 11 months ago
i18n fix: i18n update (#18787) 11 months ago
models Feat/e permission (#18656) 11 months ago
public Revert "Feat/parent child retrieval" (#12095) 1 year ago
service fix: get realtime groups and members data every time user open the di… (#18988) 11 months ago
themes Feat/e permission (#18656) 11 months ago
types fix: update sso protocol default value to '' (#18773) 11 months ago
utils fix: add dataset edit permissions (#13223) 1 year ago
.dockerignore build: fix .dockerignore file (#800) 3 years ago
.editorconfig Initial commit 3 years ago
.env.example fix: clickjacking (#18552) 11 months ago
.eslintignore feat: add code style (#242) 3 years ago
.eslintrc.json feat: storybook (#9324) 1 year ago
.gitignore chore: update .gitignore to include mise.toml (#10778) 1 year ago
Dockerfile chore: add tests for build docker image when dockerfile changed (#10732) 1 year ago
README.md feat: storybook (#9324) 1 year ago
global.d.ts feat: support assistant frontend (#2139) 2 years ago
jest.config.ts feat: regenerate history switch navigation (#8749) 1 year ago
middleware.ts fix: clickjacking (#18552) 11 months ago
next.config.js feat:add tts-streaming config and future (#5492) 2 years ago
package.json chore: Updates to version 0.15.7 with new model support 11 months ago
postcss.config.js Initial commit 3 years ago
tailwind.config.js Feat/e permission (#18656) 11 months ago
tsconfig.json Initial commit 3 years ago
typography.js Initial commit 3 years ago
yarn.lock fix: update yarn.lock 1 year ago

README.md

Dify Frontend

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

Getting Started

Run by source code

To start the web frontend service, you will need Node.js v18.x (LTS) and NPM version 8.x.x or Yarn.

First, install the dependencies:

npm install
# or
yarn install --frozen-lockfile

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:

npm run dev
# or
yarn 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:

npm run build

Then, start the server:

npm run start

If you want to customize the host and port:

npm run start --port=3001 --host=0.0.0.0

Storybook

This project uses Storybook for UI component development.

To start the storybook server, run:

yarn 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:

npm 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.