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.
- 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
- Form submission triggers:
- AI prompt creation based on user input.
- g4f AI API generates PlantUML syntax.
- Syntax is converted into a UML diagram image using PlantUML.
- Generated UML diagram is displayed as an image in the interface.
The main interface
Sample UML diagrams generated by the application.
- Flask Framework: Handles routing and rendering.
- g4f AI API: Generates PlantUML syntax based on user input.
- PlantUML: Converts syntax to UML diagram images.
- Handles:
- Invalid inputs.
- API errors or timeouts.
- Diagram generation issues.
- Python 3.x
- Flask
- g4f AI API credentials
- PlantUML installed or PlantUML server access
-
Clone this repository:
git clone https://github.com/mfoud444/UML-AI-Generator.git cd UML-AI-Generator
-
Install dependencies:
pip install -r requirements.txt
-
Set up g4f AI API credentials.
-
Run the Flask application:
python app.py
-
Access the app at:
http://127.0.0.1:5000/
.
├── 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
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes and push to your fork.
- Submit a pull request.
This project is open-source and licensed under the MIT License.