Skip to content

The AI-Powered UML Diagram Generator is an advanced web application that leverages artificial intelligence to simplify and enhance the creation of professional UML diagrams. Built using the Flask framework and integrated with the g4f AI API, this tool transforms user inputs into high-quality UML diagrams instantly and efficiently.

License

Notifications You must be signed in to change notification settings

mfoud444/UML-AI-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UML AI Generator

Generate UML diagrams effortlessly with AI-powered automation and Flask integration.

Github Actions GitHub Release MIT License

line break

UML Diagram Generator Web Application

Quick Link to Repository

Generate professional UML diagrams in seconds! This web application uses Flask and the g4f AI API to automate the creation of UML diagrams. Users can input a project name, select a diagram type, and instantly view the generated diagram in an easy-to-use interface.


Key Features

🚀 User Input Form

  • Project Name: Field to input the project name.
  • Diagram Type: Dropdown menu to select the UML diagram type:
    • Sequence Diagram
    • Use Case Diagram
    • Class Diagram
    • Object Diagram
    • Activity Diagram
    • Component Diagram
    • Deployment Diagram
    • State Diagram
    • Timing Diagram

⚙️ Diagram Generation Workflow

  • Form submission triggers:
    1. AI prompt creation based on user input.
    2. g4f AI API generates PlantUML syntax.
    3. Syntax is converted into a UML diagram image using PlantUML.

🖼️ Output Display

  • Generated UML diagram is displayed as an image in the interface.

Screenshots

🖼️ Example Interface

Application Interface

The main interface

🖼️ Example Diagram Outputs

Diagram 1
Sequence Diagram
Diagram 2
Class Diagram
Diagram 3
Activity Diagram

Sample UML diagrams generated by the application.


Implementation Details

🛠️ Technology Stack

  • Flask Framework: Handles routing and rendering.
  • g4f AI API: Generates PlantUML syntax based on user input.
  • PlantUML: Converts syntax to UML diagram images.

💡 Error Handling

  • Handles:
    • Invalid inputs.
    • API errors or timeouts.
    • Diagram generation issues.

Requirements

🔧 Setup

  • Python 3.x
  • Flask
  • g4f AI API credentials
  • PlantUML installed or PlantUML server access

Installation

  1. Clone this repository:

    git clone https://github.com/mfoud444/UML-AI-Generator.git
    cd UML-AI-Generator
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up g4f AI API credentials.

  4. Run the Flask application:

    python app.py
  5. Access the app at:
    http://127.0.0.1:5000/


Directory Structure

.
├── app.py                # Main application file
├── templates/            # HTML templates
│   ├── index.html         # Main page template
├── static/               # Static assets (CSS, JS, images)
│   └── styles.css         # Custom styles
├── screenshots/          # Screenshots for documentation
│   ├── interface.png
│   ├── output.png
│   ├── mobile-view.png
├── requirements.txt      # Dependencies
└── README.md             # Project documentation

Contributing

Contributions are welcome! Follow these steps:

  1. Fork the repository.
  2. Create a feature branch:
    git checkout -b feature-name
  3. Commit your changes and push to your fork.
  4. Submit a pull request.

License

This project is open-source and licensed under the MIT License.

About

The AI-Powered UML Diagram Generator is an advanced web application that leverages artificial intelligence to simplify and enhance the creation of professional UML diagrams. Built using the Flask framework and integrated with the g4f AI API, this tool transforms user inputs into high-quality UML diagrams instantly and efficiently.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published