drawdb-io / drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.
https://drawdb.app
GNU Affero General Public License v3.0
22.7k stars 1.58k forks source link

[FEATURE] Add Documentation Menu with Markdown Export for Database Documentation #228

Closed LuigimonSoft closed 2 months ago

LuigimonSoft commented 2 months ago

We need to enhance our application by adding a new menu item dedicated to documentation. This menu should provide an option to generate database documentation in Markdown format. When the user clicks on the "Markdown" option, a new window should open, allowing them to export the database documentation. The Markdown file should represent the documentation in a data dictionary format.

Requirements:

  1. Add Documentation Menu:

    • Introduce a new menu item called "Documentation" in the application.
    • Under this menu, include an option labeled "Export as Markdown."
  2. Generate Markdown Documentation:

    • On selecting "Export as Markdown," open a new window.
    • In this window, display a preview of the database documentation in Markdown format.
    • The Markdown should follow a data dictionary format, including:
      • Table Names: Each table should be clearly labeled.
      • Columns: For each table, list all the columns with details such as:
      • Column Name
      • Data Type
      • Constraints (e.g., Primary Key, Foreign Key, Unique)
      • Default Values (if any)
      • Nullable (yes/no)
      • Indexes: Include details of any indexes on the tables.
      • Relationships: Describe the relationships between tables, such as foreign key references.
  3. Export Functionality:

    • Provide an "Export" button in the Markdown preview window.
    • On clicking "Export," the Markdown file should be downloaded to the user's machine.