Dify is an open-source platform for developing LLM applications with an intuitive interface combining agentic AI workflows, RAG pipelines, agent capabilities, and model management.
The codebase is split into:
/api): Python Flask application organized with Domain-Driven Design/web): Next.js 15 application using TypeScript and React 19/docker): Containerized deployment configurationsRun backend CLI commands through uv run --project api <command>.
Backend QA gate requires passing make lint, make type-check, and uv run --project api --dev dev/pytest/pytest_unit_tests.sh before review.
Use Makefile targets for linting and formatting; make lint and make type-check cover the required checks.
Integration tests are CI-only and are not expected to run in the local environment.
cd web
pnpm lint
pnpm lint:fix
pnpm test
pytest for backend tests with Arrange-Act-Assert structure.Any and prefer explicit type annotations.__repr__, __str__).any types.web/i18n/en-US/; avoid hardcoded text.