Contributing¶
DiagramaHub is open source under the Apache 2.0 license. Every contribution is published under that same license.
Reporting a problem¶
- Bugs and proposals: open an issue on GitHub with the steps to reproduce, what you expected, what happened, the version (shown in About or by
GET /) and the diagram type if relevant. - Vulnerabilities: do not open a public issue. Report them privately as explained in Security.
How a change flows¶
flowchart LR
F["Fork or branch"] --> C["Change + tests"]
C --> Q["Lint, format,<br/>types and tests"]
Q --> PR["Pull request to main"]
PR --> RV["Review"]
RV --> M["Merge"]
- Branch off
main(or off the currentrelease/<V>branch, if the change goes into that version). - Make the change following the architecture: Backend and Frontend.
- Add tests: every new endpoint gets its test.
- Run the checks (below).
- Open a pull request against
mainexplaining what changes and why.
Before opening the PR¶
Style¶
| Area | Rule |
|---|---|
| Python | Ruff + Black (line-length = 100), mypy; type hints and a docstring on every function; snake_case |
| TypeScript | ESLint (typescript-eslint); camelCase; strict TypeScript |
| Validation | Pydantic models for every API input and output |
| Async | async/await throughout the backend |
| UI text | Never hardcoded visible strings: t('key') in es.json and en.json |
| UI | Per DESIGN.md |
| Test credentials | Generated, never literal (see Testing) |
Commits and PRs¶
- Messages in English, imperative and descriptive; with a
fix:,feat:,docs:,chore:style prefix when it helps. - One topic per PR. Releases are merged as
Release <V>: <summary>. - If the change is user-visible, add the entry to
CHANGELOG.mdand to the current version's release notes (see Versioning).