A lightweight, single-file visualization tool that generates clean, symmetrical website architecture diagrams from simple JSON data.
Built with vanilla HTML, CSS, and JavaScript. Zero dependencies.
- Infinite Canvas: Pan and zoom support (using mouse wheel and drag) to navigate large sitemaps.
- Symmetrical Layout: Custom CSS Flexbox engine ensures tree branches are perfectly balanced.
- Live Editing: Built-in floating JSON editor to modify structure on the fly.
- UI Controls: Minimizable interface to focus purely on the visualization.
- Zero Dependencies: No React, Vue, or build steps required. Just one file.
(Once you host it, replace the link below with your actual URL) View Live Demo
- Zoom: Use your mouse scroll wheel to zoom in and out.
- Pan: Click and drag anywhere on the background to move around.
- Edit: Use the floating panel on the bottom right to paste your JSON. Click Generate to update the tree.
The tool expects a flat array of objects. Each object represents a page or node in the sitemap.
| Property | Type | Description |
|---|---|---|
id |
String | Unique identifier for the node. |
label |
String | The name of the page (e.g., "Home"). |
parentId |
String/Null | The id of the parent node. Use null for the root. |
sections |
Array | (Optional) List of content blocks inside that page card. |
Example Data:
[
{
"id": "1",
"label": "Home",
"parentId": null,
"sections": ["Navbar", "Hero", "Footer"]
},
{
"id": "2",
"label": "About",
"parentId": "1",
"sections": ["Team", "History"]
}
]
Since this is a single HTML file, hosting it is free and takes less than 2 minutes.
- Create a Repository: Go to GitHub and create a new public repository (e.g.,
sitemap-architect). - Upload Code:
- Rename your file to
index.html. - Upload
index.htmlto the root of the repository.
- Activate Pages:
- Go to your repository Settings.
- Click on Pages in the left sidebar.
- Under Build and deployment > Branch, select
main(ormaster) as the source. - Click Save.
- Done: Wait about 60 seconds. Your site will be live at
https://<your-username>.github.io/<repo-name>/.
- Download the
index.htmlfile. - Open it in any modern web browser (Chrome, Safari, Firefox, Edge).
- That's it!
You can easily modify the visual style by editing the <style> block in the file:
- Change Colors: Look for
#18181b(Black/Dark Grey) or#f4f4f5(Background). - Card Size: Edit
.card { width: 220px; }. - Font: The app uses "Inter" by default, falling back to system fonts.
This project is open source. Feel free to use it for personal or commercial projects.