diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f0515c..269b4e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- The README and the documentation home page now open with a "five frameworks, + one diagram" image — the same `User`/`Order` schema written in SQLModel, + SQLAlchemy, Django, Pydantic and dataclasses, converging on the ERD they all + produce. The previous image was the bare ERD under a caption claiming five + frameworks, which the picture itself never showed. The snippets are taken + from the runnable examples in `docs/examples/`, and the entity boxes use the + primary/foreign-key colours `generator.py` emits, so the illustration matches + real output. `docs/examples/frameworks.svg` is the editable source; the + now-unreferenced `docs/examples/erd.png` is removed. + ## [0.14.0] - 2026-09-14 ### Added diff --git a/README.md b/README.md index 2c4ecda..5e5c336 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ The same `User` / `Order` schema in **SQLModel, SQLAlchemy 2.0, Django, Pydantic and dataclasses** — only the syntax differs. Each one produces the **identical** diagram: +![The same User/Order schema in SQLModel, SQLAlchemy, Django, Pydantic and dataclasses, all producing one ERD](https://raw.githubusercontent.com/devsuit-berlin/erdify/main/docs/examples/frameworks.png "Five frameworks, one diagram") + `erdify docs/examples/sqlmodel --inject README.md` keeps the diagram below in this file. It is Mermaid, so GitHub renders it directly — and a pre-commit hook runs the same command with `--check`, so it cannot go stale: diff --git a/docs/examples/erd.png b/docs/examples/erd.png deleted file mode 100644 index 681cef9..0000000 Binary files a/docs/examples/erd.png and /dev/null differ diff --git a/docs/examples/frameworks.png b/docs/examples/frameworks.png new file mode 100644 index 0000000..b43632c Binary files /dev/null and b/docs/examples/frameworks.png differ diff --git a/docs/examples/frameworks.svg b/docs/examples/frameworks.svg new file mode 100644 index 0000000..d7d8261 --- /dev/null +++ b/docs/examples/frameworks.svg @@ -0,0 +1,89 @@ + + + +Five frameworks. One diagram. +erdify reads your model files with the standard library. No imports, no database. +erdify + + +SQLModel +class User(SQLModel, table=True): + id: int = Field(primary_key=True) + name: str + email: str + + +SQLAlchemy 2.0 +class User(Base): + __tablename__ = "user" + id: Mapped[int] = mapped_column( + primary_key=True) + + +Django +class User(models.Model): + name = models.CharField( + max_length=100) + email = models.EmailField() + + +Pydantic +class User(BaseModel): + id: int + name: str + email: str + + +dataclasses +@dataclass +class User: + id: int + name: str + + + + + + + + + + +user + +id +int +name +str +email +str + + +order + +id +int + +user_id +int +total +float + + + + +user_id +SQLModel · SQLAlchemy · Django · Pydantic · dataclasses · SQL DDL + diff --git a/docs/frameworks/index.md b/docs/frameworks/index.md index e163e27..be6a84c 100644 --- a/docs/frameworks/index.md +++ b/docs/frameworks/index.md @@ -17,7 +17,7 @@ see [SQL DDL](sql.md) for details. The snippets below all describe the **same** `User` / `Order` schema — only the syntax differs. Each one produces the **identical** diagram: -![Framework comparison ERD](../examples/erd.png "The same ERD from all five frameworks") +![The same User/Order schema in SQLModel, SQLAlchemy, Django, Pydantic and dataclasses, all producing one ERD](../examples/frameworks.png "Five frameworks, one diagram") !!! info diff --git a/docs/index.md b/docs/index.md index 4de94ce..1ed1202 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,7 +7,7 @@ description: "erdify generates PlantUML, Mermaid, JSON and HTML ER diagrams from **One ERD generator for every Python schema in your repository — parsed from source, with no imports, no database connection and no runtime dependencies.** -![Framework comparison ERD](examples/erd.png "The same ERD from all five frameworks") +![The same User/Order schema in SQLModel, SQLAlchemy, Django, Pydantic and dataclasses, all producing one ERD](examples/frameworks.png "Five frameworks, one diagram") The same two tables, written in SQLModel, SQLAlchemy 2.0, Django, Pydantic and dataclasses, all render to the same diagram.