Build a documentation website based on your databases comments and Markdown.
The project is inspired by two blog posts on the Mercury engineering blog, 8 Lints for your Postgres schema and Documenting your database schema, highlighting the importance of documenting your data models and making them accessible to technical and non-technical people in your organization alike.
pg-docs
builds on this idea, also taking inspiration from rustdoc, making it easy to produce Markdown based documentation while allowing you to link between objects in your database, allowing users to easily jump between related concepts.
This is all based on Postgres' ability to add comments to objects in your database
COMMENT ON TABLE member IS 'Table documentation';
something akin to docstrings in coding languages. pg-docs
reads these comments and builds a static website you can easily host and integrate in your CI pipelines.
The project builds against an instance of your database, using postgres environment variables to connect to a live instance of your database. You can then run
pnpm run dev
In overview a summary
COMMENT ON
Examples