Transform your Product Vision Board JSON into professional, operational process Mermaid diagrams with AI-powered analysis.
PVB Flow is an AI-powered tool that converts Product Vision Board JSON data into professional Mermaid diagrams. Unlike simple converters, it uses advanced language models to create operational process flowcharts that show WHO does WHAT, with decision points, validation loops, and visual styling.
-
π€ Dual Backend Support:
- Local MLX: Run on Apple Silicon (M1/M2/M3) with Qwen3 models
- HF Spaces: Deploy on Hugging Face with ZeroGPU acceleration (Qwen3-VL-4B)
-
π Smart Diagram Generation:
- Operational process workflows (not just conceptual structures)
- Actor-based design (systems, humans, AI)
- Decision points and branching logic
- Data flows and transformations
- Visual styling with colors and icons
-
π Mermaid Live Editor Integration:
- Generate shareable links to Mermaid Live Editor
- Export diagrams as PNG, SVG, or PDF
- Edit diagrams in real-time
- Share with team members
-
π¬ Conversational Refinement:
- Chat-based interface for iterative improvements
- Request layout changes (vertical/horizontal)
- Add visual enhancements (colors, icons, subgraphs)
- Simplify or expand diagrams
The easiest way to use PVB Flow:
π Try it now on Hugging Face Spaces
No installation required! Just paste your Product Vision Board JSON and start generating diagrams.
For local usage on Mac M1/M2/M3:
# Clone the repository
git clone https://github.com/VincentGourbin/PVB-Flow.git
cd PVB-Flow
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the application
python main.pyOpen http://localhost:7860 in your browser.
{
"1. Utilisateur Cible": [
"PassionnΓ©s de cuisine amateur",
"Professionnels de la restauration"
],
"2. Description du Produit": [
"Application de gestion de recettes",
"Planification automatique des repas"
],
"3. FonctionnalitΓ©s ClΓ©s": [
"Recherche de recettes par ingrΓ©dients",
"GΓ©nΓ©ration automatique de liste de courses",
"Suggestions personnalisΓ©es"
],
"4. Enjeux et Indicateurs": [
"RΓ©duire le gaspillage alimentaire de 30%",
"100 000 utilisateurs actifs en 6 mois"
],
"Summary": "Simplifier la planification des repas"
}- Paste JSON β Chat input
- Wait for generation β Diagram appears on right panel
- Refine via conversation:
- "Make it more vertical"
- "Add more colors to distinguish actors"
- "Simplify the diagram"
- Generate shareable link β Open in Mermaid Live Editor
PVB-Flow/
βββ main.py # Local MLX entry point
βββ requirements.txt # Dependencies (MLX version)
βββ LICENSE # MIT License
βββ README.md # This file
β
βββ src/pvb_flow/ # Main package
β βββ ai/
β β βββ analyzer_factory.py # Auto-detect backend
β β βββ mistral_mlx_analyzer.py # MLX (Apple Silicon)
β β βββ mistral_text_analyzer.py # Transformers (cross-platform)
β β βββ prompts_config.py # System prompts
β β
β βββ ui/
β β βββ app.py # Gradio interface
β β βββ handlers.py # Event handlers
β β
β βββ core/
β β βββ mermaid_encoder.py # URL encoding (fixed!)
β β βββ mermaid_extractor.py # Extract Mermaid code
β β
β βββ utils/
β βββ json_validator.py # Validate PVB JSON
β
βββ huggingface-space/ # HF Spaces deployment
βββ app.py # HF entry point
βββ requirements.txt # HF dependencies
βββ README.md # HF documentation
βββ deploy.py # Auto-deployment script
β
βββ src/
β βββ ai/
β β βββ qwen_zerogpu_analyzer.py # Qwen3-VL + ZeroGPU
β βββ ui/
β β βββ spaces_interface.py # Gradio for Spaces
β βββ ... (shared modules)
β
βββ Documentation/
βββ QUICK_START.md # 2-step deployment
βββ DEPLOYMENT.md # Full deployment guide
βββ FINAL_CONFIG.md # Technical details
βββ ZEROGPU_MIGRATION.md # Migration guide
βββ QWEN3_SUMMARY.txt # Visual summary
| Backend | Platform | Model | Speed |
|---|---|---|---|
| MLX | Apple Silicon | Qwen3-8bit | β‘ Very Fast |
| Transformers | Cross-platform | Mistral | π Slower |
| ZeroGPU | HF Spaces | Qwen3-VL-4B | β‘ Fast |
Carefully crafted prompts generate:
- β Operational process diagrams
- β Actor identification
- β Decision points and branching
- β Data flows
- β Visual styling
-
Encoder: Generates Mermaid Live Editor URLs
- Fixed encoding:
zlib.compress()with header β - Base64url encoding
- Shareable links
- Fixed encoding:
-
Extractor: Parses Mermaid code from LLM responses
- Validates syntax
- Formats for display
Automated deployment in 2 steps:
# 1. Set HF token
export HF_TOKEN="hf_xxxxxxxxxxxxx"
# 2. Deploy
cd huggingface-space
python3 deploy.pyFeatures:
- β
Auto-creates Space with
hardware: zero-gpu - β Uploads all files
- β No API keys needed
- β Model auto-downloads from HF Hub
See huggingface-space/QUICK_START.md
- Model:
mlx-community/Mistral-Small-3.1-24B-Instruct-2503-8bit - Size: 24B params, 8-bit quantized
- Platform: Apple Silicon only
- Model:
Qwen/Qwen3-VL-4B-Instruct - Size: 4B params
- Hardware: ZeroGPU (T4/A10G)
- No API key required β
No configuration needed! Auto-detects:
- β Hardware (MLX/CUDA/MPS/CPU)
- β Downloads models on first run
- β Manages memory
Configured via README.md metadata:
hardware: zero-gpu
models: [Qwen/Qwen3-VL-4B-Instruct]| Document | Description |
|---|---|
| QUICK_START.md | 2-step deployment |
| DEPLOYMENT.md | Full deployment guide |
| FINAL_CONFIG.md | Technical reference |
| ZEROGPU_MIGRATION.md | Migration from API |
| QWEN3_SUMMARY.txt | Visual summary |
Model fails to load:
- Ensure Apple Silicon (M1/M2/M3)
- Minimum 8GB RAM
- Try transformers backend
Slow generation:
- First run downloads models
- Subsequent runs much faster
Space not starting:
- Check logs for errors
- Ensure
hardware: zero-gpuin README - Verify model name
Slow inference:
- First request loads model (warmup)
- ZeroGPU timeout after 60s inactivity
- Model reloads on next request
Unlike simple converters that create conceptual structures, PVB Flow generates:
- WHO: Different actors (System, AI, Human)
- WHAT: Specific actions and steps
- WHEN: Decision points and conditions
- HOW: Data flows and transformations
The fixed encoder (mermaid_encoder.py) now correctly:
- Uses
zlib.compress()with header β - Generates working URLs for Mermaid Live Editor
- Allows export to PNG/SVG/PDF
- Enables real-time editing
Chat-based iteration:
- Natural language requests
- Layout adjustments
- Visual enhancements
- Diagram simplification
Contributions welcome! Please:
- Fork the repository
- Create feature branch
- Make changes
- Add tests
- Submit PR
MIT License - see LICENSE
- Qwen Team: Excellent Qwen3 models
- Hugging Face: Spaces & ZeroGPU
- Gradio: Amazing UI framework
- Mermaid.js: Diagram syntax & editor
- π Live Demo (HF Spaces)
- π Mermaid Live Editor
- π€ Qwen3-VL Model
- π Mermaid Docs
Vincent Gourbin - @VincentGourbin
Made with β€οΈ using Gradio, Qwen3, and Mermaid.js