Text2Flow

πŸ“Š Text2Flow

Last Commit Repo Size License

FastAPI Python Pydantic Graphviz Pyragify Jinja2 Uvicorn

A lightweight, high-performance web application that converts simple text syntax into professional SVG/PNG flowcharts. Built with FastAPI and powered by the Graphviz visualization engine.


✨ Features


πŸ“ΈScreenshots


View 3 View 2 View 1


πŸš€ Getting Started

Prerequisites - Python 3.8+


βš™οΈ Installation

Clone the repository:

git clone https://github.com/yourusername/text2flow.git
cd text2flow

Create and activate a virtual environment:

python -m venv venv
# Windows
.\venv\Scripts\activate
# macOS/Linux
source venv/bin/activate

Install dependencies:

pip install fastapi uvicorn graphviz jinja2 python-multipart pyragify

Run the server:

uvicorn app.main:app --reload

Open your browser to http://127.0.0.1:8000.


πŸ“ How to Use

The editor uses a simple arrow-based syntax (->) to define relationships between nodes.

Basic Flow
Plaintext
Start -> Process -> End
Branching & Decisions
You can create multiple paths by starting a new line with the same node name.
Input -> Validation
Validation -> Success
Validation -> Error
Success -> Database
Feedback Loops
Graphviz automatically handles the layout for circular logic.
Write_Code -> Run_Tests
Run_Tests -> Fix_Bugs
Fix_Bugs -> Run_Tests
Run_Tests -> Deploy


πŸ› οΈ Project Structure

text2flow/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ routers/
β”‚   β”‚   └── api.py          
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ parser.py
β”‚   β”‚   β”œβ”€β”€ renderer.py
β”‚   β”‚   └── logger.py       
β”‚   β”œβ”€β”€ static/
β”‚   β”‚   β”œβ”€β”€ css/style.css
β”‚   β”‚   └── js/app.js
β”‚   └── templates/
β”‚       └── editor.html
β”œβ”€β”€ .gitignore                      
β”œβ”€β”€ LICENSE                
β”œβ”€β”€ README.md               
└── requirements.txt        

πŸ§ͺ Tech Stack


πŸ’» Analysis

This repository includes a config.yaml for use with pyragify. To generate a single-file codebase for analysis in LLMs like NotebookLM, run: - python -m pyragify --config-file config.yaml


πŸ›£οΈ Roadmap Features


🀝 Contributions