Overview
Architecture Diagrams in Tesslate Studio let you visualize your project’s multi-container structure, dependency graphs, and data flow. Built on top of React Flow (XYFlow), diagrams are interactive, AI-generated, and directly tied to your live project containers.React Flow Powered
Interactive graph canvas with drag, zoom, and pan
AI Generated
AI analyzes your code and creates diagrams automatically
Live Containers
Diagrams reflect running containers and their connections
Export Ready
Download as PNG, SVG, or JSON for documentation
How Diagrams Work
Tesslate Studio uses a graph canvas built on React Flow to render architecture diagrams. Each container in your project becomes a node, and connections between containers become edges.Project Analysis
When you open a project, Tesslate reads the container definitions and their connections from the database. Each
Container model has position coordinates (position_x, position_y) stored for layout persistence.Node Generation
Each container is rendered as a custom
ContainerNode inside the React Flow canvas. Node data includes the container name, status (running, stopped, building), port, and framework type.Edge Mapping
ContainerConnection records define edges between nodes. These represent networking dependencies, such as a frontend container connecting to a backend API container.Live Preview Nodes
BrowserPreview nodes can be attached to containers, showing a live iframe preview of the running application directly on the canvas.First-time diagram generation may take 30 to 60 seconds while the AI analyzes your entire project structure.
Multi-Container Project Visualization
Tesslate projects can contain multiple containers (frontend, backend, database, cache, etc.), and the architecture diagram shows how they all connect.- Container Nodes
- Dependency Edges
- Browser Previews
- Layout Engine
Each container appears as a node on the canvasNode data includes:
- Container name and type (base or service)
- Framework (React, Next.js, FastAPI, etc.)
- Running status with live indicators
- Port information (the
effective_portproperty resolvesinternal_port, thenport, then defaults to 3000) - Deployment mode (container or external)
Diagram Types
- Container Graph
- Component Tree
- Data Flow
- Custom AI Diagram
Project infrastructure viewShows all containers in your project, how they connect, and their current status. This is the primary diagram type, rendered automatically when you open a project.Best for: Understanding project architecture at a glance
Interactive Features
Click to Navigate
Click container nodes to open their files in the code editor
Zoom and Pan
Scroll to zoom, drag the canvas to pan around large diagrams
Drag to Reposition
Drag nodes to rearrange; positions save automatically
Live Status
Nodes show real-time container status (running, stopped, error)
Customization
Styling
Styling
- Color schemes follow your active theme (dark or light mode)
- Layout direction: vertical or horizontal
- Adjustable spacing and sizing
- Node styles adapt to container type
Visibility Controls
Visibility Controls
- Show or hide service containers (databases, caches)
- Filter by container type (base vs. service)
- Focus on specific containers
- Collapse or expand grouped sections
AI Diagram Model
AI Diagram Model
You can choose which AI model generates your diagrams. Go to Settings > Preferences and set your preferred
diagram_model. The model processes your codebase and outputs structured diagram data.Generating AI Diagrams
Natural Language Requests
Ask the AI agent to generate or modify diagrams:- “Show me the full architecture of this project”
- “Diagram how authentication works across the frontend and API”
- “Visualize the data flow from the shopping cart to Stripe checkout”
- “Show only the containers that connect to the database”
- “Create a component tree for the dashboard page”
Refining Diagrams
- Add Details
- Simplify
- Focus
- “Include the port numbers on each container node”
- “Show which containers fetch data from external APIs”
- “Add the database schema to the diagram”
Exporting Diagrams
Choose Format
- PNG: For documents, presentations, and READMEs
- SVG: For scalable web graphics
- JSON: For re-importing the diagram layout later
Technical Details
For developers who want to understand the underlying implementation:React Flow Integration
React Flow Integration
The graph canvas uses
@xyflow/react (React Flow) with custom node types:containerNode: Renders aContainerNodecomponent with status, port, and framework infobrowserPreview: Renders aBrowserPreviewNodewith an embedded iframe
nodeTypes object passed to the ReactFlow component.Data Model
Data Model
Three database models power the diagram:
- Container: Stores
position_x,position_y,name,port,internal_port,container_type, andstatus - ContainerConnection: Stores
source_container_id,target_container_id,connector_type, andconfig(JSON) - BrowserPreview: Stores
connected_container_id,position_x,position_y, andcurrent_path
Auto-Layout Algorithm
Auto-Layout Algorithm
The auto-layout utility in
autoLayout.ts uses the Dagre directed graph layout library to compute optimal node positions. It considers:- Edge direction (top to bottom or left to right)
- Node dimensions
- Connection density
- Minimum spacing between nodes
Use Cases
Onboarding New Developers
Refactoring
- Current State: Open the architecture diagram to see the existing container structure
- Identify Issues: Spot unnecessary connections, missing services, or overly coupled containers
- Plan Changes: Use the AI to sketch a proposed architecture
- Refactor: Make changes to your containers and connections
- Verify: Refresh the diagram to confirm the improved structure
Troubleshooting
Diagram Not Rendering
Diagram Not Rendering
Solutions:
- Ensure the project has at least one container
- Check that containers have valid position data
- Refresh the page to reload the React Flow canvas
- Verify the project is in “active” or “running” status
Diagram Too Complex
Diagram Too Complex
Solutions:
- Use the visibility filters to hide service containers
- Generate feature-specific diagrams instead of full project views
- Use the auto-layout to clean up overlapping nodes
- Split visualization into multiple focused diagrams
Nodes Overlapping
Nodes Overlapping
Solutions:
- Click the “Auto Layout” button to recalculate positions
- Manually drag nodes to better positions (positions save automatically)
- Adjust layout direction from vertical to horizontal
Live Preview Not Loading
Live Preview Not Loading
Solutions:
- Verify the connected container is running
- Check that the container’s port is accessible
- Refresh the browser preview node
- Ensure the dev server inside the container has started
Best Practices
Start with the Container Graph
The default container graph gives you the best high-level overview before drilling into specifics
Use Descriptive Container Names
Container names appear in diagram nodes, so clear names improve readability
Export for Documentation
Include architecture diagrams in your README and project docs
Refresh After Changes
Regenerate diagrams after adding or removing containers to keep visuals current
Next Steps
Projects
Learn about project structure and containers
Code Editor
Navigate your codebase from diagram nodes
Using Agents
Let AI generate and refine architecture diagrams
GitHub Integration
Include diagrams in your repository