mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-04 10:14:00 +08:00
b2f5707676
# Conflicts: # .github/workflows/tool-test-sdks.yaml # api/.env.example # api/README.md # api/commands.py # api/controllers/console/explore/wraps.py # api/controllers/web/workflow.py # api/extensions/ext_commands.py # api/models/model.py # api/pyproject.toml # api/services/feature_service.py # web/README.md # web/app/components/explore/app-card/index.tsx # web/app/components/explore/app-list/index.tsx # web/app/components/explore/sidebar/index.tsx # web/app/signin/components/mail-and-password-auth.tsx # web/i18n/uk-UA/app-overview.json # web/i18n/uk-UA/app.json # web/i18n/uk-UA/billing.json # web/i18n/uk-UA/common.json # web/i18n/uk-UA/dataset-creation.json # web/i18n/uk-UA/dataset-documents.json # web/i18n/uk-UA/dataset-hit-testing.json # web/i18n/uk-UA/dataset-settings.json # web/i18n/uk-UA/dataset.json # web/i18n/uk-UA/explore.json # web/i18n/uk-UA/plugin.json # web/i18n/uk-UA/tools.json # web/next.config.js # web/package.json # web/pnpm-lock.yaml # web/service/common.ts # web/service/explore.ts # web/service/fetch.ts # web/service/use-explore.ts # web/types/feature.ts
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
# AGENTS.md
|
|
|
|
## Project Overview
|
|
|
|
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:
|
|
|
|
- **Backend API** (`/api`): Python Flask application organized with Domain-Driven Design
|
|
- **Frontend Web** (`/web`): Next.js 15 application using TypeScript and React 19
|
|
- **Docker deployment** (`/docker`): Containerized deployment configurations
|
|
|
|
## Backend Workflow
|
|
|
|
- Read `api/AGENTS.md` for details
|
|
- Run backend CLI commands through `uv run --project api <command>`.
|
|
- Integration tests are CI-only and are not expected to run in the local environment.
|
|
|
|
## Frontend Workflow
|
|
|
|
```bash
|
|
cd web
|
|
pnpm lint:fix
|
|
pnpm type-check:tsgo
|
|
pnpm test
|
|
```
|
|
|
|
## Testing & Quality Practices
|
|
|
|
- Follow TDD: red → green → refactor.
|
|
- Use `pytest` for backend tests with Arrange-Act-Assert structure.
|
|
- Enforce strong typing; avoid `Any` and prefer explicit type annotations.
|
|
- Write self-documenting code; only add comments that explain intent.
|
|
|
|
## Language Style
|
|
|
|
- **Python**: Keep type hints on functions and attributes, and implement relevant special methods (e.g., `__repr__`, `__str__`).
|
|
- **TypeScript**: Use the strict config, rely on ESLint (`pnpm lint:fix` preferred) plus `pnpm type-check:tsgo`, and avoid `any` types.
|
|
|
|
## General Practices
|
|
|
|
- Prefer editing existing files; add new documentation only when requested.
|
|
- Inject dependencies through constructors and preserve clean architecture boundaries.
|
|
- Handle errors with domain-specific exceptions at the correct layer.
|
|
|
|
## Project Conventions
|
|
|
|
- Backend architecture adheres to DDD and Clean Architecture principles.
|
|
- Async work runs through Celery with Redis as the broker.
|
|
- Frontend user-facing strings must use `web/i18n/en-US/`; avoid hardcoded text.
|