Review pgcharts to make it an SQL notebook allowing its users to compose "live" documents with SQL queries and their result, either plain tables or charts.
Use Hallo to allow editing text on the note book document, and provide ways to save and reload any page.
A way to share a page read-only will then be needed, a simple HTML export might be all we need here tho.